Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 84EFFF75F for ; Tue, 30 Apr 2013 07:50:00 +0000 (UTC) Received: (qmail 48703 invoked by uid 500); 30 Apr 2013 07:49:57 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 48478 invoked by uid 500); 30 Apr 2013 07:49:55 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 48408 invoked by uid 99); 30 Apr 2013 07:49:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Apr 2013 07:49:52 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FRT_BELOW2 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rahulerai@gmail.com designates 74.125.82.54 as permitted sender) Received: from [74.125.82.54] (HELO mail-wg0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Apr 2013 07:49:49 +0000 Received: by mail-wg0-f54.google.com with SMTP id y10so175869wgg.21 for ; Tue, 30 Apr 2013 00:49:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=nOJB7bob91VHpV8atHhamOV5A6JSMa45EKff03/qX8o=; b=AMoXa473Gtws9/G000BGwhKnDodpTz1jMN6AM7lskZVyqUz6lNoN7nwVR7lwStKKUc socH6jfbHs31Z7ZEzRBQlwKWTDC1iLzfKMVTP9ptDjWJG6INIG3GD5nQR35ecyO7VPKL PXLJutqtEKDrSqBSdMymJEts+KGIjz63s1lOHucGcLfdxea57J3HYodQ1bHDlPptAGg0 9UnGHAv0SNOrnjtcXCOQBKnpaNvzMKDip3T1zxdXyTxkp7Tg0DKuvaNUVJDjt+tVKRBb Q9maGmJhL3rd3JYY3jB75ZSF7py74JVc9+orNgMN38sStmp2mwHTi8w0Alx1v5A0xCU9 /ecA== MIME-Version: 1.0 X-Received: by 10.180.90.203 with SMTP id by11mr22546065wib.10.1367308167727; Tue, 30 Apr 2013 00:49:27 -0700 (PDT) Received: by 10.194.61.70 with HTTP; Tue, 30 Apr 2013 00:49:27 -0700 (PDT) Received: by 10.194.61.70 with HTTP; Tue, 30 Apr 2013 00:49:27 -0700 (PDT) In-Reply-To: <84B566FB5B7B244B81E6F1FEADA9087701D8CA88F8@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> References: <84B566FB5B7B244B81E6F1FEADA9087701D8CA88F8@LDNPCMMGMB01.INTRANET.BARCAPINT.COM> Date: Tue, 30 Apr 2013 13:19:27 +0530 Message-ID: Subject: RE: Exception when setting tokens for the cassandra nodes From: Rahul To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d0438eb6fa2ce9e04db8f3d90 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0438eb6fa2ce9e04db8f3d90 Content-Type: text/plain; charset=ISO-8859-1 Oh.my bad. Thanks mate, that worked. On Apr 29, 2013 10:03 PM, wrote: > 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 [mailto:rahulerai@gmail.com] > *Sent:* Monday, April 29, 2013 7:23 PM > *To:* user@cassandra.apache.org > *Subject:* Exception when setting tokens for the cassandra nodes**** > > ** ** > > Hi,**** > > 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: (seed)**** > > Node2: (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)**** > > at > org.apache.cassandra.tools.NodeProbe.getTokenToEndpointMap(NodeProbe.java:288) > **** > > at > org.apache.cassandra.tools.NodeCmd.printRing(NodeCmd.java:215)**** > > at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:1051)* > *** > > Caused by: javax.management.InstanceNotFoundException: > org.apache.cassandra.db:type=StorageService**** > > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) > **** > > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:643) > **** > > at > com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:668) > **** > > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1463) > **** > > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:96) > **** > > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1327) > **** > > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1419) > **** > > at > javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:656) > **** > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > **** > > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > **** > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > **** > > at java.lang.reflect.Method.invoke(Method.java:601)**** > > at > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)**** > > at sun.rmi.transport.Transport$1.run(Transport.java:177)**** > > at sun.rmi.transport.Transport$1.run(Transport.java:174)**** > > at java.security.AccessController.doPrivileged(Native Method)* > *** > > at sun.rmi.transport.Transport.serviceCall(Transport.java:173) > **** > > at > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)** > ** > > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808) > **** > > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667) > **** > > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > **** > > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > **** > > at java.lang.Thread.run(Thread.java:722)**** > > at > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273) > **** > > at > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)* > *** > > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:160)**** > > at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)**** > > at > javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown > Source)**** > > at > javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:901) > **** > > at > javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:280) > **** > > ** ** > > ** ** > > Any suggestions towards solving this problem would be deeply appreciated.* > *** > > thanks,**** > > rahul**** > > ** ** > > -- **** > > ** ** > > Rahul Erai**** > > www.cse.iitk.ac.in/~rahule**** > > ** ** > > _______________________________________________ > > 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: > www.barclays.com/emaildisclaimer. > > For important disclosures, please see: > www.barclays.com/salesandtradingdisclaimer 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 see http://publicresearch.barclays.com. > > _______________________________________________ > --f46d0438eb6fa2ce9e04db8f3d90 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Oh.my bad. Thanks mate, that worked.

