C H A P T E R  4

Troubleshooting

The Sun SNMP Management Agent has been designed so that it can provide full SNMP capabilities without further need for complex configuration. This chapter provides additional information should you experience problems using the agent.

The chapter contains the following sections:


Problems Starting or Accessing the Agent

If the agent does not appear to start, ensure that you are the root user before proceeding.


procedure icon  To Check Whether the Agent is Running

1. Type;:


# ps -ef | grep snmpd

2. Look for a line of the form:


root 29394 	1 0	Feb 18 ?	4:11 /opt/SUNWsmasf/sbin/snmpd

If no such line appears, the agent is not running.

3. Attempt to start the agent with the command:


# /etc/init.d/masfd start

4. Again, confirm whether the agent is now running. If the agent continues not to run, refer to the file /var/adm/messages.

Use your preferred editor to review the messages at the end of the file. Messages from the SNMP agent have the form:


date time  hostname snmpd[pid]: [ID id daemon.type] Text

where:

When reviewing the entries in the log file, make sure you confirm that the messages you are reviewing did result from the attempt to start the agent. If you are in any doubt, review the file before starting the agent and identify the date and time of the last message. After attempting to start the agent, locate this same message and review messages following it.

The most likely reason for the agent being unable to start is that it cannot access the network ports that it requires. The ports used by the agent are specified in the configuration file. Such a problem can be recognized by a message of the form:


date time  hostname snmpd[pid]: [ID id daemon.type] Error opening specified endpoint "udp:portno"

where portno is the port specified in the configuration file.

If this message appears, identify why the port is not available. Use netstat -a to show all ports being accessed. If the port is not available, modify the configuration file to select a different port using an entry of the form:


agentaddress newport

If the error appears again for a port that is available, confirm you are running the agent as root and that you have permission to access the specified port.

If the management applications/clients cannot access agent, onfirm the agent has started (see To Check Whether the Agent is Running).


procedure icon  To Confirm the Agent has Started

1. From a client that is unable to access the agent using SNMP, use ping to make sure that the host running the SNMP agent is accessible over the network.

If the ping fails, you need to address the underlying network connectivity issues.

2. Make sure that the client has the necessary access permissions for the SNMP agent. If you are using SNMPv1 or SNMPv2c, make sure that the community string specified by the client is the string expected by the agent.

If you are using SNMPv3, make sure that passwords for authentication have been correctly specified.


Failure to Receive Traps

The most likely reason for not receiving traps is failure to specify the trap destination for the SNMP agent. Confirm which version of trap the management application is expecting then look at the file /etc/opt/SUNWmasf/conf/snmpd.conf. For an SNMPv1 trap, there must be a line of the form:


trapsink <hostname>

where <hostname> is either the name of the host or the IP address of the destination. For an SNMPv2 trap, the entry should read:


trap2sink <hostname>

From the system running the SNMP agent, use ping to confirm that the chosen destination can be accessed over the network:


# ping <hostname>

If the ping fails, it is necessary to confirm network connectivity before taking any further steps.

If traps are still not received, confirm whether the management application is able to receive traps. If the management application has received traps from other hosts, no further action is necessary to confirm this. However, if this is the first time the management application has been used to receive traps, confirm that it is correctly listening for SNMP traps on port 162 or other appropriate port. As this is a low port number, the application that is to receive traps must run with root privileges. If the application is running, use netstat to confirm that it is listening:


UDP: IPv3
    Local Address           Remote Address    State
------------------------ ------------------ --------
       *.162                                   Idle

Remember, traps are not sent continuously and are sent only in the following circumstances:

The agent sends traps for all value changes except those that change rapidly, such as voltage readings, fan tachometers and temperature. For these kinds of environmental sensors, traps are sent only when thresholds are crossed.

If you are not sure if a trap has been sent, stop and restart the agent to generate cold start traps using:


# /etc/init.d/masfd stop

followed by:


# /etc/init.d/masfd start