You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jeremy Hanna (Jira)" <ji...@apache.org> on 2020/06/16 05:58:00 UTC

[jira] [Commented] (CASSANDRA-15860) Cannot change the number of tokens from 512 to 256 Fatal configuration error; unable to start server.

    [ https://issues.apache.org/jira/browse/CASSANDRA-15860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17136328#comment-17136328 ] 

Jeremy Hanna commented on CASSANDRA-15860:
------------------------------------------

You cannot change the num_tokens on a running cluster, you have to either
 # add another logical datacenter with a different num_tokens value (normal add datacenter procedure, add nodes without replication and then do a nodetool rebuild on each node after adding replication) or
 # create a new cluster with a different num_tokens value and sstable load data from the original cluster

I would go with option 1 if you can.

The reason why you can't change after data has been written is because data is already stored on the node for the 512 token ranges it has already claimed.  You can't change that without rewriting the data around the cluster.  So it's simplest to add a new DC where that data can be written again.  See this [blog post|https://thelastpickle.com/blog/2019/02/21/set-up-a-cluster-with-even-token-distribution.html] for setting up token allocation optimally.

> Cannot change the number of tokens from 512 to 256 Fatal configuration error; unable to start server.
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15860
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15860
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Krishnakumar Jinka
>            Priority: Normal
>
> Hello, I was following this issue from jira: https://issues.apache.org/jira/browse/CASSANDRA-11811?jql=text%20~%20%22CassandraDaemon.java%20Cannot%20change%22
> . We are using 3.11.2 and i see this error in the log while starting the cassandra, and it fails. I read the jira and understood that mutation happens, thereby doubling the number of tokens, and hence due to mismatch
> INFO [main] [2020-05-28 11:05:14] OutboundTcpConnection.java:108 - OutboundTcpConnection using coalescing strategy DISABLED
> INFO [HANDSHAKE-/192.168.5.53] [2020-05-28 11:05:14] OutboundTcpConnection.java:560 - Handshaking version with /192.168.5.53
> INFO [main] [2020-05-28 11:05:15] StorageService.java:707 - Loading persisted ring state
> INFO [main] [2020-05-28 11:05:15] StorageService.java:825 - Starting up server gossip
> INFO [main] [2020-05-28 11:05:15] TokenMetadata.java:479 - Updating topology for /192.168.5.52
> INFO [main] [2020-05-28 11:05:15] TokenMetadata.java:479 - Updating topology for /192.168.5.52
> Cannot change the number of tokens from 512 to 256
> Fatal configuration error; unable to start server. See log for stacktrace.
> ERROR [main] [2020-05-28 11:05:15] CassandraDaemon.java:708 - Fatal configuration error
> org.apache.cassandra.exceptions.ConfigurationException: Cannot change the number of tokens from 512 to 256
> at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:989) ~[apache-cassandra-3.11.2.jar:3.11.2]
> at org.apache.cassandra.service.StorageService.initServer(StorageService.java:682) ~[apache-cassandra-3.11.2.jar:3.11.2]
> at org.apache.cassandra.service.StorageService.initServer(StorageService.java:613) ~[apache-cassandra-3.11.2.jar:3.11.2]
> at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:379) [apache-cassandra-3.11.2.jar:3.11.2]
> at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:602) [apache-cassandra-3.11.2.jar:3.11.2]
> at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:691) [apache-cassandra-3.11.2.jar:3.11.2]
> INFO [StorageServiceShutdownHook] [2020-05-28 11:05:15] HintsService.java:220 - Paused hints dispatch
> INFO [StorageServiceShutdownHook] [2020-05-28 11:05:15] Gossiper.java:1540 - Announcing shutdown
> INFO [StorageServiceShutdownHook] [2020-05-28 11:05:15] StorageService.java:2292 - Node /192.168.5.52 state jump to shutdown
> INFO [HANDSHAKE-/192.168.5.53] [2020-05-28 11:05:15] OutboundTcpConnection.java:560 - Handshaking version with /192.168.5.53
> I would like to know 
>  # what would be the root cause of this error
>  # How to recover from this error. Because everytime i start the Cassandra, it is blocked due to this. 
> /etc/cassandra/conf/cassandra.yaml 
> contains num_tokens as 256  , auto_bootstrap is not provided, i guess by default it will be true. 
> INFO [main] [2020-05-28 11:05:13] StorageService.java:618 - Cassandra version: 3.11.2
> INFO [main] [2020-05-28 11:05:13] StorageService.java:619 - Thrift API version: 20.1.0
> INFO [main] [2020-05-28 11:05:13] StorageService.java:620 - CQL supported versions: 3.4.4 (default: 3.4.4)
> INFO [main] [2020-05-28 11:05:13] StorageService.java:622 - Native protocol supported versions: 3/v3, 4/v4, 5/v5-beta (default: 4/v4)
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org