neo4j に接続する Node.js アプリケーションがあります。実行すると正常に動作し、接続できます。ただし、Docker 内で実行すると、次のエラーが発生します。
Neo4jError: Failed to connect to server. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0. Caused by: connect ECONNREFUSED 127.0.0.1:7687
at newError (/usr/src/app/node_modules/neo4j-driver/lib/error.js:75:10)
at NodeChannel._handleConnectionError (/usr/src/app/node_modules/neo4j-driver/lib/internal/node/node-channel.js:229:41)
at Socket.emit (events.js:310:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
私は neo4j-driver v4.0.2 と Neo4j 4.0.3 を使用しています。
問題を再現するためのリポジトリを作成しました: https://github.com/Layvier/test_neo4j
Docker ネットワーキングに関して何か不足していますか?
Python ドライバーに関するこの関連する問題を見つけました: https://github.com/neo4j/neo4j-python-driver/issues/251#issuecomment-420160271
ご協力いただきありがとうございます !