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 themysql.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.
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
相关文章:

使用VC实现一个“智能”自增减线程池
工作中接手了一款产品的改造。因为该产品可能使用很多线程,所以产品中使用了线程池。(转载请指明来自BreakSoftware的CSDN博客) 线程池的一个优点是降低线程创建和销毁的频率;缺点是可能在比较闲的时候还存在一定数量的空闲线程。…

国内外财务软件科目结构的比较
科目结构是整个会计核算的基础。国内外财务软件都是任意定义科目的分段及科目编码长度,一般都能支持六段到九段。但科目结构在不同的国家有不同的规范,因而在不同的财务软件中也就有不同的控制。在科目分类上,国内外有明显的区别。国外财务软…
朋友圈装死,微博蹦迪,Python教你如何掌握女神情绪变化 | CSDN博文精选
作者 | A字头来源 | 数据札记倌很多人都是在朋友圈装死,微博上蹦迪。微信朋友圈已经不是一个可以随意发表心情的地方了,微博才是!所以你不要傻傻盯着女神的朋友圈发呆啦!本文教你如何用Python自动通知女神微博情绪变化,…

java异常笔记
Throwable是所有Java程序中错误处理的父类,有两种资类:Error和Exception。Error:表示由JVM所侦测到的无法预期的错误,由于这是属于JVM层次的严重错误,导致JVM无法继续执行,因此,这是不可捕捉到的…
2019最新进展 | Transformer在深度推荐系统中的应用
作者 | Alex-zhai来源 | 深度传送门(ID:deep_deliver)【导读】最近基于Transformer的一些NLP模型很火(比如BERT,GPT-2等),因此将Transformer模型引入到推荐算法中是近期的一个潮流。Transformer比起传统的L…

自己架设windows升级服务器
大部分对计算机比较熟悉的朋友都知道,通常安装好Windows 操作系统后要做的第一件事就是上Windows Update网站去给Windows 安装补丁程序,否则各种漏洞对系统就是一个很大的威胁。不过遗憾的是很多人还没有这样的意识,疏忽了给系统打补丁。这也…

内嵌IE网页窗口中消除IE默认脚本设置影响的方法
随着人们对客户端软件界面要求的不断提高,软件开发商面临着一个问题:如何快速廉价开发出各种丰富效果的UI界面。设计出一套丰富控件的界面库是不容易的,且产品经理丰富的想法和UED对效果的追求,往往会使程序员疲于编写这些“效果控件”。目前市面上使用的很多界面库是基于X…

win7 64位操作系统中 Oracle 11g 安装教程(图解)
1.下载Oracle 11g R2 for Windows版本,下载地址如下 官方网站: http://download.oracle.com/otn/nt/oracle11g/112010/win32_11gR2_database_1of2.zip http://download.oracle.com/otn/nt/oracle11g/112010/win32_11gR2_database_2of2.zip 2.解压两…

使用APIHOOK实现进程隐藏
今天翻出一些今年前写的代码。其中一个是09年,我帮一个读研的同学写的一个“无公害恶意”程序。大致要求就是要实现自启动和自我隐藏。我使用的都是些简单的技术,只是实现自我隐藏稍微让我花费了点时间写算法。其实这个算法也很简单,就是大学…
程序员创业前要做哪些准备?
作者 | hsm_computer出品 | CSDN博客在互联网时代,不少干IT的人白手起家,在短短的几年里通过努力干出了一番事业,有房有车有公司,在人前也很光鲜。这就吸引了更多的程序员想要通过自主创业来实现财务自由。殊不知,创业…

Flex编码过程
Flex编码过程当我们开发一个Flex程序,我们重复其他类型网络程序的过程,例如HTML,JSP,ASP和CFML。创建一个有用的Flex程序是很容易的:打开我们最喜欢的文本编辑器,例如Flex Builder,输入XML标签,编译成为SWF…

