neo4j / neo4j-browser

Neo4j Browser is the general purpose user interface for working with Neo4j. Query, visualize, administrate and monitor the database.
https://neo4j.com
GNU General Public License v3.0
675 stars 346 forks source link

neo4j browser inaccessible over http #1887

Open dzindzinj opened 1 year ago

dzindzinj commented 1 year ago

Might be similar to this issue: https://github.com/neo4j/docker-neo4j/issues/257

We've got a basic neo4j docker image FROM neo4j:4.4.17-community , slightly customised to configure settings and import some data.

Bolt and http connectors are enabled during docker build. These are config options we change with Extension script

"dbms.default_listen_address" "0.0.0.0"
"dbms.connector.bolt.listen_address" "0.0.0.0:7687" 
"dbms.connector.bolt.advertised_address" "0.0.0.0:7687" 
"dbms.connector.http.listen_address" "0.0.0.0:7474"
"dbms.connector.http.advertised_address" "0.0.0.0:7474"
"clients.allow_telemetry" "false" 

When running the container we add NEO4J_AUTH=neo4j/test ENV variable

With above settings and all relevant ports exposed container is working fine and we can log into the browser, use .NET HTTP client or bolt to connect to the container etc...

The Issue For our application we do not require bolt and we would want to disable it. But for troubleshooting we would want to be able to log into the browser to verify node relationships etc.

The documentation at https://neo4j.com/docs/browser-manual/4.4/operations/dbms-connection/ states that we can still access and use neo4j browser like on the old neo4j versions over http by disabling the bolt connector. By default, Neo4j Browser communicates with a Neo4j DBMS via the [Bolt Protocol](https://7687.org/) using the [Neo4j JavaScript Driver](https://neo4j.com/docs/javascript-manual/current/) to execute Cypher queries. However, it is possible to turn off Bolt and use [HTTP(S)] instead, as in older versions of Neo4j Browser.

When we disable bolt on the above working container using ENV variable NEO4J_dbms_connector_bolt_enabled=false we are no longer able to log into the browser. The .NET http client is working fine though...

I have tried to further add these to match my IP address to no avail:

NEO4J_dbms_connector_http_listen__address
NEO4J_dbms_connector_http_advertised__address

The following error is displayed on Edge Browser WebSocket connection to 'ws://192.168.0.104:7474/' failed: Error during WebSocket handshake: Unexpected response code: 200

Steps to reproduce

  1. docker pull neo4j:4.4.17-community
  2. run container with NEO4J_AUTH=neo4j/test NEO4J_dbms_connector_bolt_enabled=false and expose 7474

Expected Behaviour Be able to log in as pre neo4j 3.0

Actual Behaviour WebSocket Error, Unexpected response code:200

dzindzinj commented 1 year ago

After digging through issues I guess it is because of this: https://github.com/neo4j/neo4j-browser/issues/511

Can anyone confirm?

OskarDamkjaer commented 1 year ago

Browser maintainer here, the documention is wrong and we'll make sure to update it. Sadly the javascript driver did not add support for HTTP calls again so browser is bolt only