Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebSocket connection failure. Due to security constraints in your web browser

Tags:

neo4j

Today I download neo4j-community-3.2.0 in windows, when i start the server, i meet one problem in browser, i meet this problem in neo4j-community-3.1.2 and i had solved it by Ticking the "Do not use Bolt" option in settings solved the issue. But in neo4j-community-3.2.0 , i can't see "Do not use Bolt" option ,and i don't know how to do.

N/A: 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

like image 996
WKQ Avatar asked Jun 07 '17 07:06

WKQ


2 Answers

This happens because the browser is trying (under the hood) to also access the bolt port, which uses an unsigned certificate.

You probably allowed the browser to access the SSL 7474 port through allowing the unsigned certificate as an exception on your browser (and if you didn't, you should in order to make it work). The url was:
https://[neo4j_host]:7474

Do the same for the bolt certificate, allow it as an exception for url:
https://[neo4j_host]:7687

like image 105
PeterN Avatar answered Nov 15 '22 12:11

PeterN


I ran into the same problem trying to use Neo4j Community Edition on an AWS Ubuntu 16.04 instance. The key thing that solved it was to open port 7687 (the bolt port) in the AWS security group settings.

Found this based on https://stackoverflow.com/a/45234105/1529646

Thus, full answer is:

  1. Make sure to configure Neo4j correctly, ie. uncomment the line dbms.connectors.default_listen_address=0.0.0.0 AND the line dbms.connector.bolt.listen_address=:7687
  2. Open ports 7474 AND 7687 in the AWS security group settings.
like image 39
Simon Brunner Avatar answered Nov 15 '22 11:11

Simon Brunner