[英]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: 到目前为止,我有:
Am I missing something? 我想念什么吗?
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.