cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: Exception when setting tokens for the cassandra nodes
Date Mon, 29 Apr 2013 16:32:20 GMT
For starters:  If you are using the Murmur3 partitioner, which is the default in cassandra.yaml,
then you need to calculate the tokens using:
python -c 'print [str(((2**64 / 2) * i) - 2**63) for i in range(2)]'

which gives the following values:
['-9223372036854775808', '0']

From: Rahul []
Sent: Monday, April 29, 2013 7:23 PM
Subject: Exception when setting tokens for the cassandra nodes

I am testing out Cassandra 1.2 on two of my local servers. But I face problems with assigning
 tokens to my nodes. When I use nodetool to set token, I end up getting an java Exception.
My test setup is as follows,
Node1: <local ip 1> (seed)
Node2: <local ip 2> (seed)

Since I have two nodes, i calculated the tokens as 0 and 2^127/2 = 85070591730234615865843651857942052864.
I was able to set token 0 for my first node using nodetool move 0 , but when i am trying to
set 85070591730234615865843651857942052864 for my second node,
it throws a main UndeclaredThrowableException. Full stack is attached bellow.

user@server~$ nodetool move 85070591730234615865843651857942052864

Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
            at $Proxy0.getTokenToEndpointMap(Unknown Source)
Caused by: org.apache.cassandra.db:type=StorageService
            at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(
            at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(
            at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(
            at java.lang.reflect.Method.invoke(
            at sun.rmi.server.UnicastServerRef.dispatch(
            at sun.rmi.transport.Transport$
            at sun.rmi.transport.Transport$
            at Method)
            at sun.rmi.transport.Transport.serviceCall(
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(
            at sun.rmi.transport.tcp.TCPTransport$
            at java.util.concurrent.ThreadPoolExecutor.runWorker(
            at java.util.concurrent.ThreadPoolExecutor$
            at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(
            at sun.rmi.transport.StreamRemoteCall.executeCall(
            at sun.rmi.server.UnicastRef.invoke(
            at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
            at Source)

Any suggestions towards solving this problem would be deeply appreciated.


Rahul Erai<>


This message is for information purposes only, it is not a recommendation, advice, offer or
solicitation to buy or sell a product or service nor an official confirmation of any transaction.
It is directed at persons who are professionals and is not intended for retail customer use.
Intended for recipient only. This message is subject to the terms at:

For important disclosures, please see: regarding
market commentary from Barclays Sales and/or Trading, who are active market participants;
and in respect of Barclays Research, including disclosures relating to specific issuers, please


View raw message