Bug #46927 mysql-monitor-agent fails silently if proxy-address is an invalid address
Submitted: 26 Aug 2009 6:27 Modified: 24 May 2010 14:46
Reporter: Andrew Dalgleish Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:2.0.5, 2.1.0, 2.0.6 OS:Any
Assigned to: Michael Schuster CPU Architecture:Any

[26 Aug 2009 6:27] Andrew Dalgleish
Description:
If the proxy-address is an invalid IP or port, mysql-monitor-agent aborts but does not log a reason why. (This makes it hard to locate simple typos)

How to repeat:
Specify an invalid port number (eg > 65535) like this:
[mysql-proxy]
proxy-address=:99999

Specify an IP address not bound to a local interface like this:
[mysql-proxy]
proxy-address=1.1.1.1:4040

Suggested fix:
Sanity check the parameters before opening the socket, and log any failures if unable to open the socket.
[28 Aug 2009 10:16] Sveta Smirnova
Thank you for the report.

Verified as described.
[12 Feb 2010 20:39] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.1.2.1150.
[23 Mar 2010 15:55] Enterprise Tools JIRA Robot
Diego Medina writes: 
Almost fixed.

If you specify 

proxy-address=:2404033333

you see this message on the log:

{noformat}
(critical) network-socket.c:756: illegal value 2404033333 for port, only 1 ... 65535 allowed
(critical) shutting down normally
{noformat}

It would be much better if we log the actual parameter name, instead of just saying "port". 

Another issue:

If you specify 

proxy-backend-addresses = 127.0.0.1:5132111111

The agent keeps running and you see this message on the log:
{noformat}
network-socket.c:756: illegal value 4294967295 for port, only 1 ... 65535 allowed
{noformat}

Note that it does not show the current value for ip:port, and it does not shutdown.
[18 May 2010 13:36] Enterprise Tools JIRA Robot
Mark Leith writes: 
This issue was resolved in 2.1.2. 

EM-4514 was created for making proxy-backend-addresses consistent with proxy-address.
[24 May 2010 14:46] MC Brown
A note has been added to the 2.1.2 changelog: 

        If you specify an invalid backend proxy address to                                                                                                 
        &merlin_agent;, the agent would fail silently.