FAQ:Applications 04

From Net-SNMP Wiki
Revision as of 15:19, 28 December 2006 by Dts12 (Talk | contribs) (Move FAQ text to a template page & 5.4 release synchronisation)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Why doesn't the agent respond?

Assuming that the tests outlined in the previous entry indicate that the problem lies with the agent not responding, the obvious question is "why not".

Again, there are two basic possibilities - either the agent never sees the request, or it receives it but is unwilling (or unable) to process it. If the remote system is running the Net-SNMP agent, then the easiest way to distinguish between these two cases is to shut down the agent, and re-start it manually using the options

             -f -Le -d

Then send the same query as before. This should display raw dumps of packets seen (or sent) by the agent, just as with the client side in the previous entry.


If the agent does not display anything, then it is simply not receiving the requests. This may be because they are being blocked by network or local firewall settings (iptables -L), or the agent may not be listening on the expected interfaces (netstat -a).

This is most commonly encountered when running queries from a remote host, particularly if the same request succeeds when run on the same system as the agent itself.


If the agent displays a dump of the incoming request, but nothing going out, then the most likely cause is access control settings. See the relevant entries in the AGENT section for details. Note that if the agent receives an SNMPv1 or SNMPv2c request with a unknown community string, then it will not return an error response - the request is simply discarded.

Another possibility is that the request may be rejected by settings in /etc/hosts.{allow,deny}. Again, '-d' will display an incoming packet dump but no corresponding outgoing response. However in this situation, the agent should also log a message that the request is being refused.


Running the agent with '-d' can also help identify situations where the agent is responding to the request, but only after a long delay. This would be indicated by a series of incoming packet dumps (showing various retries from the client side), followed by several outgoing dumps - possibly long after the client tool has given up in disgust.
See the entry The agent worked for a while, then stopped responding. Why? later in this section.

   FAQ:Applications
   
  1. How do I add a MIB?
  2. How do I add a MIB to the tools?
  3. Why can't I see anything from the agent?
  4. Why doesn't the agent respond?
  5. I can see the system group, but nothing else. Why?
  6. Why can't I see values in the <ENTERPRISE> tree?
  7. The agent worked for a while, then stopped responding. Why?
  8. Requesting an object fails with "Unknown Object Identifier" Why?
  9. Why do I get "noSuchName" when asking for "sysUpTime" (or similar)?
  10. Why do I sometimes get "End of MIB" when walking a tree, and sometimes not?
  11. How do I use SNMPv3?
  12. Why can't I set any variables in the MIB?
  13. Variables seem to disappear when I try to set them. Why?
  14. Why can't I change sysLocation (or sysContact)?
  15. I get an error when trying to set a negative value - why?
  16. I get an error when trying to query a string-indexed table value - why?
  17. How should I specify string-index table values?
  18. How do I send traps and notifications?
  19. How do I receive traps and notifications?
  20. How do I receive SNNMPv1 traps?
  21. Why don't I receive incoming traps?
  22. My traphandler script doesn't work when run like this - why not?
  23. How can the agent receive traps and notifications?
  24. How big can an SNMP request (or reply) be?
  25. How can I monitor my systems (disk, memory, etc)?
  26. Applications complain about entries in your example 'snmp.conf' file. Why?
  27. OK, what should I put in snmp.conf?
  28. How do I specify IPv6 addresses in tools command line arguments?