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

browser
bolt
websocket
knowledge-base

(Dana Canzano) #1

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

(Yyakovson613) #2

@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!


(Rickerg0) #3

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.....


(Guilherme Junqueira) #4

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.