[CONTROLLER-977] Clustering : Timed out trying to find the primary shard Created: 31/Oct/14  Updated: 19/Oct/17  Resolved: 11/Nov/14

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Wojciech Dec Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
is blocked by CONTROLLER-985 Clustering : odl-clustering-test-app ... Resolved
External issue ID: 2285

 Description   

Upon installing features old-restconf and odl-toaster, accessing the toaster restconf API hangs, and then comes back with the following error message.

Subsequent calls to toaster return an empty reply indicating that the features were not installed properly.

{
"errors": {
"error": [
{
"error-type": "application",
"error-tag": "operation-failed",
"error-message": "Problem to get data from transaction.",
"error-info": "ReadFailedException

{message=Error reading data for path /(http://netconfcentral.org/ns/toaster?revision=2009-11-20)toaster, errorList=[RpcError [message=Error reading data for path /(http://netconfcentral.org/ns/toaster?revision=2009-11-20)toaster, severity=ERROR, errorType=APPLICATION, tag=operation-failed, applicationTag=null, info=null, cause=org.opendaylight.controller.cluster.datastore.exceptions.NotInitializedException: Timed out trying to find the primary shard. Most likely cause is the shard is not initialized yet.]]}

\n\tat org.opendaylight.controller.cluster.datastore.TransactionProxy$NoOpTransactionContext.readData(TransactionProxy.java:1037)\n\tat org.opendaylight.controller.cluster.datastore.TransactionProxy$2.invoke(TransactionProxy.java:261)\n\tat org.opendaylight.controller.cluster.datastore.TransactionProxy$TransactionFutureCallback.onComplete(TransactionProxy.java:643)\n\tat org.opendaylight.controller.cluster.datastore.TransactionProxy$9.onComplete(TransactionProxy.java:492)\n\tat org.opendaylight.controller.cluster.datastore.TransactionProxy$9.onComplete(TransactionProxy.java:488)\n\tat akka.dispatch.OnComplete.internal(Future.scala:246)\n\tat akka.dispatch.OnComplete.internal(Future.scala:244)\n\tat akka.dispatch.japi$CallbackBridge.apply(Future.scala:174)\n\tat akka.dispatch.japi$CallbackBridge.apply(Future.scala:171)\n\tat scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)\n\tat akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67)\n\tat akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82)\n\tat akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)\n\tat akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)\n\tat scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)\n\tat akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58)\n\tat akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)\n\tat akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)\n\tat scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\n\tat scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\n\tat scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\n\tat scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)\nCaused by: org.opendaylight.controller.cluster.datastore.exceptions.NotInitializedException: Timed out trying to find the primary shard. Most likely cause is the shard is not initialized yet.\n\tat org.opendaylight.controller.cluster.datastore.utils.ActorContext$1.apply(ActorContext.java:66)\n\tat org.opendaylight.controller.cluster.datastore.utils.ActorContext$1.apply(ActorContext.java:60)\n\tat scala.concurrent.Future$$anonfun$transform$1$$anonfun$apply$2.apply(Future.scala:222)\n\tat scala.concurrent.Future$$anonfun$transform$1$$anonfun$apply$2.apply(Future.scala:222)\n\tat scala.util.Try$.apply(Try.scala:161)\n\tat scala.concurrent.Future$$anonfun$transform$1.apply(Future.scala:222)\n\tat scala.concurrent.Future$$anonfun$transform$1.apply(Future.scala:220)\n\t... 13 more\n"
}
]
}
}



 Comments   
Comment by Moiz Raja [ 31/Oct/14 ]

Hi Wojciech,

1. Which features did you install?
2. In which exact sequence did you install the features?
3. Were there any controller restarts in between installing features?

Also please attach the full karaf log to this bug.

Comment by Moiz Raja [ 31/Oct/14 ]

Talking to Wojciech here is what I found out,

1. He is using the controller karaf distribution
2. He installs only odl-toaster and odl-restconf/odl-restconf-all
3. Between every controller restart he did wipe out the data directory.
4. He did not wipe the journal directory

Comment by Moiz Raja [ 31/Oct/14 ]

odl-restconf-all is the one bringing in clustering because it depends on odl-mdsal-clustering-testapp which brings in clustering. This seems wrong by itself.

Comment by Moiz Raja [ 11/Nov/14 ]

Fixed by fix for CONTROLLER-985

Generated at Wed Feb 07 19:54:22 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.