ModSnmp Manual v3.07 - A. Troubleshooting

Download manual: PDF HTML

A. Troubleshooting

This section provides information on various errors that can occur when using ModSnmp, and suggests ways of tackling them.

Entry headings in quotes are messages that are displayed in ModSnmp's status bar or log output. For other entries, the heading is a description of the symptoms.

The easiest way to find a message in this section is to click on the Error Help button in the status bar (or press the F4 key), or to click on the message in the logging window (or move to the message and press the space bar).

1. SNMP

"Unknown host: XXX"

The host name that you entered could not be mapped to an IP address.

  • The address of the Host can be 'localhost' if ModSnmp and the SNMP manager are on the same machine, or can be left empty to accept requests via any network interface. Otherwise check with your System Administrator for the address of your machine.

  • Check that your DNS server is working and reachable.

"Can't listen on port YYY"

"Can't listen on interface XXX port YYY"

  • Check that the Port is not in use by any other server.

  • If ModSnmp is run under a Unix/Linux operating system by an ordinary user (not super-user) then the Port needs to be above 1023 and the SNMP manager should be configured to use that port.

  • The address of the Host can be 'localhost' if ModSnmp and the SNMP manager are on the same machine, or can be left empty to accept requests via any network interface. Otherwise check with your System Administrator for the address of your machine.

2. Modbus

2.1. General Communications

"Connection closed"

  • Check that the device is still running and listening.

"Error response: ..."

ModSnmp received an error response from the device.

  • The rest of the message says what kind of error response. See the troubleshooting entry for the rest of the message for further explanation.

  • If tracing is turned on, you can view the received message in the log output.

"Invalid data received: ..."

Data was received by ModSnmp that was unexpected or not correctly formatted as a Modbus message. The received data is discarded without further processing.

  • The rest of the message says what was wrong with the received data. See the troubleshooting entry for the rest of the message for further explanation.

  • If tracing is turned on, you can view the received data in the log output.

"Discarded: ..."

This message is displayed in the log output when data is received by ModSnmp that is unexpected or not correctly formatted as a Modbus message. The received data is discarded without further processing.

  • The rest of the message says what was wrong with the received data. See the troubleshooting entry for the rest of the message for further explanation.

  • The received data is displayed in the log output preceding the "Discarded" message.

"Unexpected"

Unexpected data was received by ModSnmp when it was about to send a request message.

  • The data may be a delayed response to an earlier request sent by ModSnmp (this should be apparent in the trace output). You may need to increase the response timeout setting if the device or the comms link is slow.

"PDU size (XXX bytes) exceeds maximum (XXX bytes)"

A received message exceeded the limit on PDU size. The message is discarded without further processing.

  • Turn on tracing to get more information.

"Error response: Illegal data address"

The device has sent an exception response indicating that the address in the command sent by ModSnmp was incorrect.

  • Check that the addresses of the Modbus variables defined in ModSnmp are consistent with the device.

  • Check that the device allows the registers/coils to be written, if you are trying to write.

"Error response: Illegal data value"

The device has sent an exception response indicating that data in the command sent by ModSnmp was incorrect.

  • Turn on tracing to get more information.

  • If you are using 32 or 64 bit values check that the Word Count setting is consistent with the device. If ModSnmp and the device disagree over how to interpret the count in the Modbus message, then the number of bytes written by ModSnmp may be different from what the device is expecting.

  • Check that the Modbus Type is consistent with the device.

"Error response: Illegal function"

The device has sent an exception response indicating that the function code in the command sent by ModSnmp is not supported.

  • Turn on tracing to see which function code is not supported.

"Error response: Server failure"

"Error response: Acknowledge"

"Error response: Server busy"

"Error response: Memory parity error"

"Error response: Error code XXX"

The device/bridge/server sent an unexpected error response.

  • Check that your device/bridge/server is functioning correctly.

"Wrong transaction ID in response: XXX instead of XXX"

The device sent a response containing a transaction ID that was different from the transaction ID that ModSnmp sent in the request. This may have occurred because the device responded late to an earlier request.

  • Turn on tracing to get more information.

  • Increase the Response Timeout if necessary.

  • Check that your device is functioning correctly.

