Troubleshooting the SNMP Agent on Windows

 

The following is a collection of errors and solutions for the SNMP Agent on a Windows operating system.

Important! In some instances, output from SNMP tools refers to notifications as traps.

Error at Start-up of CSPAgent and CSPEventManager

You get error messages at start-up of CSPAgent.exe or CSPEventManager.exe. Refer to the following example output.

InitSubagent() connect successful

InsertIOData:bad parameter (at line 245 in file common.c)

fd=-1, buf=00341a40, n=292 (at line 246 in file common.c)

Connect trap successfully sent

InsertIOData:bad parameter (at line 245 in file common.c)

fd=-1, but=00345900, n=376 (at line 246 in file common.c)

Resolution

Go to Control Panel®Administrative Tools®Services and start SNMP EMANATE Master Agent and SNMP EMANATE Adapter. These two services should start automatically at reboot. If Windows cannot locate them, you must ensure the following:

The files are in your installation directory, which by default is C:\Program Files\Cantata\SNMP\srconf\bin.

The location indicated in the registry under System/CurrentControlSet/Services/msnsa matches the path of the msnaagt.exe file.

The location indicated in the registry under System/CurrentControlSet/Services/SNMPDM matches the path of the snmpdm.exe file.

If the files are not listed, try reinstalling the SNMP Agent.

Error at Start-up of traprcv.exe

If you receive these errors, it is an indicator that another process may be trying to read the SNMP notification port. Refer to the following example output.

traprcv: bind: No error

traprcv: bind: No error

traprcv: bind: No error

traprcv: bind: No error

traprcv: bind: No error

Waiting for traps.

ParseType, past end of packet.

at line 797 in file prse_pkt.c

process_trap: Error parsing packet

at line 351 in file traprcv.c

ParseType, past end of packet.

Resolution

Stop any process running, such as SNMPc, HP OpenView, or SNMP Trap Service.

To start, Traprcv.exe needs the files mrg.cnf and snmpinfo.dat in your installation directory, which by default is C:\Program Files\Cantata\SNMP\srconf\mgr. Make sure that they are installed correctly.

The installation should have set the environment variable SR_MGR_CONF_DIR to the installation directory. Make sure that the variable is listed.

No Traps at Start-up of Agent

If you do not receive any notifications after starting up the CSP Agent.exe, the reasons could be as follows:

You did not reboot your system after you installed the SNMP Agent.

The environment variables are not set correctly.

Resolution

Try to reboot your system.

Check that the environment variables are set correctly and point to your installation directory.

SR_MGR_CONF_DIR

SR_AGT_CONF_DIR

Check the file c:\temp\snmpd.log. The file contains warnings or errors from a routine called ProcessConfigRecord in the snmpdm process. The warnings or errors from that routine refer to problems in snmpd.cnf. Line numbers map back to snmpd.cnf. See the following example:

From snmpd.log:

ProcessConfigRecord: Error, incomplete entry at line 13

at line 772 in file scanfile.c

ProcessConfigRecord: Error, incomplete entry at line 18

at line 772 in file scanfile.c

ProcessConfigRecord: Error, incomplete entry at line 23

at line 772 in file scanfile.c

From snmpd.cnf, which is found in the directory: C:\Program Files\Cantata\SNMP\srconf\agt:

# Entry type: sysLocation

# Entry format: octetString

line 13: sysLocation ""

# Entry type: sysContact

# Entry format: octetString

line 18: sysContact ""

# Entry type: sysName

# Entry format: octetString

line 23: sysName ""

Important! snmpd.cnf must be a writable file.

To fix errors, put text between quotation marks.

LongPathToShortPath Error

You may encounter the following error during the SNMP installation, in particular, after the choose destination location window opens:

Resolution

To resolve this issue, delete the environment variables:

SR_AGT_CONF_DIR

SR_BIN_CONF_DIR

SR_MGR_CONF_DIR

Next, restart the SNMP installation cspSNMP.exe.