2008/7/22 :
> Hi all,
>
> I am trying to add the snmpd to the inittab
>
> smd:2345:respawn:/usr/local/sbin/snmpd -f > /var/temp/log/snmpd.log 2>&1
>
> and it is ran normally. The problem is when i try to run my subagent it
> doesn't succeed in connecting and sends me a message:
>
> Warning: Failed to connect to the agentx master agent ([NIL])
>
> What I dont understand, is that when i run the snmpd in comman line (snmpd
> -f) and i run my subagent, it connects normally and everythg works fine, but
> when i add it to the inittab, it seems that the default socket isn't found
> anymore


If you are running it from inittab don't specify do not fork (IE lose
the -f) - I suspect as you've told it not to fork its terminating
immediately.

Also I'd suggest pointing it to the config file you want it to use in
the inittab command line and either ensure the MIBDIR and MIBS
variables are specified prior to kicking snmpd off or add them in to
the command line.

You might find more joy using a startup script and placing it in the
relevant rc#.d directory (or what ever the equiv is for your
OS/distribution).



--
Richard Horton
Users are like a virus: Each causing a thousand tiny crises until the
host finally dies.
http://www.solstans.co.uk - Solstans Japanese Bobtails and Norwegian Forest Cats
http://www.pbase.com/arimus - My online photogallery

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.p...r_id=100&url=/
_______________________________________________
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/...net-snmp-users