docker-neo4j: Unable to connect to Neo4j using Neo4j browser

I have a Neo4j graph with just 100 documents in it. The structure looks like below:

"Person" : {
  "id":"string",
  "name":"string",
  "companies":[
    {
      "id":"string",
      "name":string"
    }
  ]
}

In the Neo4j browser, when I try to execute the query match (n:Person) return n limit 10, it takes long time to respond, eventually times out and returns an error in browser:

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

Neo4j runs in remote node for me (in docker) and I am accessing it from my local machine. As mentioned in this link, I have also set dbms.connector.bolt_listen_address to 0.0.0.0:7687 for it to accept the remote connections. Below is the docker run command:

docker run \
    --name neo4j \
    -p7474:7474 -p7687:7687 \
    -d \
    -v /root/neo4j/data:/data \
    -v /root/neo4j/logs:/logs \
    -v /root/neo4j/import:/var/lib/neo4j/import \
    -v /root/neo4j/plugins:/plugins \
    --env NEO4J_AUTH=neo4j/test \
    --env NEO4J_dbms_connector_bolt_listen__address=0.0.0.0:7687 \
	neo4j:4.0.4

Neo4j Version: 4.0.4 Operating System: Debian GNU/Linux 10 (buster) API: Docker

Steps to reproduce

  1. Pull the image: docker pull neo4j/neo4j:4.0.4
  2. Start the container using the above command
  3. Add documents as per the structure above
  4. Try to query the graph in Neo4j browser

Expected behavior

Neo4j browser should show the nodes and edges in the graph

Actual behavior

All the queries fail with the Websocket error described above

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

@jennyowen I did a rebuild of the container and volumes. The restarting has disappeared now. I assume something got stuck during experimenting and restarting the container. I will create another issue when I’m able to reproduce.