On Apr 29, 2013 10:03 PM, <moshe.kranc@barclays.com> wrote:

For starters:=A0 If you are using the Murmur= 3 partitioner, which is the default in cassandra.yaml, then you need to cal= culate the tokens using:

python -c 'print [str= (((2**64 / 2) * i) - 2**63) for i in range(2)]'

=A0<= /p>

which gives the follow= ing values:

['-922337203685477580= 8', '0']

=A0

From: Rahul [mailto:ra= hulerai@gmail.com]
Sent: Monday, April 29, 2013 7:23 PM
To: user@cassandra.apache.org=
Subject: Exception when setting tokens for the cassandra nodes

=A0

Hi,

I am testing= out Cassandra 1.2 on two of my local servers. But I face problems with ass= igning =A0tokens to my nodes. When I use nodetool to set token, I end up ge= tting an java Exception.

My test setup is as follows,

Node1: <local ip 1> (seed)<= /u>

Node2: <local ip 2&= gt; (seed)

=A0

Since I have two nodes, i=A0calculated=A0the tokens as 0 and= 2^127/2 =3D=A085070591730234615865843651857942052864. I was able to set to= ken 0 for my first node using nodetool move 0 , but when i am trying to set= =A085070591730234615865843651857942052864 for my second node,=

it throws a=A0main UndeclaredThrowableEx= ception. Full stack is attached bellow.

=A0

user@serve= r~$ nodetool move 85070591730234615865843651857942052864

=A0

Exception in thread "main" java.lang.reflect.U= ndeclaredThrowableException

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at $Proxy0.getTokenToEndpointMap(Unknown = Source)

=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 at org.apache.cassandra.tools.NodeProbe.getTokenToEndpoi= ntMap(NodeProbe.java:288)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at org.= apache.cassandra.tools.NodeCmd.printRing(NodeCmd.java:215)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at org= .apache.cassandra.tools.NodeCmd.main(NodeCmd.java:1051)

Caused by: javax.management.InstanceNotFo= undException: org.apache.cassandra.db:type=3DStorageService

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at co= m.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanSe= rverInterceptor.java:1095)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at com.= sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBean= ServerInterceptor.java:643)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at com.sun.jmx.mbeanserver.JmxMBeanSe= rver.getAttribute(JmxMBeanServer.java:668)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at java= x.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.jav= a:1463)

=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 at javax.management.remote.rmi.RMIConnectionImpl.access$= 300(RMIConnectionImpl.java:96)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at java= x.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnec= tionImpl.java:1327)

=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at javax.management.remote.rmi.RMIConnection= Impl.doPrivilegedOperation(RMIConnectionImpl.java:1419)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at java= x.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.ja= va:656)

=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M= ethod)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at sun.= reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth= odAccessorImpl.java:43)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at java= .lang.reflect.Method.invoke(Method.java:601)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at sun.rmi.server.Un= icastServerRef.dispatch(UnicastServerRef.java:322)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at sun.= rmi.transport.Transport$1.run(Transport.java:177)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at sun.rmi.tran= sport.Transport$1.run(Transport.java:174)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at java= .security.AccessController.doPrivileged(Native Method)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at sun.rmi= .transport.Transport.serviceCall(Transport.java:173)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at sun.= rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)=

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTranspo= rt.java:808)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at sun.= rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)=

=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoo= lExecutor.java:1110)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at java= .util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)=

=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 at java.lang.Thread.run(Thread.java:722)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at sun.= rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall= .java:273)

=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 at sun.rmi.transport.StreamRemoteCall.executeCall(Str= eamRemoteCall.java:251)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at sun.= rmi.server.UnicastRef.invoke(UnicastRef.java:160)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at com.sun.jmx.= remote.internal.PRef.invoke(Unknown Source)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at java= x.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown Source)=

=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerC= onnection.getAttribute(RMIConnector.java:901)

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 at java= x.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandl= er.java:280)

=A0<= u>

=A0

Any suggestions towa= rds solving this problem would be deeply appreciated.

thanks,

rahul

=A0<= /p>

--

=A0

Rahul Erai<= /u>

=A0

_______________________________________________

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

For important disclosures, please see: www.barclays.com/salesandtra= dingdisclaimer=20 regarding market commentary from Barclays Sales and/or Trading, who are act= ive=20 market participants; and in respect of Barclays Research, including disclos= ures=20 relating to specific issuers, please see http://publicresearch.barclays.com.

_______________________________________________

--f46d0438eb6fa2ce9e04db8f3d90--