Since the cluster name is only cosmetic people do not often change it. I
would not do this in a production cluster for sure.

On Thu, Nov 29, 2012 at 2:56 PM, Wei Zhu <wz1...@yahoo.com> wrote:

> Hi,
> I am trying to rename a cluster by following the instruction on Wiki:
>
> Cassandra says "ClusterName mismatch: oldClusterName != newClusterName"
> and refuses to start
> To prevent operator errors, Cassandra stores the name of the cluster in
> its system table. If you need to rename a cluster for some reason, you can:
> Perform these steps on each node:
>
>    1. Start the cassandra-cli connected locally to this node.
>    2. Run the following:
>       1. use system;
>       2. set LocationInfo <http://wiki.apache.org/cassandra/LocationInfo>
>       
> [utf8('L')][utf8('ClusterName<http://wiki.apache.org/cassandra/ClusterName>')]=utf8('<new
>       cluster name>');
>       3. exit;
>    3. Run nodetool flush on this node.
>    4. Update the cassandra.yaml file for the cluster_name as the same as
>    2b).
>    5. Restart the node.
>
> Once all nodes have been had this operation performed and restarted,
> nodetool ring should show all nodes as UP.
>
> Get the following error:
> Connected to: "Test Cluster" on 10.200.128.151/9160
> Welcome to Cassandra CLI version 1.1.6
>
> Type 'help;' or '?' for help.
> Type 'quit;' or 'exit;' to quit.
>
> [default@unknown] use system;
> Authenticated to keyspace: system
> [default@system] set
> LocationInfo[utf8('L')][utf8('ClusterName')]=utf8('<General Services
> Cluster>');
> system keyspace is not user-modifiable.
> InvalidRequestException(why:system keyspace is not user-modifiable.)
> at
> org.apache.cassandra.thrift.Cassandra$insert_result.read(Cassandra.java:15974)
> at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
> at
> org.apache.cassandra.thrift.Cassandra$Client.recv_insert(Cassandra.java:797)
> at org.apache.cassandra.thrift.Cassandra$Client.insert(Cassandra.java:781)
> at org.apache.cassandra.cli.CliClient.executeSet(CliClient.java:909)
> at
> org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:222)
> at
> org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:219)
> at org.apache.cassandra.cli.CliMain.main(CliMain.java:346)
>
> I have to remove the data directory in order to change the cluster name.
> Luckily it's my testing box, so no harm. Just wondering what has been
> changed not to allow the modification through cli? What is the way of
> changing the cluster name without wiping out all the data now?
>
> Thanks.
> -Wei
>

Reply via email to