1

OpenNMS thinks SDK 10.0.2 is not newer then 1.0.8 Help!

Starting OpenNMS: runjava: /usr/java/jdk-10.0.2/bin/java is not Java 1.8 or newer.

Aug 17 08:05:37 localhost.localdomain opennms[12690]: runjava: error: bad version or vendor for configured Java runtime environment

Aug 17 08:05:37 localhost.localdomain opennms[12690]: runjava: "/usr/java/jdk-10.0.2/bin/java -version" does not report that is version 1.8+ and a compatible JDK.

Aug 17 08:05:37 localhost.localdomain opennms[12690]: runjava: run "/opt/opennms/bin/runjava -s" to setup java.conf

Aug 17 08:05:37 localhost.localdomain opennms[12690]: Unknown value return from doStatus: 1

Aug 17 08:05:37 localhost.localdomain opennms[12690]: [FAILED]

Aug 17 08:05:37 localhost.localdomain systemd[1]: opennms.service: control process exited, code=exited status=1

Aug 17 08:05:37 localhost.localdomain systemd[1]: Failed to start OpenNMS server.

-- Subject: Unit opennms.service has failed -- Defined-By: systemd

[root@localhost bin]# runjava -s

runjava: Looking for an appropriate JRE...

runjava: Checking for an appropriate JRE in JAVA_HOME...

runjava: /usr/java/jdk-10.0.2/bin/java is not Java 1.8 or newer.

runjava: "/usr/java/jdk-10.0.2/bin/java" is not an appropriate JRE

runjava: Checking JRE in user's path: "/bin/java"...

runjava: /bin/java is not Java 1.8 or newer.

runjava: did not find an appropriate JRE in user's path: "/bin/java"

runjava: searching for a good JRE...

WARNING: unsure how to handle Java version output: java version "10.0.2" 2018-07-17

runjava: found a good JRE in "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre/bin/java"

runjava: value of "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre/bin/java" stored in configuration file

  • What is your question? Please read https://stackoverflow.com/help/how-to-ask on asking good questions in SO and try to add some more details to your question. – Capricorn Aug 17 '18 at 14:30

2 Answers2

1

It is currently just possible to run OpenNMS Horizon with Java 8. You can set a specific JDK instead of detecting one using ${OPENNMS_HOME}/bin/runjava -s path/to/jdk or modifying the path to the java binary in the configuration file ${OPENNMS_HOME}/etc/java.conf.

indigo
  • 338
  • 1
  • 9
0

I installed OpenNMS 1.3 on my Linux Ubuntu 18LTS, but it didn't finish install and the service didn't start because OpenJDK was being used (OpenJDK was already installed in the system). It seems that only Java8 is supported.

In order to get it working, I installed Java8 JDK in a non default directory, then modified '/usr/share/opennms/bin/runjava' (set JB="/path_to_java8/java", and added this path inside /usr/share/opennms/etc/java.conf. Only after those changes, '/usr/share/opennms/bin/install -dis' did run successfully .

The last step, before enabling the opennms service, is setting the JAVA_PATH variable in '/etc/default/opennms' .

freeAR
  • 943
  • 3
  • 18
  • 32