"Wrong function code in response: XXX instead of XXX"

The device sent a response containing a function code that was different from the function code that ModSnmp sent in the request. This may have occurred because the device responded late to an earlier request.

  • Turn on tracing to get more information.

  • Increase the Response Timeout if necessary.

  • Check that your device is functioning correctly.

"Wrong slave ID in response: XXX instead of XXX"

"Wrong address in response: XXX instead of XXX"

"Wrong count in response: XXX instead of XXX"

The device sent a response that did not correctly echo the data that ModSnmp sent in the request.

  • Turn on tracing to get more information.

  • Check that your device is functioning correctly.

"Response PDU size incorrect: XXX instead of XXX"

The PDU size of a received response was not correct for the function code specified in the response. If the response included a byte count (e.g. a Read Holding Registers response) then the PDU size is inconsistent with the byte count. If the response did not include a byte count (e.g. a Write Multiple Holding Registers response), then the PDU size was not the expected fixed size.

  • Turn on tracing to get more information.

  • Check that your device is functioning correctly.

"Response PDU too short: XXX when it should be at least XXX"

The PDU size of a received response was not big enough to contain all the fields required for the function code specified in the response.

  • Turn on tracing to get more information.

  • Check that your device is functioning correctly.

"Wrong byte count in response: XXX when expecting XXX"

The byte count in the response sent by the device is not what was expected for the count that ModSnmp sent in the request.

  • Turn on tracing to get more information.

  • Check that the Modbus Size is consistent with the device.

  • Check that your device is functioning correctly.

2.2. Socket Communications

"Unknown host: XXX"

The host name that you entered could not be mapped to an IP address.

  • Check that the Host is consistent with the device.

  • Check that your DNS server is working and reachable.

"Unknown local host: XXX"

The local host name that you entered could not be mapped to an IP address.

  • Check that the local host name is correct. Leave the local host field empty if you are not sure.

  • Check that your DNS server is working and reachable.

"Can't bind to port XXX"

The socket could not be bound to the local host and port that you entered.

  • Check that the Local host corresponds to a network interface on the computer on which ModSnmp is running.

  • Check that you are permitted to use the Local port, and that it is not already being used.

"Can't connect to host 'XXX': No route to host"

The host did not respond to the TCP connection request

  • Check that the Host is consistent with the device.

  • Check that the network is working.

"Can't connect to host 'XXX' port XXX: Connection refused"

The host appears to be reachable and responding, but would not accept the TCP connection request.

  • Check that the Host and Port are consistent with the device.

  • Check that device is listening.

"UDP Port Unreachable"

It was not possible to deliver a UDP message.

  • Check that the Host and Port are consistent with the device.

  • Check that device is listening.

"Error response: No path available to target"

The server/bridge sent a response indicating that the required device was not reachable.

  • Check that the Slave ID is consistent with the device.

  • Check that your server/bridge is correctly configured for the device you are trying to reach.

"Timed out"

A request was sent to the device, but no response was received.

  • Turn on tracing to get more information.

  • Check that the Packet Type is consistent with the device. The packet type is usually TCP for a socket connection.

  • Check that the Slave ID is consistent with the device.

  • Check that Host and Port are consistent with the device. You may have sent the request to the wrong device/server!

  • If using UDP, check that the device is running/listening.

  • If you sent a broadcast request, check that the Always responds setting is consistent with the device.

"Error response: Target device failed to respond"

The server/bridge sent a response indicating that the required device did not respond.

  • Check that the Slave ID is consistent with the device.

  • Check that your server/bridge is correctly configured for the device you are trying to reach.

2.3. Serial Communications

"Serial comms not available"

Serial communications is not supported on the system you are using.

"No serial port specified"

  • You must select or enter a serial port name in the interface page.

"Can't open serial port"

The serial port could not be opened and configured correctly.

  • Check that you have selected/entered the correct serial port name.

  • On Unix/Linux systems, check that you have read and write access permission to the device file ('/dev/...').

  • Check that the port is not in use by another program.

"Can't set serial speed"

"Can't set serial data bits"

"Can't set serial stop bits"

"Can't set serial parity"

