一下午都在处理这个报错neo4j.exceptions.ServiceUnavailable: Unable to retrieve routing information
问了ai无数次,查找了无数次原因,无法解决。
遂使用古法的debug方式,上浏览器找解决办法了。
于是在https://stackoverflow.com/questions/73025684/unable-to-retrieve-routing-information-neo4j
里面看到了答案
This could be due to the certificate error. It worked for me after changing the certificate to self signed SSL. You could try using neo4j+ssc://{IP_address}:{Port} as the link to DB.
证书验证问题。
方案1:修改 .env 文件使用 neo4j+ssc://
方案2:使用 bolt+ssc://(备选)
为什么这样可以解决?
-
neo4j+s://- 需要有效的 SSL 证书验证 -
neo4j+ssc://- 使用自签名证书(self-signed certificate),跳过证书验证
Neo4j Aura 免费实例使用的是自签名证书,所以需要 +ssc 协议。