socket.gaierror:提供了[Errno 8]节点名或服务名,或者在启动cqlsh时未知

时间:2018-11-12 02:37:04

标签: cassandra

我的计算机上安装了多个版本的cassandra,启动cassandra时,我在下面的日志中看到。

INFO  [main] 2018-11-11 18:21:43,628 StorageService.java:2292 - Node localhost/127.0.0.1 state jump to NORMAL
INFO  [main] 2018-11-11 18:21:43,837 NativeTransportService.java:75 - Netty using Java NIO event loop
INFO  [main] 2018-11-11 18:21:43,905 Server.java:155 - Using Netty Version: [netty-buffer=netty-buffer-4.0.44.Final.452812a, netty-codec=netty-codec-4.0.44.Final.452812a, netty-codec-haproxy=netty-codec-haproxy-4.0.44.Final.452812a, netty-codec-http=netty-codec-http-4.0.44.Final.452812a, netty-codec-socks=netty-codec-socks-4.0.44.Final.452812a, netty-common=netty-common-4.0.44.Final.452812a, netty-handler=netty-handler-4.0.44.Final.452812a, netty-tcnative=netty-tcnative-1.1.33.Fork26.142ecbb, netty-transport=netty-transport-4.0.44.Final.452812a, netty-transport-native-epoll=netty-transport-native-epoll-4.0.44.Final.452812a, netty-transport-rxtx=netty-transport-rxtx-4.0.44.Final.452812a, netty-transport-sctp=netty-transport-sctp-4.0.44.Final.452812a, netty-transport-udt=netty-transport-udt-4.0.44.Final.452812a]
INFO  [main] 2018-11-11 18:21:43,905 Server.java:156 - Starting listening for CQL clients on localhost/127.0.0.1:9042 (unencrypted)...
INFO  [main] 2018-11-11 18:21:43,954 CassandraDaemon.java:529 - Not starting RPC server as requested. Use JMX (StorageService->startRPCServer()) or nodetool (enablethrift) to start it

启动cqlsh时出现以下错误。

Traceback (most recent call last):
  File "/Users/hsjagadeesh/Softwares/apache-cassandra-3.11.2/bin/cqlsh.py", line 2443, in <module>
    main(*read_options(sys.argv[1:], os.environ))
  File "/Users/hsjagadeesh/Softwares/apache-cassandra-3.11.2/bin/cqlsh.py", line 2421, in main
    encoding=options.encoding)
  File "/Users/hsjagadeesh/Softwares/apache-cassandra-3.11.2/bin/cqlsh.py", line 485, in __init__
    load_balancing_policy=WhiteListRoundRobinPolicy([self.hostname]),
  File "/Users/hsjagadeesh/Softwares/apache-cassandra-3.11.2/bin/../lib/cassandra-driver-internal-only-3.11.0-bb96859b.zip/cassandra-driver-3.11.0-bb96859b/cassandra/policies.py", line 417, in __init__
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

我进行了一些搜索,我在/ etc / hosts文件中将127.0.0.1映射到localhost。当我ping时,我的反应不佳。

My-MacBook-Pro-2:bin My$ ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.056 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.085 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.071 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.082 ms

不确定如何解决此问题。

0 个答案:

没有答案