Welcome to Questions - Ask OpenNMS, where you can ask questions and receive answers from other members of the community.

JMX (OPENNMS-JVM) monitoring/provisioning not working [closed]

0 votes
194 views

Hi all,

Following Detector doesn´t work in my configuration:

<detector name="OpenNMS-JVM" class="org.opennms.netmgt.provision.detector.jmx.Jsr160Detector">
         <parameter key="factory" value="PASSWORD-CLEAR"/>
         <parameter key="username" value="admin"/>
         <parameter key="port" value="18980"/>
         <parameter key="password" value="admin"/>
         <parameter key="ipMatch" value="x.x.x.x"/>
         <parameter key="urlPath" value="/jmxrmi"/>
         <parameter key="retries" value="2"/>
         <parameter key="type" value="default"/>
         <parameter key="protocol" value="rmi"/>
         <parameter key="timeout" value="3000"/>
      </detector>

Here are some additional informations:

https://docs.opennms.org/opennms/releases/latest/releasenotes/releasenotes.html

JMX Updates: JMX is no longer enabled by default on port 18980. If you have reason to access your OpenNMS instance remotely over JMX, you can reenable it by adding -Dcom.sun.management.jmxremote.port=18980 and -Dcom.sun.management.jmxremote.ssl=false to ADDITIONAL_MANAGER_OPTIONS
in $OPENNMS_HOME/etc/opennms.conf. Note that OpenNMS-JVM monitoring of the local instance (ie, localhost) will still work by using the JMX Access API,
without needing to enable the TCP port.

 

########## jmx-config.xml ########## 

 <?xml version="1.0"?>
<jmx-config>
    <mbean-server ipAddress="x.x.x.x" port="18980">
        <parameter key="protocol" value="rmi"/>
        <parameter key="urlPath" value="/jmxrmi"/>
        <parameter key="factory" value="PASSWORD-CLEAR"/>
        <parameter key="username" value="admin"/>
        <parameter key="password" value="admin"/>
    </mbean-server>
</jmx-config>

##########  opennms.conf ##########

START_TIMEOUT=0
JAVA_HEAP_SIZE=2048
ADDITIONAL_MANAGER_OPTIONS=-d64
ADDITIONAL_MANAGER_OPTIONS="-Xms"$JAVA_HEAP_SIZE"m -XX:+UseParallelGC"
ADDITIONAL_MANAGER_OPTIONS="-Dcom.sun.management.jmxremote.port=18980"
ADDITIONAL_MANAGER_OPTIONS="-Dcom.sun.management.jmxremote.ssl=false"
MAXIMUM_FILE_DESCRIPTORS=409600

########## provisiond.log ########## 

provisiond.log:2017-01-06 10:56:54,888 INFO  [scanExecutor-9] o.o.n.p.d.j.JMXDetector: isServiceDetected: OpenNMS-JVM: Checking address: x.x.x.x for capability on port 18980
provisiond.log:2017-01-06 10:56:54,939 INFO  [scanExecutor-9] o.o.n.p.d.j.JMXDetector: isServiceDetected: OpenNMS-JVM: Unable to connect to address: x.x.x.x  port 18980, attempt #0
provisiond.log:2017-01-06 10:56:54,965 INFO  [scanExecutor-9] o.o.n.p.d.j.JMXDetector: isServiceDetected: OpenNMS-JVM: Unable to connect to address: x.x.x.x  port 18980, attempt #1
provisiond.log:2017-01-06 10:56:54,967 INFO  [scanExecutor-9] o.o.n.p.s.IpInterfaceScan: Attempted to detect service OpenNMS-JVM on address x.x.x.x : false
provisiond.log:2017-01-06 10:57:29,753 INFO  [scanExecutor-5] o.o.n.p.s.IpInterfaceScan: Attemping to detect service OpenNMS-JVM on address x.x.x.x

Any ideas what I´m doing wrong?
Thanks in advance

Best regards,
Thorben

OpenNMS version
closed with the note: Fixed
asked Jan 6 by Pennywise (540 points)
closed Jan 9 by Pennywise
Additional Info

I got this message during startup:

[root@ssh ~]# /etc/init.d/opennms -v start
Starting OpenNMS: Could not connect to the OpenNMS JVM (OpenNMS might not be running or could be starting up or shutting down): Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
        java.net.ConnectException: Connection refused (Connection refused)]

Best regards,
Thorben
Hey! You're still ONMS user! I'm very happy!
Hi Marcel! Yes, of course. I ´ll try to implement OpenNMS in my new company. It´s hard, because we need a very detailed Java Monitoring, and my experiences concerning java are not so good ;-) So I´ll check if OpenNMS could be an alternative..... Have a nice day.
...