The DA or DC may not be initialized due to karaf failure after upgrade or after removal of karaf data directory
Symptoms:
2019-04-08 22:57:57,106 | WARN | Event Dispatcher | AetherBasedResolver | mvn.internal.AetherBasedResolver 583 | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.3 | | Error resolving artifactcom.ca.im:data-mgmt.provision:xml:features:3.1.0-RELEASE-207:Could not find artifact com.ca.im:data-mgmt.provision:xml:features:3.1.0-RELEASE-207
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact com.ca.im:data-mgmt.provision:xml:features:3.1.0-RELEASE-207
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
…
OR
2016-01-12 02:32:46,327 | WARN | Event Dispatcher | FeaturesServiceImpl | res.internal.FeaturesServiceImpl 1367 | 7 - org.apache.karaf.features.core - 2.4.3 | | Unable to add features repository mvn:com.ca.im/data-mgmt.provision/2.7.0-RELEASE-137/xml/features at startup
java.io.IOException: Error resolving artifact com.ca.im:data-mgmt.provision:xml:features:2.7.0-RELEASE-137: Could not find artifact com.ca.im:data-mgmt.provision:xml:features:2.7.0-RELEASE-137 in central (http://repo1.maven.org/maven2/)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:584)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:528)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:506)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:481)
at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123)
Connecting to karaf and manually resolving the features through karaf commands will initialize the applications. If the DA failed to initialize then the DC’s will need to be restarted as well (but it is not necessary to apply the workaround on the DC unless the same error messages have been seen in the karaf.log file).
Please note that these workarounds may have to re-applied if the apache-karaf-XXX/data directory is removed / cleaned up again. This can typically occur if:
a) The application is upgraded OR
b) The application is restarted after an ungraceful shutdown.
Workaround Steps for the DA:
1. Identify the features repository URL to be added from the INSTALL_ROOT/apache-karaf-2.3.0/etc/org.apache.karaf.features.cfg file.
[[email protected] ~]# grep --color provision /opt/IMDataAggregator/apache-karaf-2.4.3/etc/org.apache.karaf.features.cfg
featuresRepositories = mvn:org.apache.karaf.assemblies.features/standard/2.4.3/xml/features,mvn:org.apache.karaf.assemblies.features/spring/2.4.3/xml/features,mvn:org.apache.karaf.assemblies.features/enterprise/2.4.3/xml/features,mvn:com.ca.im/data-mgmt.provision/2.7.0-RELEASE-133/xml/features
#featuresRepositories=mvn:com.ca.im/data-mgmt.provision/2.7.0-RELEASE-133/xml/features
NOTE: The content that you need to select from this file will line up with the error message that is seen in the karaf.log file. Also note that depending on the version of CAPM, the number after RELEASE- may change while the number before it will reflect the release of CAPM in use.
2. Connect through karaf and manually run the commands needed to add the features:
> ssh –p8501 [email protected]
Password: karaf
> features:addurl mvn:com.ca.im/data-mgmt.provision/2.7.0-RELEASE-133/xml/features
> features:install data-aggregator
3. Check the karaf.log, and you will start seeing the various bundles in the application initializing, and should not see a repeat of the “Error resolving artifact” message.
4. Check that application has initialized (for example, check the DA_HOST:8581/rest/ page)
Workaround Steps for the DC:
1. Identify the features repository URL to be added from the INSTALL_ROOT/apache-karaf-2.3.0/etc/org.apache.karaf.features.cfg file.
[[email protected] ~]# grep --color provision /opt/IMDataCollector/apache-karaf-2.4.3/etc/org.apache.karaf.features.cfg
featuresRepositories = mvn:org.apache.karaf.assemblies.features/standard/2.4.3/xml/features,mvn:org.apache.karaf.assemblies.features/spring/2.4.3/xml/features,mvn:org.apache.karaf.assemblies.features/enterprise/2.4.3/xml/features,mvn:com.ca.im/data-mgmt.provision/2.7.0-RELEASE-133/xml/features
#featuresRepositories=mvn:com.ca.im/data-mgmt.provision/2.7.0-RELEASE-133/xml/features
Again, similar to the DA above, the content that you need to select from this file will line up with the error message that is seen in the karaf.log file. And again, depending on the version of CAPM, the number after RELEASE- may change.
2. Connect through karaf and manually run the commands needed to add the features:
> ssh –p8601 [email protected]
Password: karaf
> features:addurl mvn:com.ca.im/data-mgmt.provision/2.7.0-RELEASE-133/xml/features
> features:install data-collection-manager
3. Check the karaf.log, and you will start seeing the various bundles in the application initializing, and should not see a repeat of the “Error resolving artifact” message.
4. Check that application has initialized (for example, check the System Status > Data Collectors page and ensure that the DC status says ‘Collecting Data’)
https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/dx-netops/20-2/Performance-Monitoring-with-DX-Performance-Management/troubleshooting/data-aggregator-or-data-collector-does-not-initialize.html