서버에 대한 MySQL 서버 UUID 중복 가능성

黄舟
풀어 주다: 2017-02-15 10:40:28
원래의
1329명이 탐색했습니다.



이러한 이벤트는 mysql 엔터프라이즈 모니터 모니터링 프로세스 중에 발생합니다. 주제: 서버 이벤트에 대한 MySQL 서버 UUID 중복이 가능한 것으로 보입니다. . uuid이지만 실제로 마스터-슬레이브 관계에는 중복된 uuid가 없습니다. 마스터-슬레이브 관계는 xtrabackup을 통해 구축됩니다. 그렇다면 문제는 무엇입니까? 다음은 xtrabackup 기반으로 복사 시 모니터링 시 uuid가 중복되는 문제에 대한 설명입니다.


결함현상

Topic: Possible MySQL server UUID duplication for server afd6bca4-6636-11e3-9d60-74867ae1c47c: NOTICE
Categories:Monitoring and Support Services 
Current State:Open
Auto-Closes by Default:Yes
Advisor:Duplicate MySQL Server UUID 
Current Status:Notice
Last Checked:May 4, 2015 2:18:02 PM
로그인 후 복사


###에서는 uuid가 N 번 변경되었다는 메시지가 표시되며 이 두 호스트 구성이 MySQL 인스턴스 모니터링에 나타납니다. 미팅 상시전환

MySQL server afd6bca4-6636-11e3-9d60-74867ae1c47c changed its hostname 181 times between the following hostnames:DBSRV-TXT01DBSRV-SLAVE02
MySQL server afd6bca4-6636-11e3-9d60-74867ae1c47c changed its connection TCP properties 96 times between the following TCP properties:
127.0.0.1:3306127.0.0.1:3307
AdviceCheck that you are not monitoring more than one instance with the following server UUID: afd6bca4-6636-11e3-9d60-74867ae1c47c. 
This can be caused by server or host cloning. If this is expected (example: HA scenarios), then please ignore this notice.
로그인 후 복사



2. 인증 uuid
###Google 기사에 설명된 대로 mysql.inventory는 mysql enterpirse moitor 모니터링에서 사용하는 uuid 정보를 저장합니다
###메인 라이브러리 uuid 및 mysql을 확인합니다. 인벤토리 테이블

[root@DBSRV-TXT01 ~]# mysql -uroot -p -e "
show variables like 'server_uuid';
select * from mysql.inventory;" -S /tmp/mysql3307.sock 
Enter password: 
+---------------+--------------------------------------+
| Variable_name | Value                                |
+---------------+--------------------------------------+
| server_uuid   | 1ed85852-dd27-11e4-aa4a-44a8420ba7a5 |
+---------------+--------------------------------------+
+--------+-------------------------------------------------------+
| name   | value                                                 |
+--------+-------------------------------------------------------+
| uuid   | afd6bca4-6636-11e3-9d60-74867ae1c47c                  |
| hostid | ssh:{8a:c7:a9:42:3a:6b:06:ad:fa:ed:04:ac:a5:fa:f0:b5} |
+--------+-------------------------------------------------------+
로그인 후 복사


### 라이브러리에서 보기 uuid 및 mysql .inventory table

[root@DBSRV-SLAVE02 ~]# mysql -uroot -p -e "    ---Author : Leshami
> show variables like 'server_uuid';            ---Blog   : 
http://www.php.cn/
> select * from mysql.inventory;"
Enter password: 
+---------------+--------------------------------------+
| Variable_name | Value                                |
+---------------+--------------------------------------+
| server_uuid   | f7e00194-2f59-11e4-bcf6-b82a72d46b21 |
+---------------+--------------------------------------+
+--------+-------------------------------------------------------+
| name   | value                                                 |
+--------+-------------------------------------------------------+
| uuid   | afd6bca4-6636-11e3-9d60-74867ae1c47c                   |
| hostid | ssh:{8a:c7:a9:42:3a:6b:06:ad:fa:ed:04:ac:a5:fa:f0:b5} |
+--------+-------------------------------------------------------+
로그인 후 복사


