Explanation of error "WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver

In Neo4j 3.0 and its implementation of the Bolt protocol, if a remote browser connects to Neo4j (http://<remote_neo4j_host>:7474) and attempts to authenticate, the following error may be encountered:

[red]#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#

This error can be resolved by editing the file $NEO4J_HOME/conf/neo4j.conf and uncommenting:

# To have Bolt accept non-local connections, uncomment this line:
dbms.connector.bolt.address=0.0.0.0:7687

@dana_canzano I'm having the problem on Firefox, but not on Chrome.

I did go into neo4j.conf. Specifically, I found it at /etc/neo4j. I do not find the line that you state. Instead I find the following:

# Bolt connector
dbms.connector.bolt.enabled=true
dbms.connector.bolt.tls_level=REQUIRED
dbms.connector.bolt.listen_address=0.0.0.0:7687

Why don't I see the line you are stating? Also, given that it works for Chrome, does that mean that I have a different problem in FireFox? Any suggestion how to proceed.

Thanks!

I am having the same issue. I have deployed thee different Neo4j community AMI's(3.4.4), two via the console and one via a CFT. All fail trying to connect via the browser. I need this to work without having to edit the files once deployed. The market place AWS AMI of Neo4j works fine. But they do not load in the free tier. Just wanted it to work.....

I don't know what causes this, but I did find a way of fixing it.

I guess you are probably accessing the web browser via an IP address, say X.X.X.X:7474.

Open a new tab and go to X.X.X.X:7687. It will complain of an invalid certificate and you should add it as an exception.

Then, try to connect again on the original screen. Your browser should trust the credentials needed for the BOLT connection to work.

Hey @rickerg0 did you get this working?

Whether in Chrome or any browser, I'm receiving the same issue. Curious if we need an SSL cert to get this working...

Adding this line

dbms.connector.bolt.address=0.0.0.0:7687
or
dbms.connector.bolt.listen_address=0.0.0.0:7687

Didn't help in my case. And, please note, I'm facing this problem only with browser, I'm successfully able to connect to it from my python code.

Does anyone know how to get around this?

1 Like

hi

I put the tsl in OPTIONAL , it works for my.

Bolt connector

dbms.connector.bolt.enabled=true
dbms.connector.bolt.tls_level=OPTIONAL
#dbms.connector.bolt.listen_address=:7687

@dana_canzano I am still at a loss as to how to get this working. What you recommended hasn't work and I haven't been able to get the other recommendations on here to solve my problem either....
This is what I currently have set:

I'm having this issue too. My browser is pulling up SOMETHING, but I have no idea what or from where... I tried uninstalling everything locally, removing everything related to neo4j, but bolt://localhost:7687/browser will still load a mysterious database from somewhere... that's NOT the one in my docker container that I can read/write access with my python script. I want to see it with the browser so I can see what's going on, and can't for the life of my figure out how to connect it, or what the heck this other thing is connected to.

I had been having this same problem, and tried all of the above. However, I just discovered that the local RHEL firewall on my server had a mis-typed port. I had added 7867 instead of 7687. So what finally fixed it for me is the line:
firewall-cmd --permanent --add-port=7687/tcp --zone=internal

and then reloading the rules:
firewall-cmd --reload

Don't know if this will solve everyone's issues, but did in my case.

I had been tackle with the same issue and finally I could fix my issue.

comment out:
dbms.default_listen_address=0.0.0.0
comment out and set your server address like 192.168.xxx.yyy:
dbms.default_advertised_address=YOUR.SERVER.ADDRESS

Best,

I am also facing issue in chrome ,not in Firefox

I'm using macOS, so file $NEO4J_HOME/conf/neo4j.conf How can I find it?