-
1. Re: SNMP Adaptor on Linux
peterj Feb 19, 2010 11:34 AM (in response to mleite)Is SELinux running on the RHEL box? If so, disable it and try again. You might also try stopping the firewall, sometimes even when you allow all traffic things can be blocked. -
2. Re: SNMP Adaptor on Linux
mleite Feb 19, 2010 11:52 AM (in response to peterj)Hi Peter, thanks for your reply.
I did what you have suggested, but it still does not work.
Any more ideas?
Cheers, ML
-
3. Re: SNMP Adaptor on Linux
peterj Feb 19, 2010 12:01 PM (in response to mleite)Do you know which port is used by SNMP? If so, ssh to the RHEL box and run (assuming port 161):
telnet snmp-host-name 161
If the connection is refused, then there is a network issue (possibly with a switch) and you will have to talk with the network admin.
If the above telnet doesn't work, thry pinginmg and telnetting from the RHEL box to other locations, that might give a clue as to the cause.
Finally, is there some kind of configuration in the SNMP server that allows/blocks network access?
-
4. Re: SNMP Adaptor on Linux
dmlloyd Feb 19, 2010 12:02 PM (in response to peterj)SNMP generally uses UDP, not TCP, so telnet won't do the job. Netcat might do better, though there's no guarantee that you'll get an ICMP refusal message if communications fail - more likely the packets will just disappear. -
5. Re: SNMP Adaptor on Linux
mleite Feb 19, 2010 2:03 PM (in response to dmlloyd)Hello men...
Thanks you both ...
Peter, the SNMP Server Port is 162
Running the Telnet command you suggested, i really get the message "connection refused", but this same message is showed if i run the command from my dev machine, the one where i am able to send TRAPs do the SNMP server.
Ping commands run properly from RHEL Box, even to the SNMP Server.
This SNMP Server is a simple test server, that is, a simple Win machine running the Net-SNMP Trap Handler.
Regarding to allows/blocks network access, this server is completely opened.
David, i am using the WireShark to watch the messages arriving in server. Using the tool you suggested, i tried:
nc <ip_address> <port>. This command has no answer, but i can see the request arriving in server through Wireshark and a response (like a connection refused) being sent back to the RHEL Box.
But if i use the parameter -u (UDP), i can connect no the SNMP server and send messages, it appears in Wireshark.As i am still working on the module development, i configured the managers.xml to send the TRAPs to 2 servers. One is that one i said and the other is the TrapdService. The TRAP is seen in logs generated by TrapdService, but does not appear in SNMP Server.
If you have any other ideas!
Thanks in advance, ML -
6. Re: SNMP Adaptor on Linux
dimitris Feb 23, 2010 6:56 AM (in response to mleite)I suppose you have changed the default ports? AFAIR it sends the traps to 1162 (not 162)
<manager> <address>localhost</address> <port>1162</port> <local-address></local-address> <local-port></local-port> <version>1</version> </manager>
-
7. Re: SNMP Adaptor on Linux
mleite Feb 23, 2010 5:18 PM (in response to dimitris)Hello men...
Solution: It was not related to firewall, ports or something like that. Because JBoss by default starts binding the services to 127.0.0.1, i was starting it using 0.0.0.0 to bind to all interfaces and allow remote access. This idea works for MacOSx and Win, but does not work for RHEL Box.
To put the SNMP TRAP sending to work i have started JBoss binding services to RHEL Box ip address.
Now it is working fine.
Thanks, cheers.
ML
-
8. Re: SNMP Adaptor on Linux
peterj Feb 23, 2010 5:35 PM (in response to mleite)In that case you might want to check that your /etc/hosts file is properly configured. I have found this page to be helpful: