Cassandra部署集群失败
Cassandra deploy cluster failure
我正在尝试在 AWS 上部署 Cassandra 集群。我按照 http://datastax.com/documentation/cassandra/2.1/cassandra/install/installAMI.html 上的说明进行操作
看起来一切正常,但一个节点仍然收到 0 响应。在初始脚本之后我 运行
cassandra-stress write
rest 两个节点上的命令,一切正常。当我尝试 运行
nodetool status
在失败的节点上执行命令,我收到此错误消息
nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused'.
我寻找 cassandra 服务,但它已关闭,当我启动它并再次 运行 我收到此错误
error: No nodes present in the cluster. Has this node finished starting up?
-- StackTrace --
java.lang.RuntimeException: No nodes present in the cluster. Has this node finished starting up?
at org.apache.cassandra.dht.Murmur3Partitioner.describeOwnership(Murmur3Partitioner.java:129)
at org.apache.cassandra.service.StorageService.effectiveOwnership(StorageService.java:3763)
at org.apache.cassandra.service.StorageService.effectiveOwnership(StorageService.java:104)
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:606)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
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:606)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)
at javax.management.remote.rmi.RMIConnectionImpl.access0(RMIConnectionImpl.java:97)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)
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:606)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport.run(Transport.java:177)
at sun.rmi.transport.Transport.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:556)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
当我再次 运行 时,我遇到了第一个错误,cassandra 服务已关闭。我还更改了 /etc/cassandra/cassandra.yaml 文件。我设置种子、侦听器地址、rpc 地址、集群名称和令牌,与集群的其余部分相同。当我再次 运行 时,Cassandra 服务出现故障。我该如何解决?
"Has node finished starting up"表示Cassandra还在启动。这可能需要几分钟时间。还有其他错误吗?
什么是
nodetool status
从其他节点说?
从这个节点尝试远程登录到其他节点的端口 7000。并从其他节点尝试对该节点执行相同的操作。您很可能为此节点分配了不同的安全组,这就是它无法连接到集群其余部分的原因。
I set up seeds, listener address, rpc address, cluster name and token
same as the rest of the cluster.
P.S。我希望你没有给这个节点分配相同的令牌并且你设置的监听器地址是节点自己的IP,而不是其他节点的IP?
我正在尝试在 AWS 上部署 Cassandra 集群。我按照 http://datastax.com/documentation/cassandra/2.1/cassandra/install/installAMI.html 上的说明进行操作 看起来一切正常,但一个节点仍然收到 0 响应。在初始脚本之后我 运行
cassandra-stress write
rest 两个节点上的命令,一切正常。当我尝试 运行
nodetool status
在失败的节点上执行命令,我收到此错误消息
nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused'.
我寻找 cassandra 服务,但它已关闭,当我启动它并再次 运行 我收到此错误
error: No nodes present in the cluster. Has this node finished starting up? -- StackTrace -- java.lang.RuntimeException: No nodes present in the cluster. Has this node finished starting up? at org.apache.cassandra.dht.Murmur3Partitioner.describeOwnership(Murmur3Partitioner.java:129) at org.apache.cassandra.service.StorageService.effectiveOwnership(StorageService.java:3763) at org.apache.cassandra.service.StorageService.effectiveOwnership(StorageService.java:104) 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:606) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75) 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:606) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487) at javax.management.remote.rmi.RMIConnectionImpl.access0(RMIConnectionImpl.java:97) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848) 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:606) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322) at sun.rmi.transport.Transport.run(Transport.java:177) at sun.rmi.transport.Transport.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:556) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)
当我再次 运行 时,我遇到了第一个错误,cassandra 服务已关闭。我还更改了 /etc/cassandra/cassandra.yaml 文件。我设置种子、侦听器地址、rpc 地址、集群名称和令牌,与集群的其余部分相同。当我再次 运行 时,Cassandra 服务出现故障。我该如何解决?
"Has node finished starting up"表示Cassandra还在启动。这可能需要几分钟时间。还有其他错误吗?
什么是
nodetool status
从其他节点说?
从这个节点尝试远程登录到其他节点的端口 7000。并从其他节点尝试对该节点执行相同的操作。您很可能为此节点分配了不同的安全组,这就是它无法连接到集群其余部分的原因。
I set up seeds, listener address, rpc address, cluster name and token same as the rest of the cluster.
P.S。我希望你没有给这个节点分配相同的令牌并且你设置的监听器地址是节点自己的IP,而不是其他节点的IP?