# Not able to start the Shard coordinator

**URL:** https://discuss.akka.io/t/not-able-to-start-the-shard-coordinator/1166
**Category:** Akka Libraries
**Tags:** akka-cluster
**Created:** [May 30, 2018, 3:43pm UTC](https://discuss.akka.io/t/not-able-to-start-the-shard-coordinator/1166 "2018-05-30T15:43:23Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![iamanandkris](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/iamanandkris/32/449_2.png) [@iamanandkris](https://discuss.akka.io/u/iamanandkris)
#### Post date: [May 30, 2018, 3:43pm UTC](https://discuss.akka.io/t/not-able-to-start-the-shard-coordinator/1166/1 "2018-05-30T15:43:23Z")

</div>

Hi Team  
We are facing the following problem when we start the cluster with 2 nodes:

**Seed Node Configuration:**

```auto
remote {
    log-remote-lifecycle-events = off
    netty.tcp {
      hostname = 127.0.0.1
      port = 2555
    }
  }
cluster {
    jmx.multi-mbeans-in-same-jvm = on
    sharding.state-store-mode = persistence
    sharding.remember-entities = on
    seed-nodes = [
      "akka.tcp://users-actor-system@127.0.0.1:2555"]

    roles = ["AuthEntityServer","SessionEntityServer"]
    metrics.enabled = off
  }

```

**Joining Node configuration**

```auto
remote {
    log-remote-lifecycle-events = off
    netty.tcp {
      hostname = 127.0.0.1
      port = 2551
    }
  }
 cluster {
    jmx.multi-mbeans-in-same-jvm = on
    sharding.state-store-mode = persistence
    sharding.remember-entities = on
    seed-nodes = [
      "akka.tcp://users-actor-system@127.0.0.1:2555"]

    roles = ["UserEntityServer","GroupEntityServer","UserUniquenessCheckServer"]
    metrics.enabled = off
  }

```

**akka-persistence-cassandra version** : 0.80-RC1  
**akka version** : 2.5.6

**Starting order:**  
Seed node is started first and “Joining Node” is started after that.

**Problem:**  
When the “Joining Node” Starts 3 shards using ClusterSharding(as).start(), the seed node is reporting the below information (3\*3 times). Also noticed that the coordinator for the 3 shards are not created(not seeing a row getting inserted in to cassandra table).  
Is there anything I am missing in the configuration?

**Errors:**

```auto
85201 [users-actor-system-akka.actor.default-dispatcher-18] INFO akka.actor.EmptyLocalActorRef - Message [akka.cluster.sharding.ShardCoordinator$Internal$Register] from Actor[akka.tcp://users-actor-system@127.0.0.1:2551/system/sharding/GroupEntity#1559239295] to Actor[akka://users-actor-system/system/sharding/GroupEntityCoordinator/singleton/coordinator] was not delivered. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 

85202 [users-actor-system-akka.actor.default-dispatcher-18] INFO akka.actor.EmptyLocalActorRef - Message [akka.cluster.sharding.ShardCoordinator$Internal$Register] from Actor[akka.tcp://users-actor-system@127.0.0.1:2551/system/sharding/UserEntity#-885384634] to Actor[akka://users-actor-system/system/sharding/UserEntityCoordinator/singleton/coordinator] was not delivered. [3] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 

85204 [users-actor-system-akka.actor.default-dispatcher-18] INFO akka.actor.EmptyLocalActorRef - Message [akka.cluster.sharding.ShardCoordinator$Internal$Register] from Actor[akka.tcp://users-actor-system@127.0.0.1:2551/system/sharding/ApplicationUniqueFieldCheckerSchemaEntity#1728683026] to Actor[akka://users-actor-system/system/sharding/ApplicationUniqueFieldCheckerSchemaEntityCoordinator/singleton/coordinator] was not delivered. [4] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 

87186 [users-actor-system-akka.actor.default-dispatcher-17] INFO akka.actor.EmptyLocalActorRef - Message [akka.cluster.sharding.ShardCoordinator$Internal$Register] from Actor[akka.tcp://users-actor-system@127.0.0.1:2551/system/sharding/UserEntity#-885384634] to Actor[akka://users-actor-system/system/sharding/UserEntityCoordinator/singleton/coordinator] was not delivered. [5] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 

87188 [users-actor-system-akka.actor.default-dispatcher-17] INFO akka.actor.EmptyLocalActorRef - Message [akka.cluster.sharding.ShardCoordinator$Internal$Register] from Actor[akka.tcp://users-actor-system@127.0.0.1:2551/system/sharding/GroupEntity#1559239295] to Actor[akka://users-actor-system/system/sharding/GroupEntityCoordinator/singleton/coordinator] was not delivered. [6] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 

87203 [users-actor-system-akka.actor.default-dispatcher-17] INFO akka.actor.EmptyLocalActorRef - Message [akka.cluster.sharding.ShardCoordinator$Internal$Register] from Actor[akka.tcp://users-actor-system@127.0.0.1:2551/system/sharding/ApplicationUniqueFieldCheckerSchemaEntity#1728683026] to Actor[akka://users-actor-system/system/sharding/ApplicationUniqueFieldCheckerSchemaEntityCoordinator/singleton/coordinator] was not delivered. [7] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 

89185 [users-actor-system-akka.actor.default-dispatcher-17] INFO akka.actor.EmptyLocalActorRef - Message [akka.cluster.sharding.ShardCoordinator$Internal$Register] from Actor[akka.tcp://users-actor-system@127.0.0.1:2551/system/sharding/UserEntity#-885384634] to Actor[akka://users-actor-system/system/sharding/UserEntityCoordinator/singleton/coordinator] was not delivered. [8] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 

89187 [users-actor-system-akka.actor.default-dispatcher-17] INFO akka.actor.EmptyLocalActorRef - Message [akka.cluster.sharding.ShardCoordinator$Internal$Register] from Actor[akka.tcp://users-actor-system@127.0.0.1:2551/system/sharding/GroupEntity#1559239295] to Actor[akka://users-actor-system/system/sharding/GroupEntityCoordinator/singleton/coordinator] was not delivered. [9] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 

89202 [users-actor-system-akka.actor.default-dispatcher-18] INFO akka.actor.EmptyLocalActorRef - Message [akka.cluster.sharding.ShardCoordinator$Internal$Register] from Actor[akka.tcp://users-actor-system@127.0.0.1:2551/system/sharding/ApplicationUniqueFieldCheckerSchemaEntity#1728683026] to Actor[akka://users-actor-system/system/sharding/ApplicationUniqueFieldCheckerSchemaEntityCoordinator/singleton/coordinator] was not delivered. [10] dead letters encountered, no more dead letters will be logged. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 

```

Thank you  
Anand Krishnan

---

<div class="post-metadata">

### Author: ![iamanandkris](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/iamanandkris/32/449_2.png) [@iamanandkris](https://discuss.akka.io/u/iamanandkris)
#### Post date: [May 30, 2018, 4:57pm UTC](https://discuss.akka.io/t/not-able-to-start-the-shard-coordinator/1166/2 "2018-05-30T16:57:38Z")

</div>

> [@iamanandkris](#):
>
> **akka-persistence-cassandra version** : 0.80-RC1  
> **akka version** : 2.5.6

We also tried the following version of Akka and Cassandra journal plugin and got the same results:  
**akka-persistence-cassandra version** : 0.84  
**akka version** : 2.5.12

---

<div class="post-metadata">

### Author: ![chbatey](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/chbatey/32/98_2.png) [@chbatey](https://discuss.akka.io/u/chbatey)
#### Post date: [May 31, 2018, 7:15am UTC](https://discuss.akka.io/t/not-able-to-start-the-shard-coordinator/1166/3 "2018-05-31T07:15:20Z")

</div>

Are you starting cluster sharding on the seed node as well?

---

<div class="post-metadata">

### Author: ![iamanandkris](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/iamanandkris/32/449_2.png) [@iamanandkris](https://discuss.akka.io/u/iamanandkris)
#### Post date: [May 31, 2018, 8:41am UTC](https://discuss.akka.io/t/not-able-to-start-the-shard-coordinator/1166/4 "2018-05-31T08:41:24Z")

</div>

> [@iamanandkris](#):
>
> ClusterSharding(as).start()

I am not performing above action on seed node for GroupEntity, UserEntity and ApplicationUniqueFieldCheckerSchemaEntity shards; we dont want to host all shards in all nodes.

---

<div class="post-metadata">

### Author: ![iamanandkris](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/iamanandkris/32/449_2.png) [@iamanandkris](https://discuss.akka.io/u/iamanandkris)
#### Post date: [May 31, 2018, 9:40am UTC](https://discuss.akka.io/t/not-able-to-start-the-shard-coordinator/1166/5 "2018-05-31T09:40:29Z")

</div>

Full code example available here - [https://github.com/abdheshkumar/akkapersistence-example/tree/master](https://github.com/abdheshkumar/akkapersistence-example/tree/master)

---

<div class="post-metadata">

### Author: ![johanandren](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/johanandren/32/85_2.png) [@johanandren](https://discuss.akka.io/u/johanandren)
#### Post date: [June 1, 2018, 6:43am UTC](https://discuss.akka.io/t/not-able-to-start-the-shard-coordinator/1166/6 "2018-06-01T06:43:08Z")

</div>

If you don’t want to host shards on all nodes but are using roles to select a subset you need to tell sharding about that role through the `ClusterShardingSettings`

---

<div class="post-metadata">

### Author: ![iamanandkris](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/iamanandkris/32/449_2.png) [@iamanandkris](https://discuss.akka.io/u/iamanandkris)
#### Post date: [June 1, 2018, 4:19pm UTC](https://discuss.akka.io/t/not-able-to-start-the-shard-coordinator/1166/7 "2018-06-01T16:19:26Z")

</div>

Thanks Johan this helped

```auto
val actorRef = ClusterSharding(as).start(
      typeName = shardActorName,
      entityProps = props(as, producer),
      settings = ClusterShardingSettings(system = as).withRole(role), //Adding a role here
      extractEntityId = entityIdExtractor,
      extractShardId = entityShardResolver)

```

Thank you  
Anand
