Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote connection to Neo4j server

Tags:

neo4j

I believe the way to creating a remote connection is by changing this line in conf/neo4j-server.properties, specifically by removing the comment and restarting the server.

org.neo4j.server.webserver.address=0.0.0.0

My URL is https://0.0.0.0:7473/browser/ and works on the local machine, but when I test the URL in Safari on iPhone over 3G, it cannot connect.

What do I set the address to in the properties file?

I thought it was the IP address of my computer, but after trying the remote address which I got from Googling “ip address mac” that didn’t work, nor did (obviously) the local IP address of my machine, 192.168.0.14

I should point out that setting it to the IP address from Google throws an error and the log reads:

2015-01-29 17:10:08.888+0000 INFO  [API] Failed to start Neo Server on port [7474], reason [MultiException[java.net.BindException: Can't assign requested address, java.net.BindException: Can't assign requested address]]
like image 442
Adam Carter Avatar asked Jan 29 '15 17:01

Adam Carter


People also ask

How do I connect to a Neo4j server?

Neo4j Browser is the easiest way to access a Neo4j database. To establish a connection, you enter the DBMS URL, the name of the database you want to connect, and the user credentials. You can also use the :server command to manage the connection to Neo4j. For more information, see Manage connection commands.

Can't connect to Neo4j?

Troubleshooting steps: Ensure that the address is correct. Ensure that if the server is listening for bolt connections on a port other than 7687, that you pass the port explicitly to your client (e.g. cypher-shell) or other program you have written. Ensure that firewall rules do not prohibit traffic on the bolt port.

Does Neo4j have a GUI?

There are at least 3 GUI tools for neo4j that allow editing: neoclipse. Gephi. linkurious.

Is Neo4j free for commercial use?

Neo4j offers a number of commercial licensing options, including free licenses for development, startups, academic-educational uses and of course, evaluation.


2 Answers

With default configuration Neo4j only accepts local connections

In neo4j-community-3.1.0 edit conf/neo4j.conf file and uncomment the following to accept non-local connections

dbms.connectors.default_listen_address=0.0.0.0
like image 70
Prasad Khode Avatar answered Oct 07 '22 21:10

Prasad Khode


By setting

org.neo4j.server.webserver.address=0.0.0.0

enables Neo4j on all network interfaces.

The remainder of that reply is not Neo4j related at all - it's regular networking. Double check if port 7473 (and/or 7474) are not blocked neither be a locally running firewall nor by your router. You local IP 192.168.0.14 indicates you're behind a router doing NAT. Therefore you have to setup a port forwarding in your router for the ports mentioned above.

Please be aware that this is potentially dangerous since everyone knowing your external IP can access your Neo4j instance. Consider using either https://github.com/neo4j-contrib/authentication-extension or use a VPN in favour of port forwarding.

like image 35
Stefan Armbruster Avatar answered Oct 07 '22 21:10

Stefan Armbruster