Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Expect disruption to service on Thursday, Feb. 9!

Spring boot embedded neo4j: not able to connect from client when in docker container

Node Link

Hello all, I upgraded one of my spring boot application from java 8 . I was using spring boot version 2.1.5.RELEASE previously with these all dependencies:






Now upgraded that to java 11 with spring boot version 2.3.3.RELEASE with these dependencies:




I am running embedded neo4j on spring-boot application. It's working fine when running in local. I am not able to connect to database from client server and I am getting this error when server is running on docker container:


Connection to the database terminated. 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.


It was working fine with previous dependency tree with java 8 version. To add on , I am getting this error on neo4j desktop:


ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket readyState is: 3


Client side this is my code snippet:



Config config = Config.builder()
driver = GraphDatabase.driver( uri, config );



and on the server side this is how I am connecting to embedded Neo4J instance: :



DatabaseManagementService managementService = new DatabaseManagementServiceBuilder(databaseDirectory.getCanonicalFile())
                .setConfig(GraphDatabaseSettings.allow_upgrade, true)
                .setConfig(GraphDatabaseSettings.default_database, neo4jProperties.getDbName())
                .setConfig(BoltConnector.encryption_level, BoltConnector.EncryptionLevel.DISABLED)
                .setConfig(BoltConnector.enabled, true)
                        new SocketAddress(neo4jProperties.getListeningAddress()))







Community Team
Community Team

Hello @saritatewari4 

I would recommend opening a ticket here for this issue.

Please post a link to your GitHub ticket here so others can track the progress of this issue.


Community Specialist

Node Link

Hello @TrevorS , Thanks for your response. I have created the ticket. Sharing it for visibility.