You have installed OpenNMS Horizon on a Debian/Ubuntu system. Initializing the database was successful, OpenJDK 11 JDK is installed and was set with
runjava -s. Starting OpenNMS with
systemctl start opennms fails. This is a current issue documented in NMS-10693.
journalctl -u opennms to get the error output of the service. You will see the following output:
root@ubuntu:~# journalctl -u opennms -- Logs begin at Wed 2018-12-12 11:30:32 UTC, end at Fri 2019-05-10 09:52:52 UTC. -- May 10 09:15:03 ubuntu systemd: Starting LSB: OpenNMS - Open Source Network Management System... May 10 09:15:03 ubuntu opennms: $JAVA_HOME is not set. Set it in /etc/default/opennms or run `/usr/share/opennms/bin/runjava -s` to autoconfigure. May 10 09:15:03 ubuntu systemd: opennms.service: Control process exited, code=exited status=1 May 10 09:15:03 ubuntu systemd: opennms.service: Failed with result 'exit-code'. May 10 09:15:03 ubuntu systemd: Failed to start LSB: OpenNMS - Open Source Network Management System.
/usr/share/opennms/bin/runjava -s doesn’t solve the problem.
The init script reads the JAVA_HOME variable from
/etc/default/opennms and ignores the Java configuration from
/usr/share/opennms/etc/java.conf. To get the service started, set the JAVA_HOME variable in
/etc/default/opennmsas the following:
# Get the Java configuration set by runjava -s cat /usr/share/opennms/etc/java.conf /usr/lib/jvm/java-11-openjdk-amd64/bin/java
Set the JAVA_HOME path in
/etc/default/opennms as the following:
echo "JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64" >> /etc/default/opennms
Start the service with
systemctl start opennms.