简体   繁体   English

Heroku PR App无法连接到GrapheneDB

[英]Heroku PR App can't connect to GrapheneDB

I just created a new PR App in Heroku with the GrapheneDB add on. 我刚刚在Heroku中添加了GrapheneDB创建了一个新的PR App。

I'm seeing the following in my logs: 我在日志中看到以下内容:

2018-05-18T20:11:52.702973+00:00 app[web.1]: neo4j.exceptions.ProtocolError: Connection to ('ip', 24786) closed without handshake response
2018-05-18T20:11:52.704465+00:00 app[web.1]: 2018-05-18 20:11:52,704 INFO     ~~ [CONNECT] ('ip', 24786)
2018-05-18T20:11:52.705999+00:00 app[web.1]: 2018-05-18 20:11:52,705 INFO     C: [HANDSHAKE] 0x6060B017 [1, 0, 0, 0]
2018-05-18T20:11:52.707922+00:00 app[web.1]: 2018-05-18 20:11:52,707 ERROR    S: [CLOSE]
2018-05-18T20:11:52.710745+00:00 app[web.1]: 2018-05-18 20:11:52,708 ERROR    Connection to ('ip', 24786) closed without handshake response

So far I have: 到目前为止,我有:

  • Connected to the browser 连接到浏览器
  • nslookup from the console shows the same ip as the logs (I can't ping from the heroku instance) 控制台中的nslookup显示的IP与日志相同(我无法从heroku实例ping)
  • Rotated database credentials from the GrapheneDB dashboard 从GrapheneDB仪表板旋转的数据库凭据
  • Removed the add on and re-added it 删除了添加项并重新添加了它

Am I missing something? 我想念什么吗?

Env: ENV:

  • Python 3.6.5 的Python 3.6.5
  • neo4j-driver 1.5.3 neo4j驱动程序1.5.3

Driver Python Code: 驱动程序Python代码:

from django.conf import settings
from django.utils.functional import SimpleLazyObject

from neo4j.v1 import GraphDatabase, basic_auth, TRUST_ON_FIRST_USE


def get_driver():
    return GraphDatabase.driver(
        settings.NEO4J_BOLT_URL,
        auth=basic_auth(settings.NEO4J_USERNAME, settings.NEO4J_PASSWORD),
        encrypted=False,
        trust=TRUST_ON_FIRST_USE,
    )


driver = SimpleLazyObject(get_driver)

Just to follow up. 只是跟进。 It turns out that TRUST_ON_FIRST_USE does not work with GrapheneDB. 事实证明, TRUST_ON_FIRST_USE与GrapheneDB不兼容。 TRUST_ON_FIRST_USE is also now deprecated. TRUST_ON_FIRST_USE现在也已弃用。

Removing it allowed the connection to Neo4j work. 删除它可以连接到Neo4j。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM