Web UI is not accessible with HTTP ERROR 503 after upgrade


You have upgraded your OpenNMS Horizon to latest major version and when you try to access the Web UI you get the following error message:



You will find the following type of exceptions in your ${OPENNMS_HOME}/logs/web.log

2019-04-30 10:36:18,088 WARN  [Main] o.e.j.s.h.C.opennms: Unexpected exception while starting Karaf
java.lang.RuntimeException: Could not resolve mvn:org.apache.felix/org.apache.felix.framework/5.6.10
2019-04-30 10:36:26,735 WARN  [Main] o.e.j.w.WebAppContext: Failed startup of context o.e.j.w.WebAppContext@2e1a8ddc{opennms,/opennms,file:///opt/opennms/jetty-webapps/opennms/,UNAVAILABLE}{/opt/opennms/jetty-webapps/opennms}
javax.servlet.ServletException: Bundle context attribute [org.osgi.framework.BundleContext] not set in servlet context

The problem here might be a broken configuration upgrade or the Karaf configuration files are not merged correctly. The web application is started but Karaf can’t be started.

You can check what configuration files have changed by running the config-diff.sh tool:

cd ${OPENNMS_HOME}/bin
./config-diff.sh -d

It will show you the differences between your running configuration and a factory default configuration.


Check the following configuration files if they appear in the config-diff.sh output. If you haven’t made any modifications yourself, use the ones from ${OPENNMS_HOME}/share/etc-pristine directory:


Start OpenNMS Horizon with systemctl start opennms.

thanks a lot.
I got the same issue but I dont understand the solution. do I have to copy that files in somewhere?
could you clarify more please?
thanks again.

[edit] I have copied thoses files and worked again the UI. thanks again.

1 Like

Depending on your operating system your OPENNMS_HOME is on CentOS /opt/opennms and on Ubuntu/Debian /usr/share/opennms. You will find untouched clean configuration files which will work with your current installed version in ${OPENNMS_HOME}/share/etc-pristine. To fix this problem make a backup of the files above and overwrite them from ${OPENNMS_HOME}/share/etc-pristine directory.

Hi Ronny,

Currently having this issue. Running on CENTOS 7. My /opt/opennms/share/etc-pristine is empty.

Can I pull the the “pristine” files from elsewhere?

Thanks for your help.


Yes you can, https://github.com/opennms/opennms-etc-pristine. For each version and distribution (rpm/debian) you have branch.