question

christbenhur avatar image
christbenhur asked christbenhur edited

Unable to add second node DS201 Exercise Ring

Hi,

Course: DS201 | Exercise: 07 Ring

I am unable to add second node. There is an error while running the command:

/home/ubuntu/node2/bin/dse cassandra

INFO [main] 2020-09-03 06:01:19,487 BootStrapper.java:197 - tokens manually specified as [0]
ERROR [main] 2020-09-03 06:01:19,527 CassandraDaemon.java:820 - Fatal configuration error
org.apache.cassandra.exceptions.ConfigurationException: Bootstrapping to existing token 0 is not allowed (decommission/removenode the old node first).
    at org.apache.cassandra.dht.BootStrapper.getSpecifiedTokens(BootStrapper.java:203) ~[dse-db-all-4.0.0.2284.jar:4.0.0.2284]
    at org.apache.cassandra.dht.BootStrapper.getBootstrapTokens(BootStrapper.java:179) ~[dse-db-all-4.0.0.2284.jar:4.0.0.2284]
    at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:1102) ~[dse-db-all-4.0.0.2284.jar:4.0.0.2284]
    at org.apache.cassandra.service.StorageService.initServer(StorageService.java:672) ~[dse-db-all-4.0.0.2284.jar:4.0.0.2284]
    at org.apache.cassandra.service.StorageService.initServer(StorageService.java:602) ~[dse-db-all-4.0.0.2284.jar:4.0.0.2284]
    at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:388) [dse-db-all-4.0.0.2284.jar:4.0.0.2284]
    at com.datastax.bdp.server.DseDaemon.setup(DseDaemon.java:496) [dse-core-6.0.0.jar:6.0.0]
    at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:669) [dse-db-all-4.0.0.2284.jar:4.0.0.2284]
    at com.datastax.bdp.DseModule.main(DseModule.java:91) [dse-core-6.0.0.jar:6.0.0]

Followed the steps exactly provided in the solution pdf.

Please help me. Log file is attached for review.

Thanks

07 Ring - Solution.pdf

node2-dse.zip

academyds201
07-ring-solution.pdf (662.3 KiB)
node2-dse.zip (17.2 KiB)
1 comment
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image Erick Ramirez ♦♦ commented ·

Please update your original question (please don't post it as an "answer") with the full error and stack trace. Cheers!

0 Likes 0 ·
bettina.swynnerton avatar image
bettina.swynnerton answered

Hi @christbenhur,

this is very difficult to read, as the stacktrace is very long, so I would advise editing and cutting out some parts.

Anyway, here is your problem:

INFO [main] 2020-09-03 06:01:19,487 BootStrapper.java:197 - tokens manually specified as [0]

ERROR [main] 2020-09-03 06:01:19,527 CassandraDaemon.java:820 - Fatal configuration error

org.apache.cassandra.exceptions.ConfigurationException: Bootstrapping to existing token 0 is not allowed (decommission/removenode the old node first).

You already have a node with a manually assigned token of 0, and you cannot bootstrap another node with the same assignment. Look at the instructions again, you need to edit the cassandra.yaml with an appropriate value for initial_token, i.e a token that has not already been assigned to another node.

I hope this helps.

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered christbenhur edited

Without giving you the full answer to give you an opportunity to learn from the exercise, the error message tells you exactly what the problem is:

ERROR [main] 2020-09-03 06:01:19,527 CassandraDaemon.java:820 - Fatal configuration error
org.apache.cassandra.exceptions.ConfigurationException: Bootstrapping to existing token 0 is not allowed (decommission/removenode the old node first).

HINT: You didn't follow step 5 of the DS201 Exercise 7 correctly. Cheers!

3 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

christbenhur avatar image christbenhur commented ·

Is there any mistake in my files with respect to parameters: num_tokens and initial_token?

/home/ubuntu/node2/resources/cassandra/conf/cassandra.yaml

/home/ubuntu/node1/resources/cassandra/conf/cassandra.yaml

These files were generated in step 3 and modified as suggested in step 4 and step 5 in the solution file.

0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ christbenhur commented ·

FYI We have copies of the instructions so there's no need to post screenshots of the PDF. :)

And yes, you didn't configure the node correctly. Again, the error message is quite clear:

ConfigurationException: Bootstrapping to existing token 0 is not allowed (decommission/removenode the old node first).

You can't bootstrap with initial_token: 0 because node1 already owns it.

The log you posted shows that the cassandra.yaml has these configured:

INFO  [main] 2020-09-03 06:00:29,275  Config.java:595 - Node configuration:[ ... \
   initial_token=0; ... \
   num_tokens=1; ... \
   listen_address=127.0.0.2; ... \
]

For what it's worth, make sure that your cassandra.yaml does not have multiple initial_token entries. Cheers!

0 Likes 0 ·
christbenhur avatar image christbenhur Erick Ramirez ♦♦ commented ·

Thanks Erick.

0 Likes 0 ·