Error opennms.service Failed

Problem:
Trying to get Opennms installed on Ubuntu Server 20. Using this article;
(Installation and configuration)

When configuring the binding to ports and restarting the service it fails to start . When I rerun

/usr/share/opennms/bin/install -dis

The output of the error is below.

Expected outcome:
[Resolve issue

OpenNMS version:
29.0.10-1

Other relevant data:
[e.g. logs from OpenNMS, error messages etc]

logs from SystemCTL

nmis9 opennms[1955]: /usr/share/opennms/etc/configured does not exist.
nmis9 opennms[1955]: You need to run the installer to set up the database.  In most
nmis9 opennms[1955]: cases, it is enough to run:
nmis9 opennms[1955]:   /usr/share/opennms/bin/install -dis
nmis9 opennms[1955]: For details, see the install guide at:
nmis9 opennms[1955]: http://www.opennms.org/index.php/QuickStart#Initialize_OpenNMS_and_the_Database

nmis9 opennms[1752]: failed
nmis9 systemd[1]: opennms.service: Control process exited, code=exited, status=1/FAILURE
nmis9 systemd[1]: opennms.service: Failed with result 'exit-code'.
nmis9 systemd[1]: Failed to start OpenNMS server.




Logs of Running Install -dis
Configures PostgreSQL tables, users, and other miscellaneous settings.

java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.opennms.bootstrap.Bootstrap$4.run(Bootstrap.java:531)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: Could not unmarshal org.opennms.netmgt.config.opennmsDataSources.DataSourceConfiguration
        at org.opennms.core.db.DataSourceConfigurationFactory.<init>(DataSourceConfigurationFactory.java:68)
        at org.opennms.install.Installer.install(Installer.java:163)
        at org.opennms.install.Installer.main(Installer.java:987)
        ... 6 more
Caused by: org.opennms.core.xml.MarshallingResourceFailureException: Failed to marshal/unmarshal XML file while unmarshalling an object (DataSourceConfiguration): javax.xml.bind.UnmarshalException
 - with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 17; The reference to entity "H" must end with the ';' delimiter.]; nested exception is javax.xml.bind.UnmarshalException
 - with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 17; The reference to entity "H" must end with the ';' delimiter.]
        at org.opennms.core.xml.MarshallingExceptionTranslator.translate(MarshallingExceptionTranslator.java:61)
        at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:281)
        at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:209)
        at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:205)
        at org.opennms.core.db.DataSourceConfigurationFactory.<init>(DataSourceConfigurationFactory.java:66)
        ... 8 more
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 17; The reference to entity "H" must end with the ';' delimiter.]
        at org.eclipse.persistence.jaxb.JAXBUnmarshaller.handleXMLMarshalException(JAXBUnmarshaller.java:980)
        at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:303)
        at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:276)
        ... 11 more
Caused by: Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 17; The reference to entity "H" must end with the ';' delimiter.
        at org.eclipse.persistence.exceptions.XMLMarshalException.unmarshalException(XMLMarshalException.java:114)
        at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.convertSAXException(SAXUnmarshaller.java:999)
        at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:496)
        at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:695)
        at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:655)
        at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:301)
        ... 12 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 17; The reference to entity "H" must end with the ';' delimiter.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at java.xml/org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
        at org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:221)
        at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:492)
        ... 15 more

You have a structural XML error in your opennms-datasources.xml

1 Like