Bug #43051 agent blocks session, cannot logout from it after starting agent
Submitted: 20 Feb 2009 9:35 Modified: 6 May 2010 10:06
Reporter: Carsten Segieth Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S2 (Serious)
Version:2.0.4.7139, 2.2.0.1666 OS:Any
Assigned to: Michael Schuster CPU Architecture:Any

[20 Feb 2009 9:35] Carsten Segieth
Description:
After starting the agent one can no longer logout from the session where the agent was started.

Tested on 5 different OS, so it looks to be a general problem that was introduced between 2.0.4.7138 and 2.0.4.7139.

Using build 7138 one can logout without problems after the agent was started. With all builds since 7139 one cannot logout (it hangs) and need to kill the session where the agent start command was issued.

How to repeat:
test both with 2.0.4.7138 (logout works fine) and 2.0.4.7139 (logout 'hanging')
- ssh to any system
- start agent using the etc/ini.d/ script
- try to logout from the ssh session after agent was started

Suggested fix:
make it work as before ...
[20 Feb 2009 13:59] Kay Roepke
there was no code change between 7138 and 7139 in the 2.0 branch.
[26 Feb 2009 19:30] Keith Russell
I was able to consistently verify this behavior on 'blade01'.
[6 Mar 2009 20:32] Andy Bang
Is this related to the fix for Bug #40583?
[6 Mar 2009 21:35] Carsten Segieth
reproduced on blade01 with the steps from above with build 2.0.5.7151 (where 7138 works)
[12 Mar 2009 2:38] Keith Russell
Change incorporated into version 2.0.5.7152. Agreed to work as expected on 'blade01'. However other platforms need to be tested.
[12 Mar 2009 8:08] Carsten Segieth
2.0.5.7152 on qa-merlin shows for "restart" if no server was running before (7151 does not show this):
...
cat: /tmp/xfile.8708: No such file or directory
etc/init.d/mysql-monitor-agent: line 231: test: -eq: unary operator expected
...
[12 Mar 2009 8:33] Carsten Segieth
2.0.5.7152 - using 'restart' to start the agent (to check the script for a non running agent), these (and similar) messages are shown on different OS:

cat: /tmp/xfile.21290: No such file or directory
etc/init.d/mysql-monitor-agent: line 231: test: -eq: unary operator expected

cat: /tmp/xfile.28260: No such file or directory
test: -eq: unexpected operator

cat: cannot open /tmp/xfile.245
etc/init.d/mysql-monitor-agent: test: argument expected

cat: /tmp/xfile.10877: No such file or directory
etc/init.d/mysql-monitor-agent: line 231: test: -eq: unary operator expected

cat: 0652-050 Cannot open /tmp/xfile.1015848.
etc/init.d/mysql-monitor-agent[231]: test: 0403-004 Specify a parameter with this command.
[13 Mar 2009 0:07] Carsten Segieth
2.0.5.7153 - I still see the blocking when working with remote ssh, but the messages are gone:

pino@IBM /cygdrive/d/Merlin/inst/agent
$ CMD=restart ; V=2.0.3.7134; net-qa1 /data0/merlin/agent/${V}/rhel4-x86-32bit/net-qa1/etc/init.d/mysql-monitor-agent $CMD /data0/merlin/agent/${V}/r
hel4-x86-32bit/net-qa1/etc/no_ssl_quan.ini
MySQL Enterprise agent PID file could not be found![FAILED]
Starting MySQL Enterprise agent service...[  OK  ]

pino@IBM /cygdrive/d/Merlin/inst/agent
$ CMD=stop    ; V=2.0.3.7134; net-qa1 /data0/merlin/agent/${V}/rhel4-x86-32bit/net-qa1/etc/init.d/mysql-monitor-agent $CMD /data0/merlin/agent/${V}/r
hel4-x86-32bit/net-qa1/etc/no_ssl_quan.ini
Shutting down MySQL Enterprise agent service.......[  OK  ]

pino@IBM /cygdrive/d/Merlin/inst/agent
$ CMD=restart ; V=2.0.5.7151   ; net-qa1 /data0/merlin/agent/${V}/rhel4-x86-32bit/net-qa1/etc/init.d/mysql-monitor-agent $CMD /data0/merlin/agent/${V
}/rhel4-x86-32bit/net-qa1/etc/no_ssl_quan.ini
MySQL Enterprise agent PID file could not be found![FAILED]
Starting MySQL Enterprise agent service...[  OK  ]
Killed by signal 2.

pino@IBM /cygdrive/d/Merlin/inst/agent
[2 Apr 2009 23:21] MySQL Verification Team
Seen in version 2.0.5.7153
[4 Aug 2009 17:45] Gary Whizin
Another possible workaround: start the agent from screens
[30 Mar 2010 16:13] Enterprise Tools JIRA Robot
Diego Medina writes: 
To make sure you see this error, please use the init.d script that comes with the installer. There are times when the init.d script that we have in our branch is not what customers (or QA) end up using.
[28 Apr 2010 23:23] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.2.0.1705.
[30 Apr 2010 10:25] Enterprise Tools JIRA Robot
Carsten Segieth writes: 
tested OK in build 2.2.0.1705
[6 May 2010 10:06] MC Brown
A note has been added to the 2.2.0 changelog