thanks for your help.
And please see my answer below.

-----Original Message-----
From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf 
Of Dave Shield
Sent: 2009年7月8日 15:36
To: XIANG Lei
Cc: net-snmp-users@lists.sourceforge.net; net-snmp-cod...@lists.sourceforge.net
Subject: Re: error msg: No support for requested transport domain "tcp"

2009/7/7 XIANG Lei <lei.xi...@alcatel-sbell.com.cn>:
>    I met a problem in the recent use of net-snmp, the version is 5.2.0.

Is this a version you compiled yourself, or a vendor-supplied one?
In either case - more details would be useful.
   Also note that 5.2.0 is a relatively old version, and is not even the
most recent (or reliable) on the 5.2.x line.   We would advise that you
upgrade to a more recent version

<XIANG>Yes, it's a version I compiled before, and I'll try 5.2.4 later. 
But this problem just comes out sometimes, so I'd like to figure out the reason 
why this happen.

>         Sometimes, I can not send trap after my subagent is working, I 
> found something in the trace.
>
>         No support for requested transport domain "tcp"
>         Error: Failed to connect to the agentx master agent: Unknown 
> host (Inappropriate ioctl for device)snmp_shutdown
>
>         I configure agentx with unix domain socket

How did you configure AgentX?    Because it looks suspiciously as if your
subagent is trying to use a TCP-based connection.
<XIANG>my configuration:
1. for snmpd 
    AgentXSocket unix:/var/snmpdagentx
    master agentx

2. for subagent
    I configure it in the code:
    netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1)
    netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,NETSNMP_DS_AGENT_X_SOCKET, 
"unix:/var/snmpdagentx");

It may well be that the Net-SNMP library was not configured with TCP support, 
or that the location of the master agent is not correct.
<XIANG>what did you mean by "the Net-SNMP library was not configured with TCP 
support"? You mean I didn't compile the libs with the TCP support?
And the location of the master agent? I start the master with the same cmd 
every time, it should be no problem with that.
I checked the source code, I found that netsnmp_tdomain_register should be 
called before calling netsnmp_tdomain_transport in _sess_open,
or it will print such error. And after the failure of connecting to the agentx 
master agent, it should wait 15 seconds to connect the master again.
So the traps sent before the connection is reconnected would be discarded.
Please see the attached log. I can not figure out why this happen.

And another question:
If I try to stop subagent, should I call snmp_shutdown and then shutdown_agent 
to release the res, just like we do in snmpd.c?
and if not, potential problem might happen?

Thanks.

More details of your exact configuration would definitely be useful.

Dave

Attachment: log
Description: log

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to