Bug #42228 Agent Shuts down if wrong username/password are given on service manager
Submitted: 20 Jan 2009 21:01 Modified: 20 Jul 2009 16:43
Reporter: Diego Medina Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S2 (Serious)
Version:2.0.2.7128 OS:Any
Assigned to: Mark Matthews CPU Architecture:Any

[20 Jan 2009 21:01] Diego Medina
Description:
If you are running the service manager through the proxy on a fresh setup (no mem database already in the mhysqld), and try to do the setup process (enter net credentials, etc) The agent will shut down.

This is with a service manager from trunk (or 2.1)

How to repeat:
0- Setup the service manager to use the proxy port
1- Start the agent
2- Start the service manager from trunk 
3- Fill in the setup page and click "complete"
4- boom, you will get "Cannot open connection" on the UI and these logs on the agent

https://intranet.mysql.com/secure/paste/displaypaste.php?codeid=6652

and

2009-01-20 15:54:16: (critical) <-- received HTTP-status: 401 (failed) for 'http://agent:mysql@127.0.0.1:8080/Monitor2/heartbeat': password are wrong
2009-01-20 15:54:16: (critical) shutting down normally

2009-01-20 15:54:19: (critical) <-- received HTTP-status: 401 (failed) for 'http://agent:mysql@127.0.0.1:8080/Monitor2/heartbeat': password are wrong
2009-01-20 15:54:19: (critical) shutting down normally

Suggested fix:
Do not shut down, but log the problem
[17 Jun 2009 21:13] Mark Matthews
revno: 1362
revision-id: mark@mysql.com-20090617211317-2f3sfk0amojskmxu
parent: mark@mysql.com-20090617210350-b03292pyclk21ok8
committer: mark@mysql.com
branch nick: trunk
timestamp: Wed 2009-06-17 16:13:17 -0500
message:
  Fix for Bug#42228 - Agent shuts down if credentials for service manager are incorrect
[18 Jun 2009 2:30] Keith Russell
Patch installed in versions => 2.1.0.1063.
[18 Jun 2009 21:35] Bill Weber
verified fixed in build 2.1.0.1063
[20 Jul 2009 16:43] Tony Bedford
An entry was added to the 2.1.0 changelog:

The Agent shut down if the wrong username/password was given in the Service Manager. This happened on a fresh installation, when running the Service Manager through the Proxy. When Complete was clicked to finish the installation the error “Cannot open conection” was displayed. The Agent log also contained the following errors:

2009-01-20 15:54:16: (critical) <-- received HTTP-status: 401 (failed) for
'http://agent:mysql@127.0.0.1:8080/Monitor2/heartbeat': password are wrong
2009-01-20 15:54:16: (critical) shutting down normally

2009-01-20 15:54:19: (critical) <-- received HTTP-status: 401 (failed) for
'http://agent:mysql@127.0.0.1:8080/Monitor2/heartbeat': password are wrong
2009-01-20 15:54:19: (critical) shutting down normally