Re: Failed to connect to the agentx master agent
Noppadol Sotanakul <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, I found something strange on SuSE11. The Net-SNMP that comes with SuSE11 is 5.4.2.1 which is the same version as I used to develop my program. After I started the snmpd, I run command 'netstat -a | grep master'. What I got from the command is unix 2 [ ACC ] STREAM LISTENING 996085 /var/run/agentx/master It seemed that the snmpd is listening at /var/run/agentx/master. However, I'm quite sure that my program uses /var/agentx/master (in file net-snmp-config.h, there is #define NETSNMP_AGENTX_SOCKET "/var/agentx/master". So, it should not work but after I started my program there was a message 'NET-SNMP version 5.4.2.1 AgentX subagent connected' and my program worked!!! Then I run the command 'netstat -a | grep master' again and This is what I see unix 2 [ ACC ] STREAM LISTENING 996085 /var/run/agentx/master unix 3 [ ] STREAM CONNECTED 996240 /var/run/agentx/master Do you have any ideas about this? Thanks & regards, Nop. ________________________________ From: Noppadol Sotanakul <[email protected]> To: Dave Shield <[email protected]> Cc: [email protected] Sent: Tue, February 15, 2011 5:16:34 PM Subject: Re: Failed to connect to the agentx master agent Hello, I've added -x /var/agentx/master when I started snmpd and it worked !!! Thank you very much for your help and very quick response. Regards, Nop. ________________________________ From: Dave Shield <[email protected]> To: Noppadol Sotanakul <[email protected]> Cc: [email protected] Sent: Tue, February 15, 2011 5:04:31 PM Subject: Re: Failed to connect to the agentx master agent On 15 February 2011 09:47, Noppadol Sotanakul <[email protected]> wrote: >> Which ports is the master agent listening on? >> Compare the list of ports for the 5.3.0.1 agent, >> with the list of ports for the other agents. >> >> Normally, you'd expect the agent to be listening on >> TCP port 705 and/or the named socket '/var/agentx/master' > > > This is what I get when I run netstat -a | more > > Active UNIX domain sockets (servers and established) > unix 2 [ ACC ] STREAM LISTENING 253125 /var/run/agentx/master So the agent is listening on /var/run/agentx/master rather than /var/agentx/master. This is a more sensible location within the Linux File System framework (which is probably why SuSE use it) but is different to the "standard" location. Try running the master agent using the option -x /var/agentx/master or configuring your subagent to connect to /var/run/agentx/master Basically, the two sides need to use the same socket. What this socket actually is, doesn't really matter - as long as they agree. Dave ________________________________ Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ 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