Bug #41148 agent installation shows error message, agent does not work
Submitted: 1 Dec 2008 12:48 Modified: 29 Jun 16:27
Reporter: Axel Schwenke
Status: Verified
Category:Monitoring: Agent Severity:S2 (Serious)
Version:2.0.0.7102, 2.0.5.7153, 2.1.0 OS:Microsoft Windows (W2KSP4 (5.00.2195), 2000)
Assigned to: MEM Agent Devs Target Version:
Tags: mem_platforms, platforms, build
Triage: Needs Triage: D1 (Critical)

[1 Dec 2008 12:48] Axel Schwenke
Description:
Agent installation pops up a error window:

Problem running post-install step. Installation may not complete correctly
...

The agent does not start. No logs, no details. agent.ini looks like not processed
completely. No instance config. Will attach screenshot of the error message and a zip of
the agent install dir.

How to repeat:
run mysqlmonitoragent-2.0.0.7102-windows-installer.exe in W2KSP4

Suggested fix:
Make it work :)

Installer should write a log to make troubleshooting easier.
[1 Dec 2008 12:50] Axel Schwenke
the error message

Attachment: errormessage.png (image/png, text), 7.36 KiB.

[1 Dec 2008 12:51] Axel Schwenke
agent install dir with bin/* and uninstall.exe removed

Attachment: agent-without-bin.zip (application/zip, text), 100.94 KiB.

[1 Dec 2008 13:07] Axel Schwenke
error message for mysql-monitor-agent --version

Attachment: error2.png (image/png, text), 23.54 KiB.

[1 Dec 2008 13:11] Axel Schwenke
complete list of files in agent install dir

Attachment: installdir.files (application/octet-stream, text), 2.78 KiB.

[1 Dec 2008 13:13] Axel Schwenke
While trying to execute the agent, I get an error message that MSVCR90.dll is missing.
This dll is located in the Microsoft.VC90.CRT subdir in bin. Copying msvcr90.dll to bin
leads to another message (see error2.png)
[2 Dec 2008 18:16] Mark Matthews
From http://msdn.microsoft.com/en-us/library/ms738520(VS.85).aspx:

Support for getaddrinfo on older versions of Windows

The getaddrinfo function was added to the Ws2_32.dll on Windows XP and later.

To execute an application that uses this function on earlier versions of Windows (Windows
2000, Windows NT, and Windows Me/98/95), then you need to include the Ws2tcpip.h and
Wspiapi.h files. When the Wspiapi.h include file is added, the getaddrinfo function is
defined to the WspiapiGetAddrInfo inline function in the Wspiapi.h file. At runtime, the
WspiapiGetAddrInfo function is implemented in such a way that if the Ws2_32.dll or the
Wship6.dll (the file containing getaddrinfo in the IPv6 Technology Preview for Windows
2000) does not include getaddrinfo, then a version of getaddrinfo is implemented inline
based on code in the Wspiapi.h header file. This inline code will be used on older
Windows platforms that do not natively support the getaddrinfo function.
[3 Feb 10:26] Mickael Besson
If this operation solves the problem (temporarily, waiting for a new version), could you
describe precisely the different actions to lead ?

Thank you.

FI : I'm working on v2.0.3.7134
[30 Apr 9:40] Andrii Nikitin
Put back to verified since same problem with 2.0.5.7153
[12 May 11:54] Oli Sennhauser
Hi guys,

Any update on this (needs triage)?

Two customers (issues) are affected.

Regards,
Oli
[14 May 14:25] Carsten Segieth
installing 2.0.6.7158 the installer log in %TEMP% shows:

...
Unpacking C:\Program Files\MySQL\Enterprise\Agent\licenses\glib-2.16.3-LICENSE
Executing C:\Program Files\MySQL\Enterprise\Agent/bin/mysql-monitor-agent
Script exit code: 1

Script output:

Script stderr:
2009-05-14 14:10:08: (critical) loading module 'C:\Program
Files\MySQL\Enterprise\Agent\bin\agent.dll' failed: The specified procedure could not be
found.
2009-05-14 14:10:08: (critical) setting --plugin-dir=<dir> might help
2009-05-14 14:10:08: (critical) shutting down normally

Error running C:\Program Files\MySQL\Enterprise\Agent/bin/mysql-monitor-agent
--defaults-file=C:\PROGRA~1\MySQL\ENTERP~1\Agent\etc\mysql-monitor-agent.ini
--plugins=agent --agent-generate-uuid=true : 2009-05-14 14:10:08: (critical) loading
module 'C:\Program Files\MySQL\Enterprise\Agent\bin\agent.dll' failed: The specified
procedure could not be found.
2009-05-14 14:10:08: (critical) setting --plugin-dir=<dir> might help
2009-05-14 14:10:08: (critical) shutting down normally
Error running C:\Program Files\MySQL\Enterprise\Agent/bin/mysql-monitor-agent
--defaults-file=C:\PROGRA~1\MySQL\ENTERP~1\Agent\etc\mysql-monitor-agent.ini
--plugins=agent --agent-generate-uuid=true : 2009-05-14 14:10:08: (critical) loading
module 'C:\Program Files\MySQL\Enterprise\Agent\bin\agent.dll' failed: The specified
procedure could not be found.
2009-05-14 14:10:08: (critical) setting --plugin-dir=<dir> might help
2009-05-14 14:10:08: (critical) shutting down normally
Problem running post-install step. Installation may not complete correctly
 Error running C:\Program Files\MySQL\Enterprise\Agent/bin/mysql-monitor-agent
--defaults-file=C:\PROGRA~1\MySQL\ENTERP~1\Agent\etc\mysql-monitor-agent.ini
--plugins=agent --agent-generate-uuid=true : 2009-05-14 14:10:08: (critical) loading
module 'C:\Program Files\MySQL\Enterprise\Agent\bin\agent.dll' failed: The specified
procedure could not be found.
2009-05-14 14:10:08: (critical) setting --plugin-dir=<dir> might help
2009-05-14 14:10:08: (critical) shutting down normally
Creating Uninstaller
Creating uninstaller 25%
...

and the agent shows a similar message when trying to get it's version after install:

qauser@vbox-ua-1-vm3 /cygdrive/c/Program Files/MySQL/Enterprise/Agent/bin
$ ./mysql-monitor-agent.exe --version
mysql-proxy 0.7.0
  glib2: 2.16.3
  proxy: 0.7.0
  monitor: 0.7.0
2009-05-14 14:16:46: (critical) loading module 'c:\Program
Files\MySQL\Enterprise\Agent\bin\agent.dll' failed: The specified procedure could not be
found.
2009-05-14 14:16:46: (critical) setting --plugin-dir=<dir> might help
[26 Jun 15:10] Jan Kneschke
Carsten,

please verify that the original issue as seen in the png is fixed. If yes, please close
the bug.

If the agent still can't be started due to other problems, open a new bug.
[29 Jun 16:27] Carsten Segieth
Jan,

the issue still exists in build 2.1.0.1067 in the same way as described in the original
problem description. For a clean install this installer shows exact the same message box
as uploaded by Axel on Dec 1, 2008.

When the MSVC*90*.dlls are present in the /bin dir - by mistake I didn't remove these
'hand copied files' after an uninstall before installing new - the message box shown
during install shows the problem "(critical) loading module '[...]\agent.dll' failed: The
specified procedure could not be found." as described in my note from May 14, 2009.
[8 Jul 18:10] Enterprise Tools JIRA Robot
Kay Roepke writes: 
I believe this is related to what we had to do for Proxy 0.7.2 on Windows.
The fix should be the same.