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.
Hi Peter, thanks for your reply.
I did what you have suggested, but it still does not work.
Any more ideas?
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?
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.
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
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>
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.