Hi maki-san
I am so sorry this was my mistake.
I expected when I set data at one node, the data should be copied to the
other node
at the same keyspace and same column family by replication.
This replication was working.
I just made a mistake to get data by wrong Key.(First character of key
was lower-case character
but I thought first character was capitalized. I tried to get by
key=User but key=user)
I am so sorry for this confusion.
So now I confirmed the data I set at **.**.254.53 was replicated to
**.**.254.54.
(At first I started 53 with autobootstrap=false then started 54 with
autobootstrap=true and then
finally restarted 53 with autobootstrap=true. So 53 server is like a master)
However when I set data at 54 server, this data never been replicated.
So this is Not bidirectional replication ?
Cassandra at multi-node is ring (This means no master, no slave?).
(Off course seeds in cassandra.yaml of both server are the same)
So I expected I can replicate bidirectinally.
Am I wrong?
And when I run at multi-node, I can't create keyspace, column family on
Cassandra-cli at other 54 server
(like a slave server).
Is this normal?
How can I create same keyspace and column family at multi-node?
or I have to restart at single-node, then can I create same keyspace and
column family?
Thank you for your help in advance.
Mamoru Mac Kondo
(2011/03/22 18:43), Maki Watanabe wrote:
How do you define your Keyspace?
As you may know, in Cassandra, replication (factor) is defined as the
attribute of Keyspace.
And what do you mean:
However replication never happened.
I can't get data I set at other node.
What did you do on cassandra, and what did you get in response?
maki
2011/3/23 ko...@vivinavi.com<ko...@vivinavi.com>:
Hi Sasha
Thank you so much for your advice.
I changed JMX_PORT from 10036 to 8080 in cassandra-env.sh.
Now nodetool ring is working as following.
# nodetool --host **.**.254.54 ring
Address Status State Load Owns Token
31247585259092561925693111230676487333
**.**.254.53 Up Normal 51.3 KB 84.50%
4871825541058236750403047111542070004
**.**.254.54 Up Normal 66.71 KB 15.50%
31247585259092561925693111230676487333
Then it seems I could set data to other node by Cassandra-cli --host other
node IP --port 9160.(Currently only 2 nodes)
However replication never happened.
I can't get data I set at other node.
I don't know what's wrong.
(I thought replication starts when cassandra -p restart)
Please advice me how to do to start replication.
Thank you for your advice in advance.
(2011/03/18 23:38), Sasha Dolgy wrote:
You need to specify the -jmxport with nodetool
On Mar 19, 2011 2:48 AM, "ko...@vivinavi.com"<ko...@vivinavi.com> wrote:
Hi everyone
I am still new to Cassandra, Thrift.
But anyway Cassandra 0.7.4, Thrift 0.5.0 are working on java 1.6.0.18 of
Debian 5.0.7.at single node.
Then I had to try and check multi node on 2 servers.
(JVM_PORT=10036 on /etc/cassandra-env.sh)
I modified /etc/cassandra/cassandra.yaml as following.
auto_bootstrap:false ->true
seeds: -127.0.0.1 -> add Global IP addres of 2 servers(incl.own server)
listen_address:localhost -> Own Global IP address(or own host name on
/etc/hosts)
rpc_address:localhost ->0.0.0.0
I run master server and then slave server.
netstat -nl is as following. on both servers.
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:9160 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:10036 0.0.0.0:* LISTEN
tcp 0 0 **.**.**.**:7000 0.0.0.0:* LISTEN
However it seems Cassandra doesn't work.
Because I can't get any data from Cluster (always null, data is broken?)
So I checked the nodetool (nodetool --host IP ring).
The nodetool had errors as following.
Error connection to remote JMX agent!
java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: **.**.**.**;
nested exception is:
java.net.ConnectException: Connection refused]
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:342)
at
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
at org.apache.cassandra.tools.NodeProbe.connect(NodeProbe.java:137)
at org.apache.cassandra.tools.NodeProbe.<init>(NodeProbe.java:107)
at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:511)
Caused by: javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: **.**.**.**;
nested exception is:
java.net.ConnectException: Connection refused]
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118)
at
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203)
at javax.naming.InitialContext.lookup(InitialContext.java:409)
at
javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1902)
at
javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1871)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:276)
... 4 more
Caused by: java.rmi.ConnectException: Connection refused to host:
**.**.**.**; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:340)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:114)
... 9 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at java.net.Socket.<init>(Socket.java:392)
at java.net.Socket.<init>(Socket.java:206)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 14 more
I don't know how to do.
Please advise what am I wrong.
And please let me know how to delete or re-build cluster.
Because I can't even set data or make new column family currently on
Cassandra-Cli.
Thank you for your help in advance.
--
**
--
*************************
Mamoru Kondo
Vivid Navigation,Inc.
http://www.vivinavi.com
ko...@vivinavi.com
Office:310-326-2900
Fax:310-257-0051
*************************