首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >尝试使用Python连接到Gremlin服务器时的ConnectionRefusedError

尝试使用Python连接到Gremlin服务器时的ConnectionRefusedError
EN

Stack Overflow用户
提问于 2018-06-15 03:02:09
回答 1查看 761关注 0票数 1

我正在尝试使用gremlin和python以及gremlinpython包。我得到了以下错误。有人能告诉我怎么解决这个问题吗?任何帮助都是非常感谢的。

代码语言:javascript
复制
Traceback (most recent call last):
      File "C:/Users/Yash/IdeaProjects/new/gremlin.py", line 10, in <module>
        g = graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
      File "C:\Users\Yash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\gremlin_python\driver\driver_remote_connection.py", line 45, in __init__
        password=password)
      File "C:\Users\Yash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\gremlin_python\driver\client.py", line 76, in __init__
        self._fill_pool()
      File "C:\Users\Yash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\gremlin_python\driver\client.py", line 88, in _fill_pool
        conn = self._get_connection()
      File "C:\Users\Yash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\gremlin_python\driver\client.py", line 101, in _get_connection
        self._transport_factory, self._executor, self._pool)
      File "C:\Users\Yash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\gremlin_python\driver\connection.py", line 40, in __init__
        self.connect()
      File "C:\Users\Yash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\gremlin_python\driver\connection.py", line 46, in connect
        self._transport.connect(self._url)
      File "C:\Users\Yash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\gremlin_python\driver\tornado\transport.py", line 33, in connect
        lambda: websocket.websocket_connect(url))
      File "C:\Users\Yash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tornado\ioloop.py", line 458, in run_sync
        return future_cell[0].result()
      File "C:\Users\Yash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tornado\concurrent.py", line 238, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 4, in raise_exc_info
    ConnectionRefusedError: [Errno 10061] Unknown error
EN

回答 1

Stack Overflow用户

发布于 2019-05-28 10:58:14

检查您的配置,将主机设置为ip而不是主机名

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50864225

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档