Failed to connect to agentx master agent

[email protected]
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello ,

I am running the agent as a Agentx configuration
snmpd    --- Master Agent
myAgent --- subAgent

But each time i try to run it i get message "Failed to connect to agentX master agent(localhost:706)

Following are the configuration related to agentx in /usr/local/share/snmp/snmpd.conf

#########################################
master                agentx
AgentXSocket      tcp:localhost:706
#########################################

I am running the snmpd(master) as
/usr/local/sbin/snmpd -c /usr/local/share/snmpsnmpd.conf -X tcp:localhost:706

In the subagent main() method i have added
	if (agentx_subagent) 
	{
		netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, 
				NETSNMP_DS_AGENT_ROLE, 1);
		/*
		 * AGENTX_ADDRESS is initialized to default port for AgentX.
		 */
		netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,
				NETSNMP_DS_AGENT_X_SOCKET, "localhost:706");

		syslog(LOG_INFO, "Agent starting as AgentX Subagent.");
	}

But when i run the subagent it gives me error as:
Warning: Failed  to connect to agentX master agent(localhost:706):
Warning: Failed  to connect to agentX master agent(localhost:706):

Please could u provide me some hint whats the problem in this case.


Thanks
Gaurav

--
Guess 1st innings score. Win 1 Lakh* Rupees.
SMS RUN<Your Score> to 8888. 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.