Bart,

Thanks again. You have been most helpful. I am sure that I am not the first
to go thru the pain of the nuiances between Net-SNMP on Linux vs. Windows.
I know I am late to the SNMP party, but I do appreciate your help. In
summary on the Windows challenges:

Agent.dll is not usable on Windows without the 2008 distributables SP1 patch

 agent code fails without the “use IO::Socket” and gives you the following
error:

netsnmp_assert GetLastError() != 10093L failed ..\..\snmplib\winpipe.c:46
netsnmp_assert GetLastError() != 10093L failed ..\..\snmplib\winpipe.c:46
select: No such file or directory

and lastly, the following code is required on Windows:
use NetSNMP::default_store (':all');
use NetSNMP::agent::default_store (':all');

[ ... ]

netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET,
"tcp:localhost:705");

when you see this erorr:
agent.pl
Warning: Failed to connect to the agentx master agent ([NIL]):
Warning: Failed to connect to the agentx master agent ([NIL]):

Thank you again Bart...

Cheers

From: [email protected] [mailto:[email protected]] On Behalf
Of Bart Van Assche
Sent: Monday, March 15, 2010 1:09 AM
To: [email protected]
Cc: [email protected]
Subject: Re: Failed to connect to agentx master agent ([NIL])

On Sun, Mar 14, 2010 at 6:37 PM, <[email protected]> wrote:

While using the sample agent code in the Perl NetSNMP::agent POD page, I am
getting the following error message on Windows 2008 Server:

c:\temp\agent.pl
Warning: Failed to connect to the agentx master agent ([NIL]):
Warning: Failed to connect to the agentx master agent ([NIL]):

This same code, unmodified, runs perfectly on Linux. I have read the
FAQ, googled, etc. I added tcp port 705 to my Windows Firewall
configuration (jic). I have started the agent by hand with -x tcp:localhost
-Dagentx, as well as with the appropriate conf settings, and I get the same
results. 

c:\usr\bin\snmpd -f -L -c c:\usr\share\snmp\snmpd.conf -x localhost:705
-Dagentx
registered debug token agentx, 1
agentx_register_app_config_handler: registering .conf token for
"agentxsocket"
agentx_register_app_config_handler: registering .conf token for
"agentxperms"
agentx_register_app_config_handler: registering .conf token for
"agentxRetries"
agentx_register_app_config_handler: registering .conf token for
"agentxTimeout"
Turning on AgentX master support.
agentx/config: port spec: tcp:localhost:705
agentx/master: initializing...
agentx/master: initializing... DONE
NET-SNMP version 5.5

Have you already tried to add the following statements in the Perl script
that implements the AgentX subagent implementation:

use NetSNMP::default_store (':all');
use NetSNMP::agent::default_store (':all');

[ ... ]

netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET,
"tcp:localhost:705");

Bart.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to