Hi,

I've got no idea how your system is setup up, but try the following to
get some insight into the problem;

01. Locate libnetsnmpagent.so.5 (or another version of
    libnetsnmpagent.so) on your system.

02. If you have a different version of libnetsnmpagent.so, you might
    have mixed net-snmp versions. You could try making a symbolic link. 

03. Try:
ldd ./mysubagent
This prints the shared library dependencies of ./mysubagent

If libnetsnmpagent.so.5 is in a different directory as the other (found)
libraries, then you might have to add that directory your
LD_LIBRARY_PATH or make a symbolic link from a 'known' directory to
libnetsnmpagent.so.5

Sorry, if the above doesn't help. I'm out of ideas.

Cheers, Birgit


On Fri, Feb 10, 2006 at 05:05:19PM +0530, vishakha s wrote:
> Hi
> 
> Thanks for your help .
> I issued the following command
> 
> net-snmp-config --compile-subagent dot1dBridge.c
> It displayed the following details
> 
> generating the tmporary code file: netsnmptmp.2024.c
> void            init_dot1dBridge(void);
> checking for init_dot1dBridge in dot1dBridge.c
> init_dot1dBridge(void)
> running: gcc  -g -O2 -Dlinux  -I. -I/usr/local/include -o mysubagent
> netsnmptmp.
> 024.c
>  dot1dBridge.c  -L/usr/local/lib -lnetsnmpagent -lnetsnmpmibs -lnetsnmphel
> ers -lnetsnmp -ldl -lcrypto -lelf -lm
> removing the tmporary code file: netsnmptmp.2024.c
> subagent program mysubagent created
> 
> 
> But when I run ./mysubagent ,It gives following error
> 
> ./mysubagent: error while loading shared libraries: libnetsnmpagent.so.5:
> cannot
> open shared object file: Error 40
> 
> What may be the Problem ??
> 
> Thanks a lot in advance
> 
> with regards
> Vishakha
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Dave
> Shield
> Sent: Friday, February 10, 2006 3:51 PM
> To: vishakha s
> Cc: [email protected]
> Subject: RE: Masteragent & subagent Communication
> 
> 
> On Fri, 2006-02-10 at 15:29 +0530, vishakha s wrote:
> 
> 
> > When i run ./netstat -apn|grep 705 its is displaying the following details
> >
> > tcp   0 0 10.9.10.195:705     0.0.0.0:*       LISTEN    2323/snmpd
> >
> > I guess i am on the right track now .
> 
> Yup.   That's looking good.
> 
> 
> 
> > Can you please help me out further as
> > to how to configure a subagent
> 
> You've told the master agent where to listen for connections.
> Now you've got to tell the subagent the same thing.
> (There's no possibility of communication if the two sides
>  don't agree where to meet!)
> 
> 
> You haven't said anything about how you are coding your
> subagent, but I'm assuming that you're using the subagent
> framework generated by "net-snmp-config --compile-subagent",
> or from the on-line tutorial.
> 
> Try adding the code:
> 
>      netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,
>                            NETSNMP_DS_AGENT_X_SOCKET,
>                            "10.9.10.195:705");
> 
> 
> Note that all of this is covered in the FAQ entry:
>       How can I run AgentX with a different socket address?
> 
> Dave

-- 
-- Birgit Arkesteijn, [EMAIL PROTECTED],
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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