将新节点加入Cassandra群集需要多长时间?
我有一台Cassandra 1.0.9服务器,它被设置为集群的种子。它有大约34gb的数据。我正试图加入第二个卡桑德拉1.0.9的戒指,并有第一个设置为种子 在/var/lib/cassandra/log/cassandra.log中,我看到:将新节点加入Cassandra群集需要多长时间?,cassandra,Cassandra,我有一台Cassandra 1.0.9服务器,它被设置为集群的种子。它有大约34gb的数据。我正试图加入第二个卡桑德拉1.0.9的戒指,并有第一个设置为种子 在/var/lib/cassandra/log/cassandra.log中,我看到: INFO 20:06:52,809 JOINING: waiting for schema information to complete INFO 20:07:22,815 JOINING: waiting for schema information
INFO 20:06:52,809 JOINING: waiting for schema information to complete
INFO 20:07:22,815 JOINING: waiting for schema information to complete
INFO 20:07:52,817 JOINING: waiting for schema information to complete
.
.
.
INFO 20:10:22,839 JOINING: waiting for schema information to complete
INFO 20:10:52,841 JOINING: waiting for schema information to complete
INFO 20:11:22,847 JOINING: waiting for schema information to complete
INFO [main] 2012-09-11 20:19:52,913 StorageService.java (line 668) JOINING: waiting for schema information to complete
INFO [main] 2012-09-11 20:20:22,919 StorageService.java (line 668) JOINING: waiting for schema information to complete
INFO [main] 2012-09-11 20:20:52,921 StorageService.java (line 668) JOINING: waiting for schema information to complete
.
.
.
INFO [main] 2012-09-11 20:23:22,943 StorageService.java (line 668) JOINING: waiting for schema information to complete
INFO [main] 2012-09-11 20:23:52,945 StorageService.java (line 668) JOINING: waiting for schema information to complete
INFO [main] 2012-09-11 20:24:22,951 StorageService.java (line 668) JOINING: waiting for schema information to complete
在/var/log/cassandra/system log中,我看到:
INFO 20:06:52,809 JOINING: waiting for schema information to complete
INFO 20:07:22,815 JOINING: waiting for schema information to complete
INFO 20:07:52,817 JOINING: waiting for schema information to complete
.
.
.
INFO 20:10:22,839 JOINING: waiting for schema information to complete
INFO 20:10:52,841 JOINING: waiting for schema information to complete
INFO 20:11:22,847 JOINING: waiting for schema information to complete
INFO [main] 2012-09-11 20:19:52,913 StorageService.java (line 668) JOINING: waiting for schema information to complete
INFO [main] 2012-09-11 20:20:22,919 StorageService.java (line 668) JOINING: waiting for schema information to complete
INFO [main] 2012-09-11 20:20:52,921 StorageService.java (line 668) JOINING: waiting for schema information to complete
.
.
.
INFO [main] 2012-09-11 20:23:22,943 StorageService.java (line 668) JOINING: waiting for schema information to complete
INFO [main] 2012-09-11 20:23:52,945 StorageService.java (line 668) JOINING: waiting for schema information to complete
INFO [main] 2012-09-11 20:24:22,951 StorageService.java (line 668) JOINING: waiting for schema information to complete
运行netstats会让我:
Mode: JOINING
Not sending any streams.
Not receiving any streams.
Pool Name Active Pending Completed
Commands n/a 0 5
Responses n/a 0 51966
知道这需要多长时间吗?接收铃声信息只需要几秒钟 识别问题的最佳方法是在两台主机上的log4j-server.properties中打开调试日志记录 我猜其中一台主机无法连接到存储端口(7000或7001)上的另一台主机。可能有不同的原因:主机名错误配置、防火墙、ssl错误配置等。请尝试执行
nodetool -h <hostname> ring
nodetool-h环
命令,然后重试
telnet <hostname> 7000
telnet 7000
从每个主机到另一个主机。确保您使用的主机名来自nodetool的输出
如果两个连接都正常工作,请尝试打开调试日志记录。我似乎已通过以下步骤解决了此问题:
我希望这对以后的其他人有所帮助。请注意,
nc
通常是一种比telnet
更容易用于测试连接的工具。特别是,您可以使用Ctrl-C快速停止它。(nc-v 7000
)。它还支持代理和UDP!