BufferedWriter
package JBJADV003;import java.io.*;public class BufferedWriterTest { public static void main(String[] args) { try { //创建一个FileWriter 对象 FileWriter fwnew FileWriter("c:\\myDoc\\hello.txt"); //创建一个BufferedWriter 对象 BufferedWriter bwnew…
使用VC内嵌Python实现的一个代码检测工具
最近组内准备整顿代码,领导让我写个简单的python脚本分析代码中注释的行数和无效注释。因为这个需求不是很急,所以我想把简单的事情做复杂点。于是就写了一个用VC内嵌Python,并通过模拟按键和发消息去控制其他软件的工具。(转载请…
Python如何实现24个微信大群万人同步转发直播?
作者 | 猪哥66来源 | CSDN博客今天我们来学习微信机器人多群转发做同步图文直播!一、背景介绍猪哥一年前在建Python学习群的时候就说过,要邀请企业大佬来学习群做直播。其实文章早就写好了,但是一直没有找到好的转发软件,所以耽搁…

ITSM实施三招[案例]
当前国外成熟的ITSM解决方案的实施成本相对比较高,使一些对成本较敏感的的IT部门,成为ITSM实施的一个真空区。对于国内起步阶段的ITSM(IT服务管理)实施来说,南航的ITSM实施之路是一个借鉴。 南航it环境 在各大航空公司…
lr手工添加关联函数的步骤:
点击“确定”后: 如何修改已经创建好的关联规则:

新闻内容实现分页
/**//// <summary> /// 新闻内容分页 /// </summary> /// <param name"content">新闻内容</param> /// <param name"extension">扩展名(aspx,html..)</param> /// <returns></returns>pub…
使用自己的数据集训练MobileNet、ResNet实现图像分类(TensorFlow)| CSDN博文精选
作者 | pan_jinquan来源 | CSDN博文精选之前写了一篇博客《使用自己的数据集训练GoogLenet InceptionNet V1 V2 V3模型(TensorFlow)》https://panjinquan.blog.csdn.net/article/details/81560537,本博客就是此博客的框架基础上,完…

VC下提前注入进程的一些方法1——远线程不带参数
前些天一直在研究Ring3层的提前注入问题。所谓提前注入,就是在程序代码逻辑还没执行前就注入,这样做一般用于Hook API。(转载请指明出处)自己写了个demo,在此记下。 我的demo使用了两种注入方式:1 远线程&a…

【转】用示例说明索引数据块中出现热块的场景,并给出解决方案
文章转自:http://www.luocs.com/archives/582.html

VC下提前注入进程的一些方法2——远线程带参数
在前一节中介绍了通过远线程不带参数的方式提前注入进程,现在介绍种远线程携带参数的方法。(转载请指明出处) 1.2 执行注入的进程需要传信息给被注入进程 因为同样采用的是远线程注入,所以大致的思路是一样的,只是在细…
芬兰开放“线上AI速成班”课程,全球网民均可免费观看
出品 | AI科技大本营(ID:rgznai100)去年,芬兰推出了一个免费的“人工智能线上速成班”项目,目的是向该国民众教授与新技术有关的知识。现在,作为送给全世界的圣诞节礼物,这个项目已面向全球网民开放访问&am…

deepin开通ssh
1、在终端打入下面命令进行安装sudo apt-get install openssh-server2、启用sshservice ssh start 反馈:start: Rejected send message, 1 matched rules; type"method_call", sender":1.56" (uid1000 pid2272 comm"start ssh ") int…

实现等待窗体的几种方式
实现等待窗体的几种方式:下面说明了五种可以实现等待窗体的方式,其中三种给出了代码。准备资料安全访问控件成员为了保证在创建控件的线程上调用控件成员,用下面的方式封装控件的属性、方法、其他自定义成员的访问。如: winWordControl.LoadD…
GitHub宝藏项目标星1.6w+,编程新手有福了
作者 | Rocky0429来源 | Python空间(ID: Devtogether)特别惭愧的是,虽然我很早就知道 GitHub,但是学会逛 GitHub 的时间特别晚。当时一方面是因为菜,看着这种全是英文的东西难受,不知道该怎么去玩ÿ…

VC下提前注入进程的一些方法3——修改程序入口点
前两节中介绍了通过远线程进行注入的方法。现在换一种方法——修改进程入口点。(转载请指明出处) 在PE文件中,其中有个字段标识程序入口点位置。我们通过这个字段,到达程序入口点。PE文件的结构我这儿不讨论(我会在之后…

如何产生签名applet能让applet能够访问本地资源
2019独角兽企业重金招聘Python工程师标准>>> 如何产生签名applet,以使applet能够访问本地资源? 在jdk1.1中,可以使用javakey命令来产生公钥,私钥,证书和签名的jar文件,详细资料请参考: http://java.sun.com/security/usingJavakey.html而java 2对签名机制做了比较大…

VC提前注入.net软件的方法
在之前几节介绍了各种注入方法,但是这些方法存在一些缺陷——对.net程序注入无效。(转载请指明出处) 这个可以理解,.net程序的代码不是汇编,而是微软自定义的IL中间语言。.net CLR如同虚拟机,解析并执行这些…
活动推荐:语音和语言技术在自然交互中的实践沙龙
智能语音技术已经渗透进家居生活、车载、金融服务等日常生活场景,在很大程度上解放了人们的双手和眼睛,语音交互成为连接人与信息/服务的新入口。根据IDC预测,国内对话式人工智能市场规模将在2022年达到78亿元。如何提供便捷、高效、高可用的…