Skip to content

Commit

Permalink
Make KeyValueStore non-optional to avoid intermittent failure on load
Browse files Browse the repository at this point in the history
We've seen multiple instances at one installation where this is happening
intermittently on startup:

...
Caused by: org.osgi.service.blueprint.container.ServiceUnavailableException: No matching service for optional OSGi service reference: (objectClass=org.opennms.integration.api.v1.distributed.KeyValueStore)
        at org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:272) ~[?:?]
        at org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:57) ~[?:?]
        at org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:341) ~[?:?]
        at Proxy2eb34fe8_fa63_41d0_96b1_a2e6f7cd7d24.enumerateContextAsync(Unknown Source) ~[?:?]
        at org.opennms.timeseries.cortex.CortexTSS.<init>(CortexTSS.java:180) ~[?:?]
...
  • Loading branch information
deejgregor committed Dec 8, 2023
1 parent 3cdfa98 commit 26f42a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/src/main/resources/OSGI-INF/blueprint/blueprint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</bean>

<!--Key-value store -->
<reference id="keyValueStore" interface="org.opennms.integration.api.v1.distributed.KeyValueStore" availability="optional"/>
<reference id="keyValueStore" interface="org.opennms.integration.api.v1.distributed.KeyValueStore"/>

<bean id="timeSeriesStorage" class="org.opennms.timeseries.cortex.CortexTSS" destroy-method="destroy">
<argument ref="cortexTssConfig" />
Expand Down

0 comments on commit 26f42a1

Please sign in to comment.