C H A P T E R  3

Troubleshooting

The Sun SNMP Management Agent provides full SNMP capabilities without further need for complex configuration. This chapter provides additional information if you experience problems using the agent.

Be sure to read the current software release notes document for the latest information about requirements and known issues that might be related to any problems you are experiencing.


Problems Starting or Accessing the Agent

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

procedure icon  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 a text 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:

    • date is the date when the message was created.

    • time is the time of the message.

    • hostname shows the host where the message was created.

    • pid is the process ID of the process that resulted in the message.

    • id is an identifier.

    • type indicates the type of message, which is error, info, or warning, depending on the nature of the problem being reported.

    When reviewing the entries in the log file, ensure that the messages 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 the messages following it.

    The most common reason for the agent not starting is that it cannot access the network ports that it requires. The ports used by the agent are specified in the configuration file. This 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 the netstat -a command 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 port is available or the error continues to appear for a port that is available, confirm you are running the agent as the root user and that you have permission to access the specified port. Also, look in the /etc/opt/SUNWmasf/conf directory. Only one configuration file, either snmpd.0.conf or snmpd.conf, should exist in that directory. If there is more than one file, remove one.

    If the management applications and clients cannot access the agent, confirm the agent has started.

procedure icon  Confirm the Agent Has Started

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

    If the ping command fails, address the underlying network connectivity issues.

  2. Ensure that the client has the correct access permissions for the SNMP agent by doing one of the following:

    • If you are using SNMPv1 or SNMPv2c, ensure that the community string specified by the client is the string expected by the agent.

    • If you are using SNMPv3, ensure that passwords for authentication have been correctly specified.


Failure to Receive Traps

The most common 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, and 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 community dest-port

Where:

For an SNMPv2 trap, the entry should read:


trap2sink hostname community dest-port

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


# ping hostname

If the ping command fails, confirm network connectivity before taking any further steps.

If traps are still not received, confirm whether the management application can receive traps. If the management application has received traps from other hosts, no further action is necessary. However, if this is the first time the management application has received traps, confirm that it is correctly listening for SNMP traps on port 162 or another specified port. As port 162 is a low port number, the application receiving traps must run with root privileges. If the application is running, use the netstat command 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 the following commands:


# /etc/init.d/masfd stop
# /etc/init.d/masfd start