我正在尝试关注Ring配置的Datastax Cassandra自学教程。我按照教程编写了虚拟机中建议的两个节点,但第二个节点无法闲聊。
我验证了listener_address,RPC_address,seed但无法配置环。以下是我收到的例外情况。
我还附加了Cassandra Yaml文件
的节点2:
Cassandra YAML:https://bitbucket.org/snippets/sreevastav/dL99d
Cassandra-env:https://bitbucket.org/snippets/sreevastav/on88p
收到例外:
Exception (java.lang.RuntimeException) encountered during startup: Unable to gossip with any seeds
java.lang.RuntimeException: Unable to gossip with any seeds
at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1354)
at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:553)
at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:807)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:724)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:610)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:333)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:551)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:679)
ERROR 22:03:15 Exception encountered during startup
java.lang.RuntimeException: Unable to gossip with any seeds
at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1354) ~[apache-cassandra-3.0.4.jar:3.0.4]
at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:553) ~[apache-cassandra-3.0.4.jar:3.0.4]
at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:807) ~[apache-cassandra-3.0.4.jar:3.0.4]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:724) ~[apache-cassandra-3.0.4.jar:3.0.4]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:610) ~[apache-cassandra-3.0.4.jar:3.0.4]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:333) [apache-cassandra-3.0.4.jar:3.0.4]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:551) [apache-cassandra-3.0.4.jar:3.0.4]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:679) [apache-cassandra-3.0.4.jar:3.0.4]
答案 0 :(得分:0)
更改Node2 seeds
地址,使其与listen_address
匹配
# Compression to apply to the commit log. If omitted, the commit log
# will be written uncompressed. LZ4, Snappy, and Deflate compressors
# are supported.
#commitlog_compression:
# - class_name: LZ4Compressor
# parameters:
# -
# any class that implements the SeedProvider interface and has a
# constructor that takes a Map<String, String> of parameters will do.
seed_provider:
# Addresses of hosts that are deemed contact points.
# Cassandra nodes use this list of hosts to find each other and learn
# the topology of the ring. You must change this if you are running
# multiple nodes!
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
# seeds is actually a comma-delimited list of addresses.
# Ex: "<ip1>,<ip2>,<ip3>"
- seeds: "127.0.0.2,127.0.0.1"