Possible MySQL server UUID duplication for server



    在mysql enterprise monitor监控过程中出现这样的event事件,Topic: Possible MySQL server UUID duplication for server 事件,从该提示的描述来看貌似是存在重复的uuid,而实际上主从关系并不存在重复的uuid。主从关系是通过xtrabackup来构建的。那到底是哪里的问题呢?下文是描述基于xtrabackup复制时导致监控出现重复uuid的问题。

1、故障现象
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 Instances监控见面会出现这2个主机配置在不停的切换中
MySQL server afd6bca4-6636-11e3-9d60-74867ae1c47c changed its hostname 181 times between the following hostnames:
DBSRV-TXT01
DBSRV-SLAVE02

MySQL server afd6bca4-6636-11e3-9d60-74867ae1c47c changed its connection TCP properties 96 times between the following TCP properties:

127.0.0.1:3306
127.0.0.1:3307

Advice
Check 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.inventory表
[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表
[root@DBSRV-SLAVE02 ~]# mysql -uroot -p -e "    ---Author : Leshami
> show variables like 'server_uuid';            ---Blog   : http://blog.csdn.net/leshami
> 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是由于使用了实例级别的热备,所以2个实例具有相同的uuid

###清空mysql.inventory,然后重启监控agent(略),问题解决
[root@DBSRV-SLAVE02 ~]# mysql -uroot -p -e "truncate table mysql.inventory" -S /tmp/mysql3307.sock
Enter password:

3、关于MySQL MEM UUID duplication

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.

  • Each MySQL Server has a UUID, stored in the mysql.inventory table, that uniquely identifies the MySQL server to the rest of MEM. The server UUID is used to collate information about a single MySQL instance.
  • Each host (the machine on which the agent is running) has a UUID to uniquely identify the host to the rest of MySQL Enterprise Monitor. This is used to collate the OS information (such as CPU, RAM and disk data). The host ID also determines whether the MySQL server is on the same host as it was before, to identify when data has been moved between machines, or when a machine has been upgraded. The host UUID is stored within the hostid row within the mysql.inventory table.
  • Each agent has a UUID to identify the agent to MEM. The agent UUID is defined within the agent-uuid parameter within the agent configuration file.

These UUIDs are used in combination to register and collate information, and to determine the location and source of an issue.

Note

Because each host must be unique, be careful when restoring from a backup so you do not have hosts with duplicated SSH keys or UUIDs.

http://dev.mysql.com/doc/mysql-monitor/2.3/en/mem-introduction-mysql-server.html

The MySQL Enterprise Monitor Agent and MySQL Enterprise Service Manager use the unique host ID, stored within the mysql.inventory table on the monitored MySQL Server, to determine whether the instance being monitored is a clone. The host ID of the current server is checked against the stored value when the agent starts. If the generated host ID and stored host ID do not match, you get an error similar to the following in the agent log file:

%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.

http://dev.mysql.com/doc/mysql-monitor/2.3/en/mem-troubleshooting-agent-start.html



时间: 2024-12-30 19:26:48

Possible MySQL server UUID duplication for server的相关文章

将MySQL迁移到Microsoft SQL Server 2000 (二)

mysql|server 用于数据迁移的 MySQL 工具 MySQL 提供了几个客户端工具和实用程序,最常用的有: mysql - 一个交互式客户程序,可以对数据库发布查询并查看结果 mysqldump - 此工具可以提取 MySQL 数据库中的架构和数据,并放到一个文件中 mysqlimport - 此工具可以读取文件中的架构和数据,并放到一个 MySQL 数据库中 mysqladmin - 此工具可以执行管理任务,比如创建数据库和删除数据库 myODBC - 一个 32 位的开放式数据库连

将MySQL迁移到Microsoft SQL Server 2000 (一)

mysql|server 将MySQL迁移到Microsoft SQL Server 2000 摘要 本白皮书描述了 Microsoft SQL Server 2000 的迁移能力,并提供了帮助开发人员将 MySQL 数据库迁移到 SQL Server 2000 的特定信息. 引言 本指南解释如何利用几个内置的 SQL Server 工具和实用程序将 MySQL 迁移到 Microsoft? SQL Server? 2000.它还提供了如何修改 MySQL 应用程序,使之与 SQL Server

mysql起动报错The server quit without updating PID file /usr/local/mysql/data/

mysql起动报错The server quit without updating PID file (/usr/local/mysql/data/ 查看错误日志显示: mysqld_safe mysqld from pid file /usr/local/mysql/data/mysql.pid ended 肯定是配置文件问题: 新安装的测试机  hostname server01  centos 6.5 环境   mysql 5.6.12 单机 64位 二进制包安装 my.cnf 里面只有一

将MySQL迁移到Microsoft SQL Server 2000 (一)-数据库相关-PHP教程

将MySQL迁移到Microsoft SQL Server 2000 摘要 本白皮书描述了 Microsoft SQL Server 2000 的迁移能力,并提供了帮助开发人员将 MySQL 数据库迁移到 SQL Server 2000 的特定信息. 引言 本指南解释如何利用几个内置的 SQL Server 工具和实用程序将 MySQL 迁移到 Microsoft? SQL Server? 2000.它还提供了如何修改 MySQL 应用程序,使之与 SQL Server 2000 一起工作的指南

将MySQL迁移到Microsoft SQL Server 2000 (二)-数据库相关-PHP教程

用于数据迁移的 MySQL 工具 MySQL 提供了几个客户端工具和实用程序,最常用的有: mysql - 一个交互式客户程序,可以对数据库发布查询并查看结果 mysqldump - 此工具可以提取 MySQL 数据库中的架构和数据,并放到一个文件中 mysqlimport - 此工具可以读取文件中的架构和数据,并放到一个 MySQL 数据库中 mysqladmin - 此工具可以执行管理任务,比如创建数据库和删除数据库 myODBC - 一个 32 位的开放式数据库连接软件,可提供 ODBC

关于SQL Server 2000和SQL Server 2005分布式事务能否协同工作的测试

server|分布式 关于SQL Server 2000和SQL Server 2005分布式事务能否协同工作的测试 MS DTC Report 1.      MS DTC 背景 2.      MSDTC 测试目的 3.      MSDTC 测试环境 3.1            本次验证测试环境: 3.2            环境配置 3.3            验证MSDTC 3.4            创建验证用表 4.      Linked Server测试 5.     

你应该升级到SQL Server 2005还是SQL Server 2008?

虽然SQL Server2005已经推出了约3年了,奇怪的是,很多公司仍然没有将SQL Server2000升级.现在这些公司面临着再次作出决定--是跳过升级到SQL Server 2005 还是直接到SQL Server 2008?要作出这个选择并不简单,本文主要讨论有关这一问题必须要考虑的事情. 升级到SQL Server 2005 没有太大的意义,SQL Server 2005是SQL Server的一个版本,在此之后只有一格版本推出.在其他的版本中,你减少了服务器的支持窗口.如果升级到S

sql点滴38—SQL Server 2008和SQL Server 2008 R2导出数据的选项略有不同

原文:sql点滴38-SQL Server 2008和SQL Server 2008 R2导出数据的选项略有不同 说明:       以前要将一个表中的数据导出为脚本,只有用存储过程.现在在SQL Server 2008中增加了一个新特性,除了导出表的定义外,还支持将表中的数据导出为脚本. 步骤:     右击需要导出数据的数据库,在弹出式菜单中选择"任务"下的"生成脚本"选项      在第二步选择"高级选项"如果不是2008(R2)的选择 &

win server 2008安装sql server 2008标准版 数据库引擎安装失败

问题描述 win server 2008安装sql server 2008标准版 数据库引擎安装失败 今天在win server 2008上安装sql server 2008标准版,之前都没有报错,就是到最后安装快结束了弹出对话筐,如下 跪求大神帮忙,我要疯了!!!