是的,我意识到我正在Linode上运行Cassandra。 是的,我知道在Rackspace或亚马逊上运行它会更好,但现在无关紧要。
基本上,我已经为我计划包含在我的集群中的每个Linode设置了专用IP。 我可以在这些私人IP上ping我的Linode,这样他们就可以互相交谈了。
以下是我的“主”Linode的storage-conf.xml文件中的一些片段:
<Seeds> <Seed>192.168.133.219</Seed> </Seeds> <ListenAddress>192.168.133.219</ListenAddress> <StoragePort>7000</StoragePort> <ThriftAddress>192.168.133.219</ThriftAddress> <ThriftPort>9160</ThriftPort>
服务器的私有IP是192.168.133.219 。
我遇到的问题是:当我启动Cassandra时,会发生什么情况:
$ cassandra -f Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: (none): (none)
我不知道是否会有所帮助,但是这里是我的/etc/network/interfaces文件:
auto lo iface lo inet loopback auto eth0 eth0:0 iface eth0 inet static address 97.107.137.96 netmask 255.255.255.0 gateway 97.107.137.1 iface eth0:0 inet static address 192.168.133.219 netmask 255.255.128.0
Linode没有其他configuration。 我甚至没有改变主机文件。 让我知道如果我失去了一些东西。 任何见解都被赞赏!
那么,伙计们,我似乎已经想出了自己的想法。 实际上很愚蠢的问题。
$ hostname <linode hostname goes here> $ echo /etc/hostname < "<linode hostname goes here>" $ reboot
就是这样。 哇靠。