Geocoder Issue after upgrading to Version: 24.1.0

PROBLEM:

Geocoder not working on 24.1.0. Found this on web.log:

2019-06-17 10:51:54,672 WARN  [FelixStartLevel] o.o.c.s.s.OnmsOSGiBridgeActivator: OnmsOSGiBridgeActivator: Unable to find class used by exported OSGi service
java.lang.ClassNotFoundException: org.opennms.features.geocoder.GeocoderServiceManager
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_131]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_131]
        at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814) ~[?:1.8.0_131]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_131]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_131]
        at java.lang.Class.forName(Class.java:264) ~[?:1.8.0_131]
        at org.opennms.core.soa.support.OnmsOSGiBridgeActivator.findClasses(OnmsOSGiBridgeActivator.java:214) ~[org.opennms.core.soa-24.1.0.jar:?]
        at org.opennms.core.soa.support.OnmsOSGiBridgeActivator.registerWithOnmsRegistry(OnmsOSGiBridgeActivator.java:171) [org.opennms.core.soa-24.1.0.jar:?]
        at org.opennms.core.soa.support.OnmsOSGiBridgeActivator.serviceChanged(OnmsOSGiBridgeActivator.java:136) [org.opennms.core.soa-24.1.0.jar:?]
        at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.Felix.registerService(Felix.java:3587) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:476) [!/:1.10.1]
        at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:193) [!/:1.10.1]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:739) [!/:1.10.1]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:415) [!/:1.10.1]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278) [!/:1.10.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:299) [!/:1.10.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:268) [!/:1.10.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:264) [!/:1.10.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:254) [!/:1.10.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500) [!/:1.10.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433) [!/:1.10.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725) [!/:1.10.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463) [!/:1.10.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422) [!/:1.10.1]
        at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) [org.apache.felix.framework-5.6.12.jar:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131

What could it be?

Thanks!

Can you give us a little bit more details? What is your OS? Was it a fresh install or an update?

1 Like

Hi,
My OS is Linux ( Debian 9) and this is not a fresh install , this is an update from ver 23. Some additional details here:

OpenNMS Version: 24.1.0
Home Directory: /usr/share/opennms
RRD store by group enabled? False
RRD store by foreign source enabled? False
Reports directory: /var/lib/opennms/reports
Jetty HTTP host: Unspecified
Jetty HTTP port: 8980
Jetty HTTPS host: Unspecified
Jetty HTTPS port: Unspecified
SNMP trap port: 162
Syslog port: 10514

Java Version: 1.8.0_131 Oracle Corporation
Java Virtual Machine: 25.131-b11 Oracle Corporation
Operating System: Linux 4.9.0-8-amd64 (amd64)
OSGi Container: Apache Karaf 4.2.3
Servlet Container: jetty/9.4.18.v20190429 (Servlet Spec 3.1)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36

Thanks for your help

Did you review this section of the 24.x release notes? https://docs.opennms.org/opennms/releases/latest/releasenotes/releasenotes.html#_geocoder_services

Geocoder Services

The Geocoder Services have been reworked and must be re-configured. The recommended way for this is to delete all etc/org.opennms.features.geocoder*.cfg files and Navigate the Configure Geocoder Services page from the Admin page and configure the Geocoder Service of your choice.

2 Likes

Hi, sorry for the late response. I did, yes with no avail :sleepy:

Can you verify, that your etc/custom.properties matches this file: https://github.com/OpenNMS/opennms-etc-pristine/blob/pristine/debian/24.1.0/etc/custom.properties

1 Like

Yes. it does match. Also I just tried with this script config-diff.sh to see if it gives any clue and here are the results:

./config-diff.sh -d

Compare running configuration with pristine configuration

Running config path : …/etc
Pristine config path: …/share/etc-pristine

Configuration files only in /opt/opennms/etc

Only in …/etc: configured
Only in …/etc: dashboard-config.xml
Only in …/etc: database-schema.xml
Only in …/etc/datacollection: BEGEMOT-PF-MIB.xml
Only in …/etc/datacollection: MIMOSA-NETWORKS-BFIVE-MIB.xml
Only in …/etc: default-foreign-source.xml
Only in …/etc/events: AlarmChangeNotifierEvents.xml
Only in …/etc/events: MIMOSA-NETWORKS-BASE-MIB.events.xml
Only in …/etc/events: opennms.ncs-component.events.xml
Only in …/etc: examples
Only in …/etc: foreign-sources
Only in …/etc: host.key
Only in …/etc: imports
Only in …/etc: include
Only in …/etc: java.conf
Only in …/etc: jmx.acl.org.apache.camel.cfg
Only in …/etc: libraries.properties
Only in …/etc: opennms.conf
Only in …/etc: opennms-server.xml
Only in …/etc: opennms-upgrade-status.properties
Only in …/etc: org.apache.karaf.command.acl.features.cfg
Only in …/etc: org.apache.karaf.command.acl.osgi.cfg
Only in …/etc: org.apache.karaf.features.obr.cfg
Only in …/etc: org.opennms.features.datachoices.cfg
Only in …/etc: org.opennms.features.geocoder.cfg
Only in …/etc: org.opennms.features.geocoder.mapquest.cfg
Only in …/etc: org.opennms.features.topology.plugin.ncs.cfg
Only in …/etc: pluginManifestData.xml
Only in …/etc/snmp-graph.properties.d: BEGEMOT-PF-MIB-graph.properties
Only in …/etc/snmp-graph.properties.d: MIMOSA-NETWORKS-BFIVE-MIB-graph.properties

Configuration files modified by the user

Files …/etc/config.properties and …/share/etc-pristine/config.properties differ
Files …/etc/destinationPaths.xml and …/share/etc-pristine/destinationPaths.xml differ
Files …/etc/discovery-configuration.xml and …/share/etc-pristine/discovery-configuration.xml differ
Files …/etc/javamail-configuration.properties and …/share/etc-pristine/javamail-configuration.properties differ
Files …/etc/ksc-performance-reports.xml and …/share/etc-pristine/ksc-performance-reports.xml differ
Files …/etc/notifd-configuration.xml and …/share/etc-pristine/notifd-configuration.xml differ
Files …/etc/opennms.properties and …/share/etc-pristine/opennms.properties differ
Files …/etc/poller-configuration.xml and …/share/etc-pristine/poller-configuration.xml differ
Files …/etc/poll-outages.xml and …/share/etc-pristine/poll-outages.xml differ
Files …/etc/service-configuration.xml and …/share/etc-pristine/service-configuration.xml differ
Files …/etc/snmp-config.xml and …/share/etc-pristine/snmp-config.xml differ
Files …/etc/users.xml and …/share/etc-pristine/users.xml differ

Configuration only in /opt/opennms/share/etc-pristine

Thanks again!

I am not sure, what is causing this.

Probably not the cause, but just in case: Did you delete your ${OPENNMS_HOME}/data directory after your upgrade?

If so, can you provide the output of the following karaf commands?

admin@opennms> health:check
admin@opennms> list -t 0 | grep -iv active
admin@opennms> list -t 0 | grep -i geocoder
admin@opennms> imports | grep -i ^org.opennms.features.geocoder
admin@opennms> exports | grep -i geocoder

Can you also do a find ${OPENNMS_HOME} -iname "*geocoder*jar"?

1 Like

Hi , mvrueden .

Thanks a lof for your help. Here’s the requested info:

Did you delete your ${OPENNMS_HOME}/data directory after your upgrade?
A= No. I can do it now if advisable.

If so, can you provide the output of the following karaf commands?

admin@opennms> health:check
Verifying the health of the container
Verifying installed bundles [ Success ]
Connecting to ElasticSearch ReST API (Flows) [ Timeout ] => Health Check did not finish within 5000 ms
=> Oh no, something is wrong
admin@opennms> list -t 0 | grep -iv active
START LEVEL 100 , List Threshold: 0
ID β”‚ State β”‚ Lvl β”‚ Version β”‚ Name
────┼──────────┼─────┼─────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
34 β”‚ Resolved β”‚ 80 β”‚ 4.2.3 β”‚ Apache Karaf :: Diagnostic :: Boot
95 β”‚ Resolved β”‚ 80 β”‚ 24.1.0 β”‚ OpenNMS :: Features :: Vaadin :: Theme :: Dashboard, Hosts: 94
115 β”‚ Resolved β”‚ 80 β”‚ 24.1.0 β”‚ OpenNMS :: Features :: Vaadin :: Theme :: JMX Configuration Generator, Hosts: 94
118 β”‚ Resolved β”‚ 80 β”‚ 24.1.0 β”‚ OpenNMS :: Features :: Vaadin :: Theme :: Default, Hosts: 94
280 β”‚ Resolved β”‚ 80 β”‚ 24.1.0 β”‚ OpenNMS :: Features :: Topology :: Default Theme, Hosts: 94
admin@opennms> list -t 0 | grep -i geocoder
231 β”‚ Active β”‚ 80 β”‚ 24.1.0 β”‚ OpenNMS :: Features :: Geocoder :: API
232 β”‚ Active β”‚ 100 β”‚ 24.1.0 β”‚ OpenNMS :: Features :: Geocoder :: Google
233 β”‚ Active β”‚ 100 β”‚ 24.1.0 β”‚ OpenNMS :: Features :: Geocoder :: MapQuest
234 β”‚ Active β”‚ 100 β”‚ 24.1.0 β”‚ OpenNMS :: Features :: Geocoder :: Nominatim
235 β”‚ Active β”‚ 80 β”‚ 24.1.0 β”‚ OpenNMS :: Features :: Geocoder :: Rest
236 β”‚ Active β”‚ 80 β”‚ 24.1.0 β”‚ OpenNMS :: Features :: Geocoder :: Service
admin@opennms> imports | grep -i ^org.opennms.features.geocoder
org.opennms.features.geocoder.rest β”‚ β”‚ β”‚ 235 β”‚ org.opennms.features.geocoder.rest
org.opennms.features.geocoder β”‚ [24.1.0,25.0.0) β”‚ β”‚ 232 β”‚ org.opennms.features.geocoder.google
org.opennms.features.geocoder β”‚ [24.1.0,25.0.0) β”‚ β”‚ 233 β”‚ org.opennms.features.geocoder.mapquest
org.opennms.features.geocoder β”‚ [24.1.0,25.0.0) β”‚ β”‚ 234 β”‚ org.opennms.features.geocoder.nominatim
org.opennms.features.geocoder β”‚ [24.1.0,25.0.0) β”‚ β”‚ 235 β”‚ org.opennms.features.geocoder.rest
org.opennms.features.geocoder β”‚ [24.1.0,25.0.0) β”‚ β”‚ 236 β”‚ org.opennms.features.geocoder.service
org.opennms.features.geocoder β”‚ [24.1.0,25.0.0) β”‚ β”‚ 238 β”‚ org.opennms.features.geolocation.services
admin@opennms> exports | grep -i geocoder
org.opennms.features.geocoder.google β”‚ 24.1.0 β”‚ 232 β”‚ org.opennms.features.geocoder.google
org.opennms.features.geocoder.mapquest β”‚ 24.1.0 β”‚ 233 β”‚ org.opennms.features.geocoder.mapquest
org.opennms.features.geocoder.nominatim β”‚ 24.1.0 β”‚ 234 β”‚ org.opennms.features.geocoder.nominatim
org.opennms.features.geocoder.rest β”‚ 24.1.0 β”‚ 235 β”‚ org.opennms.features.geocoder.rest
org.opennms.features.geocoder.service β”‚ 24.1.0 β”‚ 236 β”‚ org.opennms.features.geocoder.service
org.opennms.features.geocoder β”‚ 24.1.0 β”‚ 231 β”‚ org.opennms.features.geocoder.api

Can you also do a find ${OPENNMS_HOME} -iname "*geocoder*jar"?

find /usr/share/opennms/ -iname β€œgeocoderjar”
/usr/share/opennms/system/org/opennms/features/geocoder/org.opennms.features.geocoder.nominatim/24.1.0/org.opennms.features.geocoder.nominatim-24.1.0.jar
/usr/share/opennms/system/org/opennms/features/geocoder/org.opennms.features.geocoder.service/24.1.0/org.opennms.features.geocoder.service-24.1.0.jar
/usr/share/opennms/system/org/opennms/features/geocoder/org.opennms.features.geocoder.api/24.1.0/org.opennms.features.geocoder.api-24.1.0.jar
/usr/share/opennms/system/org/opennms/features/geocoder/org.opennms.features.geocoder.mapquest/24.1.0/org.opennms.features.geocoder.mapquest-24.1.0.jar
/usr/share/opennms/system/org/opennms/features/geocoder/org.opennms.features.geocoder.google/24.1.0/org.opennms.features.geocoder.google-24.1.0.jar
/usr/share/opennms/system/org/opennms/features/geocoder/org.opennms.features.geocoder.rest/24.1.0/org.opennms.features.geocoder.rest-24.1.0.jar

Kind regards!