Neo4j Web Socket Error


(Anshulghogre) #1

When I am trying to login neo4j browser with default id password i.e. neo4j/neo4j am getting below error:

**> ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver.**

I changed few things to neo4j.conf file also as mentioned in

  1. Use Chrome
  2. Set dbms.connector.bolt.tls_level=OPTIONAL in your neo4j config.
  3. Set bolt connection property as FALSE.

But still ending with the same error.
I am using neo4j:latest docker image in an Azure platform as container instance.

Please help me to resolve this issue.

(M. David Allen) #2

Can you provide some extra details?

  • When you connect via chrome, what is the URL you're using? (HTTPS or HTTP, and which port?)
  • Take a screenshot of browser and post here, including address bar.

(Mp5088643) #3

I have encountered the same situation.
2018-12-11 02:04:46.168+0000 INFO [REQUEST] [AsyncLog @ 2018-12-11 02:04:46.167+0000] - [Tue Dec 11 10:04:46 CST 2018] "/browser/?null" 200 2895 "" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36" 2
2018-12-11 02:04:46.493+0000 INFO [REQUEST] [AsyncLog @ 2018-12-11 02:04:46.493+0000] - [Tue Dec 11 10:04:46 CST 2018] "/?null" 200 146 "" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36" 2
2018-12-11 02:04:46.713+0000 INFO [REQUEST] [AsyncLog @ 2018-12-11 02:04:46.713+0000] - [Tue Dec 11 10:04:46 CST 2018] "/browser/assets/images/device-icons/favicon-32x32.png?null" 200 2216 "" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36" 1


Network connector configuration


With default configuration Neo4j only accepts local connections.

To accept non-local connections, uncomment this line:


You can also choose a specific network interface, and configure a non-default

port for each connector, by setting their individual listen_address.

The address at which this server can be reached by its clients. This may be the server's IP address or DNS name, or

it may be the address of a reverse proxy which sits in front of the server. This setting may be overridden for

individual connectors below.


You can also choose a specific advertised hostname or IP address, and

configure an advertised port for each connector, by setting their

individual advertised_address.

Bolt connector


HTTP Connector. There can be zero or one HTTP connectors.


HTTPS Connector. There can be zero or one HTTPS connectors.


neo4j.conf File settings as above.Never been able to access the database remotely

(Mp5088643) #4

the screenshot of browser

(M. David Allen) #5

We provide support to run Neo4j in Azure in an easy way, you can read about that here:

However -- if you want to stick with the Docker approach, have you verified that through your network settings port 7687 is open? It's not clear why the connection is failing, so I'm wondering if you've eliminated connection timeouts or firewall / dropped packets as a cause.

(Anshulghogre) #6

I tried usiong both https and http with 7473 and 7474 respectively, still facing same error.

(Anshulghogre) #7

Earlier it was working perfectly fine sincelast 2 months. Suddenly this error occurred last week. All ports are open.

(M. David Allen) #8

I'm going to try to raise this to more attention internally and see if I can find you an answer; please stand by. When you say "all ports are open", it would help if you could post the evidence that port 7687 is open for TCP because that's the most likely culprit in my mind. Port 7474 and 7473 affect how you fetch the web page that is Neo4j Browser, but when you try to connect to the database you're going over port 7687 (bolt TCP) to the database directly.

(Ali Ince) #9

Hi All,

We had identified a regression in Neo4j 3.5.0 that prevents the discovery document (which Neo4j Browser uses to discover the bolt address) being served includes localhost as the host name rather than the expected host name derived from the request URI.

The bug has already been fixed in the code base and will be included in the next patch release.

In the meantime, you can explicitly set dbms.connector.bolt.advertised_address configuration option to your expected externally visible address, for example to as per the screen shot @mp5088643 has shared earlier in the thread.

Troubleshooting Connection Issues to Neo4j
(Krazy Coder) #10

Any update on the solution above ? I have just tried this solution with Community Edition 3.5.1 and I face the same issue as well. After reading some posts for solutions, I have the following configurations set up in the neo4j.conf file.

dbms.connectors.default_advertised_address="external IP"




  • Using Chrome
  • Installed Community Edition v3.5.1 in Win 10 Pro

I can access the Neo4j browser via localhost but not via IP. Any comments and suggestions ? Thanks very much !


(Michael Hunger) #11

Can you try what Ali shared here: