Bug #24422 Should not allow agents to register with duplicate uuid or server-name settings
Submitted: 18 Nov 2006 23:03 Modified: 3 Apr 2007 21:54
Reporter: Gary Whizin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Server Severity:S2 (Serious)
Version:1.0.0 OS:Any (all)
Assigned to: Carsten Segieth CPU Architecture:Any
Tags: agent registration, mer100 readme, mer101

[18 Nov 2006 23:03] Gary Whizin
Description:
Numerous problems result if the Service Manager is contacted by an Agent using a uuid or server-name that's already in use (by another agent process). This can happen in serveral circumstances, including:

(1) starting a second agent process using the same ini file (i.e. myagent.ini is already "running")
(2) copying agent-01.ini to agent-02.ini, but forgetting to generate a new UUID
(3) copying agent-01.ini to agent-02.ini, but forgetting to specify a unique server-name setting (e.g. server-name=myagent-02)

Note: unexpected results also occur if the new agent .ini does not specify unique .log and .pid filenames as well.

How to repeat:
see above
[20 Dec 2006 21:01] Mark Leith
Another issue:

Uninstall agent, reinstall, set the server name to the same, but have a new UUID generated.

This causes the agent to show as down, unless a new server-name is set.
[21 Feb 2007 19:36] Mark Leith
Duplicate UUID now works, duplicate server-name causes a strange exception (which Darren has already identified):

2007-02-21 20:15:35: (debug) <-- received: <?xml version='1.0'?><exceptions><error><![CDATA[E0001: Internal Error: com.mysql.util.Version$1 not Serializable.]]></error></exceptions>
2007-02-21 20:15:35: (critical) exception received from server: E0001: Internal Error: com.mysql.util.Version$1 not Serializable.

Also the question of multiple servers running with sockets (i.e server-name:0 and server-name:0).

Re-verifying
[21 Feb 2007 20:19] Darren Oldag
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/
[3 Apr 2007 17:10] Carsten Segieth
same note as in bug#26546 - server logs fill with duplicate UUID error message from same agent:

tested OK with 1.1.0.4973, agent now stops when duplicate UUID or SERVER-NAME is
detected:

2007-04-03 13:27:42: (critical) exception received from server: E1402: 
Duplicate agent uuid "4d8ba81c-0004-3300-0005-4d075c239ac7" detected.
2007-04-03 13:27:42: (critical) server asked us to shutdown

2007-04-03 13:29:34: (critical) exception received from server: E1403:  Server
name "Merlin agent long name:3300" is in use by another agent with uuid
"4d8ba81c-0004-3300-0005-4d075c239ac7".
2007-04-03 13:29:34: (critical) server asked us to shutdown

But there is a problem with server-names that differ only in case: bug#27616 - MySQLIntegrityConstraintViolationException: Duplicate entry '...' for key 2
[3 Apr 2007 21:54] Peter Lavin
Added to changelog.