Ich benutze Docker-Version von neo4j (v3.1.0) und ich habe Schwierigkeiten mit Neo4j-Server mit neo4j-Shell verbinden.neo4j-shell kann keine Verbindung zu neo4j Server
Nachdem eine Instanz von läuft docker, betreibe ich ein Bash im Inneren des Behälters:
$ docker exec -it neo4j /bin/bash
Und von dort Ich versuche, die neo4j-shell
wie dies auszuführen:
/var/lib/neo4j/bin/neo4j-shell
Aber es Fehler:
$ /var/lib/neo4j/bin/neo4j-shell
ERROR (-v for expanded information):
Connection refused
-host Domain name or IP of host to connect to (default: localhost)
-port Port of host to connect to (default: 1337)
-name RMI name, i.e. rmi://<host>:<port>/<name> (default: shell)
-pid Process ID to connect to
-c Command line to execute. After executing it the shell exits
-file File containing commands to execute, or '-' to read from stdin. After executing it the shell exits
-readonly Connect in readonly mode (only for connecting with -path)
-path Points to a neo4j db path so that a local server can be started there
-config Points to a config file when starting a local server
Example arguments for remote:
-port 1337
-host 192.168.1.234 -port 1337 -name shell
-host localhost -readonly
...or no arguments for default values
Example arguments for local:
-path /path/to/db
-path /path/to/db -config /path/to/neo4j.config
-path /path/to/db -readonly
Ich habe auch andere versucht Hosts wie: localhost
, 127.0.0.1
und 172.17.0.6
(der Container IP). Da es nicht funktioniert habe ich auf meinem Behälter offene Ports zur Liste versucht:
$ netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 :::7687 :::* LISTEN
tcp 0 0 :::7473 :::* LISTEN
tcp 0 0 :::7474 :::* LISTEN
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
Wie Sie sehen, gibt es keine 1337
offen! Ich habe in die Konfigurationsdatei geschaut und die Zeile zum Spezifizieren von Port ist auskommentiert, was bedeutet, dass sie auf ihren Standardwert (1337) gesetzt werden sollte.
Kann mir jemand helfen, neo4j-Shell mit neo4j zu verbinden?
BTW, der neo4j-Server läuft und ich kann seinen Web-Zugriff über Port: 7474 verwenden.
Danke, aber ich bin interessiert an 'noe4j-shell' meist, da es' BEGIN' unterstützt, COMMIT 'und Transaktionen. Es scheint, Chiffre-Shell nicht. Könnten Sie mir bitte sagen, welcher Eintrag in der Konfiguration die neo4j-Shell steuert? – Mehran
Fair genug, habe ich meine Antwort mit der Zeile –
geändert Beachten Sie, dass Chiffre-Shell unterstützt beginnen und commit, fügte ein Beispiel hinzu –