Bug #43051 agent blocks session, cannot logout from it after starting agent
Submitted: 20 Feb 10:35 Modified: 12 Mar 9:33
Reporter: Carsten Segieth
Status: Verified
Category:Monitoring: Agent Severity:S2 (Serious)
Version:2.0.4.7139,2.0.5.7153 OS:Any
Assigned to: Keith Russell Target Version:
Triage: Needs Triage: D3 (Medium)

[20 Feb 10: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 14:59] Kay Roepke
there was no code change between 7138 and 7139 in the 2.0 branch.
[26 Feb 20:30] Keith Russell
I was able to consistently verify this behavior on 'blade01'.
[6 Mar 21:32] Andy Bang
Is this related to the fix for Bug #40583?
[6 Mar 22:35] Carsten Segieth
reproduced on blade01 with the steps from above with build 2.0.5.7151 (where 7138 works)
[12 Mar 3: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 9: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 9: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 1: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
[3 Apr 1:21] Jonathon Coombes
Seen in version 2.0.5.7153
[4 Aug 19:45] Gary Whizin
Another possible workaround: start the agent from screens