Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9068

opennms.conf can break the snmp-request command

    Details

    • Sprint:
      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

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: