【问题标题】:SSH tunnel my Neo4j graph databaseSSH 隧道我的 Neo4j 图形数据库
【发布时间】:2018-02-13 05:26:14
【问题描述】:

尝试设置从我的 neo4j 3.2.3 图形数据库到我的本地计算机的 ssh 隧道。尝试像我为隧道 jupyter 笔记本所做的那样设置它,但看起来 neo4j 正在阻止身份验证或其他东西。

到目前为止,我已尝试根据在线研究更改我的(远程)EC2 实例上的 neo4j.conf 文件:

# Whether requests to Neo4j are authenticated.
# To disable authentication, uncomment this line
dbms.security.auth_enabled=false

# With default configuration Neo4j only accepts local connections.
# To accept non-local connections, uncomment this line:
dbms.connectors.default_listen_address=0.0.0.0

# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=true
dbms.connector.https.listen_address=0.0.0.0:7473
#dbms.connector.https.address=0.0.0.0:7473

在我的本地机器上,我设置了一个 ssh 隧道,就像我为 jupyter notebook 隧道设置的一样(我已经为同一个 EC2 实例成功设置了该隧道): ssh -NfL localhost:7474:localhost:7474 project

当我尝试在本地计算机上打开浏览器 localhost:7474 时,我看到了 Neo4j 浏览器的欢迎屏幕,但它并没有让我登录到数据库。相反,我收到“WebSocket 连接失败”。

它正在自动填充主机:使用我不熟悉的bolt://localhost:7687。还要输入用户名和密码(已正确输入)。

有人知道如何通过 ssh 隧道成功地将 neo4j(版本 3.2.3)数据库连接到本地机器吗?

【问题讨论】:

    标签: neo4j ssh-tunnel


    【解决方案1】:

    在您的配置中,它使用端口 7473,但在您的隧道中,您使用的是 7474。不可能这么简单,不是吗? :)

    【讨论】:

      【解决方案2】:

      Neo4J 基本上运行大量不同的端口:7474 是您的 HTTP 网络端口,但它也在不同的端口上运行“bolt”:通常是 7687。这也是一个 TCP 端口,所以你需要 ssh 隧道那也是。

      ssh -NfL localhost:7474:localhost:7474 -L localhost:7687:localhost:7687 project

      应该为您解决。您可能需要在 neo4j 配置中为 Bolt 配置端口

      【讨论】:

        猜你喜欢
        • 2014-10-04
        • 1970-01-01
        • 2020-02-01
        • 1970-01-01
        • 2014-07-20
        • 2013-02-05
        • 2016-09-08
        • 2014-09-17
        • 2012-08-08
        相关资源
        最近更新 更多