Details
-
Bug
-
Status: Resolved (View Workflow)
-
Blocker
-
Resolution: Fixed
-
Meridian-2015.1.3, 18.0.3, Meridian-2016.1.4
-
Security Level: Default (Default Security Scheme)
-
Horizon - April 5
Description
On certain environments, specially on those versions of OpenNMS when you have to explicitly enable 18980 on opennms.conf to access JMX from any IP interface, you won't be able to run the snmp-request to perform snmpwalks using SNMP4J. The reason is because this script will use everything defined in opennms.conf which is not necessarily useful for command line tools like this one.
You might see a variety of errors, for example:
Using SNMP4J from: /opt/opennms/lib/snmp4j-2.4.3.jar Using log4j-over-slf4j from: /opt/opennms/lib/log4j-over-slf4j-1.7.21.jar Using SLF4J API from: /opt/opennms/lib/slf4j-api-1.7.21.jar Error: Password file not found: /usr/java/jdk1.8.0_60/jre/lib/management/jmxremote.password
Using SNMP4J from: /opt/opennms/lib/snmp4j-2.4.3.jar Using log4j-over-slf4j from: /opt/opennms/lib/log4j-over-slf4j-1.7.21.jar Using SLF4J API from: /opt/opennms/lib/slf4j-api-1.7.21.jar Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 18980; nested exception is: java.net.BindException: Address already in use
Using SNMP4J from: /opt/opennms/lib/snmp4j-2.4.3.jar Using log4j-over-slf4j from: /opt/opennms/lib/log4j-over-slf4j-1.7.21.jar Using SLF4J API from: /opt/opennms/lib/slf4j-api-1.7.21.jar ERROR: transport error 202: bind failed: Address already in use ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
I suggest to avoid load opennms.conf inside this script (and maybe other CLI tools in /opt/opennms/bin