Re: Traphandle (TraptoEmail) Not working properly (read: Permission denied ???)
"Nikos Balkanas" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <000901c98236$57b7d4c0$02b2a8c0@tardis> |
First with your prior question: snmptrapd (-Le) will log to stderr. snmpd (-Lf) will log to a file. Use (-Le) to get to standard error. What is traptoemail? Script? Binary? The only other reason I can think of for running from the shell and not from snmptrapd is from environment values. I suspect that the error you are getting has nothing to do with permissions, but is something else. Can you post your /etc/snmp/snmptrapd.conf? Which OS? Compiled latest net-snmp or using package? BR, Nikos ----- Original Message ----- From: "Antonio Guerra" <[email protected]> To: "Nikos Balkanas" <[email protected]> Cc: <[email protected]> Sent: Thursday, January 29, 2009 4:21 PM Subject: Re: Traphandle (TraptoEmail) Not working properly (read: Permission denied ???) > If I do the following it works: > # less /var/log/snmptrapd.log | /usr/bin/traptoemail [email protected] > > So is definitely not the script, so what do you think might be wrong > with my snmptrapd daemon? > > How do I check what dependencies am I might be missing... > > Or better yet why can't I fork the program to run in the foreground? > > On Wed, Jan 28, 2009 at 9:25 AM, Nikos Balkanas <[email protected]> > wrote: >> I presume that TraptoEmail works if run from the shell. Right? >> >> BR, >> Nikos >> ----- Original Message ----- From: "Antonio Guerra" >> <[email protected]> >> To: "Dave Shield" <[email protected]> >> Cc: <[email protected]> >> Sent: Wednesday, January 28, 2009 2:42 PM >> Subject: Re: Traphandle (TraptoEmail) Not working properly (read: >> Permission >> denied ???) >> >> >>> Dave, >>> >>> Any thoughts on the issue below? I seem to be stuck between a rock and >>> a hard place. It logs to file, but its not logging to the screen. >>> Traphandles and Traptoemail are still not working. >>> >>> >>> On Tue, Jan 27, 2009 at 10:55 AM, Antonio Guerra >>> <[email protected]> wrote: >>>> >>>> Dave, >>>> >>>> Opened two shell windows. One running the forked daemon, the other >>>> generating traps. >>>> >>>> I don't see anything happening on the forked window when sending >>>> traps. As you can see below the process is running with the flags you >>>> recommended: >>>> >>>> # ps -ef | egrep snmp >>>> root 21750 21510 0 10:49 ? 00:00:00 /usr/sbin/snmptrapd -f >>>> -Le -Dsnmptrapd -Cc /etc/snmp/snmptrapd.conf >>>> root 21764 1 0 10:49 ? 00:00:00 /usr/sbin/snmpd -Lf >>>> /var/log/snmpd.log -p /var/run/snmpd.pid -a >>>> >>>> >>>> On Tue, Jan 27, 2009 at 10:42 AM, Dave Shield >>>> <[email protected]> wrote: >>>>> >>>>> 2009/1/27 Antonio Guerra <[email protected]>: >>>>>> >>>>>> When I try running that command, the process hangs. >>>>> >>>>> Are you sure it's not simply waiting to receive a trap? >>>>> Those options will run the trap receiver as a normal >>>>> command, rather than forking it off into the background >>>>> (which is the normal operation of a daemon). >>>>> >>>>> Start the trap daemon in one window or shell command. >>>>> Then send the trap in a different window. >>>>> You should see things happening in the trapd window. >>>>> >>>>> Dave >>>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by: >>> SourcForge Community >>> SourceForge wants to tell your story. >>> http://p.sf.net/sfu/sf-spreadtheword >>> _______________________________________________ >>> 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 >> >> ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ 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