karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikram Darsi <VDa...@advaoptical.com>
Subject How to resolve ServiceUnavailableException
Date Mon, 04 Mar 2019 07:27:42 GMT
Hi Team

Our application is using Blueprint to inject the services exposed by a bean to the other bean
and in some application runs, we see below exceptions. After browsing online articles, the
highlighted exception indicates that the
backend service implementation is not available in the OSGi registry.

Just wondering how a bundle can be in active state when the backend implementation(i.e., dependent
service) is not available during Karaf start up?

Is there a case, the backend implementation can be un-registered from OSGi registry without
stopping the bundle exposed the service during runtime? As we are sure that none of the bundles
is stopped.

Are there any recovery mechanisms? Is it correct to attempt reading the service from the OSGi
registry for a definite number of times? Bundle ordering issues leads to these exceptions?
We are assuming the ordering will be taken care by the blueprint (If a dependent service is
not available, it waits till 5 minutes(default), post which it throws timeout exceptions,
we do not see any timeout exceptions during start up)

2017-09-19 11:41:53,886 | ERROR | -dispatcher-9722 | DataTreeChangeListenerActor      | 212
- org.opendaylight.controller.sal-distributed-datastore - 1.4.3.Boron-SR3 | Error notifying
listener org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataTreeChangeListenerAdapter@72586e4e<mailto:org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataTreeChangeListenerAdapter@72586e4e>
org.osgi.service.blueprint.container.ServiceUnavailableException: The Blueprint container
is being or has been destroyed: (objectClass=org.opendaylight.controller.md.sal.binding.api.NotificationPublishService)
                at org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:241)[15:org.apache.aries.blueprint.core:1.6.1]
                at org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:56)[15:org.apache.aries.blueprint.core:1.6.1]
                at org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:306)[15:org.apache.aries.blueprint.core:1.6.1]
                at Proxy45e3a4cb_f3e4_4016_8f9f_bd0a4c6df5b8.putNotification(Unknown Source)[:]
                at com.adva.ensemble.controller.eventmgr.impl.EventHistoryTreeChangeListner.onDataTreeChanged(EventHistoryTreeChangeListner.java:57)[392:com.adva.ensemble.controller.event-mgr-impl:17.1.1.339]
                at org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataTreeChangeListenerAdapter.onDataTreeChanged(BindingDOMDataTreeChangeListenerAdapter.java:41)[182:org.opendaylight.controller.sal-binding-broker-impl:1.4.3.Boron-SR3]
                at org.opendaylight.controller.cluster.datastore.DataTreeChangeListenerActor.dataChanged(DataTreeChangeListenerActor.java:58)[212:org.opendaylight.controller.sal-distributed-datastore:1.4.3.Boron-SR3]
                at org.opendaylight.controller.cluster.datastore.DataTreeChangeListenerActor.handleReceive(DataTreeChangeListenerActor.java:40)[212:org.opendaylight.controller.sal-distributed-datastore:1.4.3.Boron-SR3]
                at org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor.onReceive(AbstractUntypedActor.java:26)[206:org.opendaylight.controller.sal-clustering-commons:1.4.3.Boron-SR3]
                at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:165)[194:com.typesafe.akka.actor:2.4.7]
                at akka.actor.Actor$class.aroundReceive(Actor.scala:484)[194:com.typesafe.akka.actor:2.4.7]
                at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:95)[194:com.typesafe.akka.actor:2.4.7]
                at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)[194:com.typesafe.akka.actor:2.4.7]
                at akka.actor.ActorCell.invoke(ActorCell.scala:495)[194:com.typesafe.akka.actor:2.4.7]
                at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)[194:com.typesafe.akka.actor:2.4.7]
                at akka.dispatch.Mailbox.run(Mailbox.scala:224)[194:com.typesafe.akka.actor:2.4.7]
                at akka.dispatch.Mailbox.exec(Mailbox.scala:234)[194:com.typesafe.akka.actor:2.4.7]
                at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)[190:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8]
                at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)[190:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8]
                at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)[190:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8]
                at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)[190:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8]

Let me know if you need more information.

Thanks in advance.

Regards
Vikram

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message