我有 datastax-cassandra 1.2.5,我在 .yaml 文件中有以下设置
- 存储端口:7000
- ssl_storage_port:7001
- 监听地址:本地主机
- rpc_port:9160
我不断得到这个。我尝试过一次更改存储端口并且它可以工作,但不是在同一件事之后。我无法再次重新启动 cassandra
INFO 16:33:02,714 Completed flushing /var/lib/cassandra/data/system/local/system-local-ic-17-Data.db (241 bytes) for commitlog position ReplayPosition(segmentId=1371684781848, position=50142)
ERROR 16:33:02,793 Exception encountered during startup
java.lang.RuntimeException: java.net.BindException: Can't assign requested address
at org.apache.cassandra.net.MessagingService.getServerSocket(MessagingService.java:446)
at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:389)
at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:583)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:548)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:445)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:325)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:413)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:456)
Caused by: java.net.BindException: Can't assign requested address
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:344)
at sun.nio.ch.Net.bind(Net.java:336)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at org.apache.cassandra.net.MessagingService.getServerSocket(MessagingService.java:436)
... 7 more
java.lang.RuntimeException: java.net.BindException: Can't assign requested address
at org.apache.cassandra.net.MessagingService.getServerSocket(MessagingService.java:446)
at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:389)
at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:583)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:548)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:445)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:325)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:413)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:456)
Caused by: java.net.BindException: Can't assign requested address
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:344)
at sun.nio.ch.Net.bind(Net.java:336)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at org.apache.cassandra.net.MessagingService.getServerSocket(MessagingService.java:436)
... 7 more
Exception encountered during startup: java.net.BindException: Can't assign requested address
ERROR 16:33:02,798 Exception in thread Thread[StorageServiceShutdownHook,5,main]
java.lang.NullPointerException
at org.apache.cassandra.service.StorageService.stopRPCServer(StorageService.java:321)
at org.apache.cassandra.service.StorageService.shutdownClientServers(StorageService.java:362)
at org.apache.cassandra.service.StorageService.access$000(StorageService.java:88)
at org.apache.cassandra.service.StorageService$1.runMayThrow(StorageService.java:513)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
at java.lang.Thread.run(Thread.java:722)