Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将新节点加入Cassandra群集需要多长时间?_Cassandra - Fatal编程技术网

将新节点加入Cassandra群集需要多长时间?

将新节点加入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

我有一台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 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的输出


如果两个连接都正常工作,请尝试打开调试日志记录。

我似乎已通过以下步骤解决了此问题:

  • 在新服务器上删除/var/lib/cassandra/data目录(和子目录)
  • 删除种子服务器上的/var/lib/cassandra/data/system/Schema*文件
  • 删除种子服务器上的/var/lib/cassandra/data/system/Migration*文件
  • 在cassandra cli中的种子服务器上重新创建架构
  • 在新服务器上启动Cassandra
  • 现在我在环中看到了新服务器,尽管它仍然在加入(在以前的加入尝试中它没有出现在环中)。正如在cassandra cli中运行“descripe cluster;”所述,种子服务器和新服务器都位于同一架构上


    我希望这对以后的其他人有所帮助。

    请注意,
    nc
    通常是一种比
    telnet
    更容易用于测试连接的工具。特别是,您可以使用Ctrl-C快速停止它。(
    nc-v 7000
    )。它还支持代理和UDP!