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
687 stars 347 forks source link

Failed to connect to remote server with bolt #1082

Closed kinokn closed 4 years ago

kinokn commented 4 years ago

I've newly installed neo4j on Ubuntu 19.10, after setting the conf I can login to neo4j browser. But whatever command I execute, I got SessionExpired. Also the login is too slow, taking about a minute.

The firewall works properly, I can telnet both 7474 and 7687. Also, I can ssh to the server and run cypher shell to execute commands. So it should be a network problem.

ERROR SessionExpired
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

My config file:

dbms.default_listen_address=0.0.0.0

#dbms.default_advertised_address=0.0.0.0

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

# HTTP Connector. There can be zero or one HTTP connectors.
dbms.connector.http.enabled=true
dbms.connector.http.listen_address=:7474

# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=false
dbms.connector.https.listen_address=:7473

# Number of Neo4j worker threads.
#dbms.threads.worker_count=

Service status:

● neo4j.service - Neo4j Graph Database
   Loaded: loaded (/lib/systemd/system/neo4j.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-04-10 18:32:07 UTC; 7min ago
 Main PID: 10595 (java)
    Tasks: 45 (limit: 1078)
   Memory: 285.6M
   CGroup: /system.slice/neo4j.service
           └─10595 /usr/bin/java -cp /var/lib/neo4j/plugins:/etc/neo4j:/usr/share/neo4j/lib/*:/var/lib/neo4j/plugins/* -server -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNonStaticFields -XX:+DisableExplicitGC -Djdk.nio.maxCachedBufferSize=262144 -D

Apr 10 18:32:07 neo4j[10595]:   run:          /var/run/neo4j
Apr 10 18:32:07 neo4j[10595]: Starting Neo4j.
Apr 10 18:32:08 neo4j[10595]: 2020-04-10 18:32:08.801+0000 WARN  Use of deprecated setting port propagation. port 7687 is migrated from dbms.connector.bolt.listen_address to dbms.connector.bolt.advertised_address.
Apr 10 18:32:08 neo4j[10595]: 2020-04-10 18:32:08.806+0000 WARN  Use of deprecated setting port propagation. port 7474 is migrated from dbms.connector.http.listen_address to dbms.connector.http.advertised_address.
Apr 10 18:32:08 neo4j[10595]: 2020-04-10 18:32:08.807+0000 WARN  Use of deprecated setting port propagation. port 7473 is migrated from dbms.connector.https.listen_address to dbms.connector.https.advertised_address.
Apr 10 18:32:08 neo4j[10595]: 2020-04-10 18:32:08.826+0000 INFO  ======== Neo4j 4.0.3 ========
Apr 10 18:32:08 neo4j[10595]: 2020-04-10 18:32:08.836+0000 INFO  Starting...
Apr 10 18:32:18 neo4j[10595]: 2020-04-10 18:32:18.872+0000 INFO  Bolt enabled on 0.0.0.0:7687.
Apr 10 18:32:18 neo4j[10595]: 2020-04-10 18:32:18.874+0000 INFO  Started.
Apr 10 18:32:21 neo4j[10595]: 2020-04-10 18:32:21.547+0000 INFO  Remote interface available at http://localhost:7474/

I've also tried Node JS driver, and got this error

Neo4jError: Failed to connect to server. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0. Caused by: write after end
Rubix982 commented 3 years ago

@kiiirzzz did you find a solution?