OpenNMS service Error after upgrade

We are using Markdown syntax here. Logs and code snippets should always be surrounded with three back-ticks to get proper formatting.
If you need help with Markdown see here.
This textblock can be removed before creating a new post.

Problem:
We are upgrading our OpenNMS horizon instance from 29.0.3 to 29.0.4 and after upgrade our service is not coming into running state.

Expected outcome:
we want our opennms service to be up and running.

OpenNMS version:
horizon 29.0.4
Other relevant data:

systemctl restart opennms.service
Job for opennms.service failed because the control process exited with error code.
See “systemctl status opennms.service” and “journalctl -xe” for details.

logs

systemctl status opennms.service
● opennms.service - OpenNMS server
Loaded: loaded (/usr/lib/systemd/system/opennms.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2022-01-12 12:02:41 IST; 29s ago
Process: 6094 ExecStart=/etc/init.d/opennms -s start (code=exited, status=1/FAILURE)
Jan 12 12:02:41 x.x.x.x opennms[6094]: /opt/opennms/etc/configured does not exist.
Jan 12 12:02:41 x.x.x.x opennms[6094]: You need to run the installer to set up the database. In most
Jan 12 12:02:41 x.x.x.x opennms[6094]: cases, it is enough to run:
Jan 12 12:02:41 x.x.x.x opennms[6094]: /opt/opennms/bin/install -dis
Jan 12 12:02:41 x.x.x.x opennms[6094]: For details, see the install guide at:
Jan 12 12:02:41 x.x.x.x opennms[6094]: http://www.opennms.org/index.php/QuickStart#Initialize_OpenNMS_and_the_Database
Jan 12 12:02:41 x.x.x.x opennms[6094]: [FAILED]
Jan 12 12:02:41 x.x.x.x systemd[1]: opennms.service: Control process exited, code=exited status=1
Jan 12 12:02:41 x.x.x.x systemd[1]: opennms.service: Failed with result 'exit-code'.
Jan 12 12:02:41 x.x.x.x systemd[1]: Failed to start OpenNMS server.
Jan 12 12:02:41 x.x.x.x opennms[6094]: /opt/opennms/etc/configured does not exist.
Jan 12 12:02:41 x.x.x.x opennms[6094]: You need to run the installer to set up the database. In most
Jan 12 12:02:41 x.x.x.x opennms[6094]: cases, it is enough to run:
Jan 12 12:02:41 x.x.x.x opennms[6094]: **/opt/opennms/bin/install -dis**

Hi Dino,
i have tried all mentioned ways to mitigate these errors however no luck yet to make opennms service up and running, not sure what exactly need to be done.
Moreover, i didn’t find any documentation for opennms horizon/minion upgrade instruction over Welcome to the Horizon Documentation, if there is any information about it kindly assist us into this as well.

Thanks,
Brijesh

Run /opt/opennms/bin/install -dis

if it outputs an error, share that here.

because opennms is damaged when doing an operating system update in centos 8, that is to say, doing “yum update”.
As if the Java version generated by the update would damage opennms.
Has it happened to anyone else?

The java version is stored in $OPENNMS_HOME/etc/java.conf. If the Java version changes due to a package upgrade, the path stored in java.conf is no longer valid. If you upgrade java, you must re-run $OPENNMS_HOME/bin/runjava -s to fix the Java path stored in java.conf.

Alternately, you can set the Java path to a symbolically linked path that doesn’t change during minor upgrades, e.g. on RHEL-family you can use $OPENNMS_HOME/bin/runjava -S /usr/lib/jvm/jre-11-openjdk/bin/java (note the capital -S)

we are getting below error after upgrade to horizon 29.0.9 version.

journalctl -xe

May 04 15:57:51 sudo[10165]: pam_unix(sudo:session): session opened for user opennms by root(uid=0)
May 04 15:57:51 sudo[10165]: pam_unix(sudo:session): session closed for user opennms
May 04 15:58:01 systemd[1]: Starting OpenNMS server…
– Subject: Unit opennms.service has begun start-up
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit opennms.service has begun starting up.
May 04 15:58:02 opennms[10278]: Starting OpenNMS:
May 04 15:58:02 opennms[10278]: WARNING! You have files that end in .rpmnew in your
May 04 15:58:02 opennms[10278]: OPENNMS_HOME (/opt/opennms) directory.
May 04 15:58:02 opennms[10278]: The format of the original files may have changed since
May 04 15:58:02 opennms[10278]: you modified them before installing a new version.
May 04 15:58:02 opennms[10278]: Please double-check that your configuration files are
May 04 15:58:02 opennms[10278]: up-to-date and delete any leftover .rpmnew files or
May 04 15:58:02 opennms[10278]: OpenNMS will not start.
May 04 15:58:02 opennms[10278]: [FAILED]
May 04 15:58:02 systemd[1]: opennms.service: Control process exited, code=exited status=1
May 04 15:58:02 systemd[1]: opennms.service: Failed with result ‘exit-code’.
– Subject: Unit failed
– Defined-By: systemd
– Support: https://access.redhat.com/support

– The unit opennms.service has entered the ‘failed’ state with result ‘exit-code’.
May 04 15:58:02 systemd[1]: Failed to start OpenNMS server.
– Subject: Unit opennms.service has failed
– Defined-By: systemd
– Support: https://access.redhat.com/support

– Unit opennms.service has failed.

– The result is failed.

You have files that end in .rpmnew in your $OPENNMS_HOME (/opt/opennms) directory. The format of the original files may have changed since you modified them before installing a new version. Please double-check that your configuration files are up-to-date and delete any leftover .rpmnew files or OpenNMS will not start.

1 Like

Yes, we have removed the .rpmnew files and our upgrade become successful after that. thanks for the help.