Bug #58125 Agent upgrade leaves incorrect configuration. Agent stopps
Submitted: 10 Nov 2010 20:58 Modified: 10 Nov 2010 21:11
Reporter: Mario Beck Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:2.3.0.2036 OS:Solaris (S10 SPARC/64)
Assigned to: CPU Architecture:Any
Tags: agent-item-files, quan.lua, upgrade

[10 Nov 2010 20:58] Mario Beck
Description:
After running the agent upgrade installer, the agent cannot start anymore.
Looking at the logfile:

2010-11-10 21:20:18: (critical) MySQL Monitor Agent 2.3.0.2036 started.
2010-11-10 21:20:18: (critical) agent-items-xml.c:33: lua_pcall(): ...prise/agent/share/mysql-monitor-agent/items/quan.lua:11: attempt to index global 'proxy' (a nil value)
2010-11-10 21:20:18: (critical) agent.c:589: reading item-file no. 0 (name: '/opt/mysql/enterprise/agent/share/mysql-monitor-agent/items/quan.lua') failed
2010-11-10 21:20:18: (critical) mainloop.c:267: applying config of plugin MySQL Monitor Agent failed
2010-11-10 21:20:18: (critical) mysql-monitor-agent-cli.c:562: Failure from chassis_mainloop. Shutting down.

Looking at mysql-monitor-agent.ini in contains

agent-item-files = share/mysql-monitor-agent/items/quan.lua,share/mysql-monitor-agent/items/items-mysql-monitor.xml,share/mysql-monitor-agent/items/items-mysql-cluster.xml,share/mysql-monitor-agent/items/custom.xml

If I remove the first entry "share/mysql-monitor-agent/items/quan.lua," the agent runs perfectly.

During upgrade installation I activated the agent plugin and the aggregator plugin. (I tested even without aggregator plugin. Same error)

Upgrade came from #Version: 2.2.0.1705
The old value of agent-item-files BEFORE the upgrade was:
agent-item-files = share/mysql-monitor-agent/items/items-mysql-monitor.xml,share/mysql-monitor-agent/items/custom.xml

How to repeat:
Install Agent 2.2.0.1705 and configure.
Upgrade MEM service manager to 2.3.x
Upgrade agent with upgrade installer
See part of the configuration report for details.
After the upgrade, the monitor writes errors to the log file and quits.

Agent Plug-In
-------------------------
Agent Enabled: yes

Monitored MySQL Database:
-------------------------
Socket: /opt/mysql/enterprise/monitor/mysql/tmp/mysql.sock
MySQL username: *****
MySQL password: *****

Note: The MySQL username and password can be found in the
/opt/mysql/enterprise/agent/etc/instances/mysql/agent-instance.ini file.

Aggregator Plug-In
-------------------------
Aggregator Enabled: yes
Aggregator Port: 14000

Proxy Plug-In
-------------------------
Proxy Enabled: no
Proxy Port: 6446
Backend Host: 127.0.0.1
Backend Port: 3306
Proxy User: mysql
[10 Nov 2010 21:11] Gary Whizin
See #57958. Note the workaround there in both the description and the Nov 3 comment.