"Can't set serial RTS control"

The serial port parameter could not be set.

  • Check that the serial device supports the parameter value that you are trying to set.

"Parity error"

A parity error occurred when receiving data via the serial port.

"Framing error"

A framing error occurred when receiving data via the serial port.

"Overrun error"

An overrun error occurred when receiving data via the serial port. In other words, data was sent faster than it could be received by the machine running ModSnmp.

"Timed out"

A request was sent to the device, but no response was received.

  • Turn on tracing to get more information.

  • Check that the Packet Type is consistent with the device. The packet type is usually RTU or ASCII for a serial connection.

  • Check that the Slave ID is consistent with the device.

  • If ModSnmp and device are on same machine, check that the ports are different.

  • Check that the Speed, Parity, Data bits, Stop bits and RTS control settings are consistent with the device.

  • Check that a cable is connecting the ModSnmp and device interfaces.

  • If using RTS control: Flow control check that the cable is appropriately wired.

  • Check that no other software is using the same port.

  • If you sent a broadcast request, check that the Always responds setting is consistent with the device.

2.4. RTU Packet Type

"CRC failed"

Data received by ModSnmp failed the Cyclic Redundancy Check (CRC).

  • Turn on tracing to get more information.

  • If using serial communications, check that Speed, Parity, Data bits and Stop bits are all set correctly.

  • Try increasing the EOM Timeout setting - messages may be getting fragmented by long delays introduced by the comms link or the operating system.

"Message too short (XXX bytes)"

An RTU message must be at least 4 bytes long (1 byte for the slave ID, 1 byte for the function code, and 2 bytes for the CRC).

  • Turn on tracing to get more information.

  • If using serial communications, check that Speed, Parity, Data bits and Stop bits are all set correctly.

  • Try increasing the EOM Timeout setting - messages may be getting fragmented by long delays introduced by the comms link or the operating system.

"Message too long (> XXX bytes)"

A received message was too long to fit in ModSnmp's input buffer.

2.5. ASCII Packet Type

"No ':' at start of message"

"':' in middle of message"

"LF terminator missing"

"Invalid message length (XXX bytes) - should be odd"

"Non-hex character in message"

"Invalid LRC"

Data received by ModSnmp was not correctly formatted as an ASCII message.

"Message too short (XXX bytes)"

An ASCII message must be at least 9 bytes long.

  • Turn on tracing to get more information.

  • If using serial communications, check that Speed, Parity, Data bits and Stop bits are all set correctly.

  • Try increasing the EOM Timeout setting - messages may be getting fragmented by long delays introduced by the comms link or the operating system.

"Message too long (> XXX bytes)"

A received message was too long to fit in ModSnmp's input buffer.

2.6. TCP Packet Type

"Incomplete message: only XXX bytes"

A TCP message must be at least 8 bytes long (7 bytes for the header and 1 byte for the function code).

  • Turn on tracing to get more information.

  • Try increasing the EOM Timeout setting - messages may be getting fragmented by long delays introduced by the comms link or the operating system.

"Incorrect protocol identifier: XXX"

The protocol identifier in the received message header was not zero.

"Length (XXX) too small"

The value in the length field of the received message header must be at least 2 (1 byte for the slave ID and 1 byte for the function code).

"Incomplete message: only XXX bytes when expecting XXX"

The received message was shorter than indicated by the length field of the header.

  • Turn on tracing to get more information.

  • Try increasing the EOM Timeout setting - messages may be getting fragmented by long delays introduced by the comms link or the operating system.

2.7. Miscellaneous

Value is read from or written to address in device that is wrong but near to address in command

  • If you are using 32 or 64 bit registers, check that Word Registers setting is consistent with the device.

  • Turn on tracing to get more information.

Wrong value is displayed when reading from device, or wrong value is written to device

The 16-bit words of 32 or 64-bit values are in reverse order

  • Select/deselect Little Endian to reverse the order and make it consistent with the device.

"Not enough data in message: XXX bytes when expecting XXX"

A received message contains too little data for the count and register sizes specified in the request.

"Excess data in message: XXX bytes when expecting XXX"

A received message contains too much data for the count and register sizes specified in the request.