### 쿼리 결과는 다음과 같습니다. mysql.inventory 테이블은 동일한 uuid를 저장합니다
###이 동일한 uuid는 인스턴스 수준 상시 대기 사용으로 인해 발생하므로 두 인스턴스는 동일한 uuid를 갖습니다

### mysql.inventory를 지운 후 모니터링 에이전트를 다시 시작(생략)하면 문제가 해결됩니다.

[root@DBSRV-SLAVE02 ~]# mysql -uroot -p -e "truncate table mysql.inventory" -S /tmp/mysql3307.sock
Enter password:
로그인 후 복사



3.MySQL MEM UUID 중복에 대하여

MySQL Enterprise Monitor uses a number of unique values known as       
UUIDs to identify the different      
components, including the MySQL instance being monitored. UUID      
values related to the MySQL instance and the host on which it runs      
are stored in a table mysql.inventory within      
the instance. MySQL Enterprise Monitor creates this table if it does not exist      
already.
로그인 후 복사
  • 각 MySQL 서버에는 MySQL 서버를 나머지 MEM에 대해 고유하게 식별하는 mysql.inventory 테이블에 저장된 UUID가 있습니다. 서버 UUID는 단일 MySQL 인스턴스에 대한 정보를 대조하는 데 사용됩니다.

  • 각 호스트(에이전트가 실행되는 머신)에는 나머지 MySQL Enterprise Monitor에 대해 호스트를 고유하게 식별하는 UUID가 있습니다. 이는 OS 정보(예: CPU, RAM 및 디스크 데이터) 호스트 ID는 또한 MySQL 서버가 이전과 동일한 호스트에 있는지 여부를 결정하여 데이터가 머신 간에 이동된 시기 또는 머신이 업그레이드된 시기를 식별합니다. hostid 테이블 내의 mysql.inventory 행.

  • 각 에이전트에는 MEM에 대해 에이전트를 식별하는 UUID가 있습니다. 에이전트 UUID는 에이전트 구성 내의 agent-uuid 매개 변수 내에 정의됩니다. 파일.


이러한 UUID는 정보를 등록 및 대조하고 문제의 위치와 소스를 확인하는 데 함께 사용됩니다.

참고

각 호스트는 고유해야 하므로 백업에서 복원할 때 중복된 SSH 키 또는 UUID가 있는 호스트가 없도록 주의하십시오.

MySQL Enterprise Monitor Agent 및 MySQL Enterprise Service Manager는 모니터링되는 MySQL 서버의 mysql.inventory 테이블에 저장된 고유 호스트 ID를 사용하여 모니터링 중인 인스턴스가 복제인지 확인합니다. 에이전트가 시작될 때 저장된 값과 비교하여 현재 서버의 호스트 ID를 확인합니다. 생성된 호스트 ID와 저장된 호스트 ID가 일치하지 않으면 에이전트 로그 파일에 다음과 유사한 오류가 표시됩니다.

%s: [%s] the hostid from mysql.inventory doesn't match our agent's host-id (%s != %s)
We assume that this is a cloned host and shutdown now.
Please TRUNCATE TABLE mysql.inventory on this mysql-instance and restart the agent.
If this is a master for replication, please also run SET SQL_LOG_BIN = 0; first.
로그인 후 복사

To fix the problem, connect to the MySQL server using the credentials configured when you installed the agent, and then truncate the mysql.inventory table:

mysql> TRUNCATE mysql.inventory;
로그인 후 복사

Now restart the agent, which recreates the           mysql.inventory table with the updated          instance UUID and hostid information.

以上就是Possible MySQL server UUID duplication for server 的内容,更多相关内容请关注PHP中文网(www.php.cn)!



원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!