Usual workflow for querying neo4j database

Hello,

I'm getting up and started with using neo4j, but I'm a bit confused about the usual workflow. I have neo4j setup on an ubuntu box that I ssh into. Is the idea that I can run neo4j on that box and then access the database for exploring with my browser?

For instance, running sudo service neo4j start, is there some way I can view the database in my local browser?

typically one accesses a running/online database from a browser and connecting to

http://<ip address where Neo4j is running>:7474

for example

http://192.68.1.2:7474

however to do so and so as to allow remote connections one needs to define the conf/neo4j.conf with

dbms.connectors.default_listen_address=0.0.0.0 

see ( Configuration settings - Operations Manual )

2 Likes

Thanks for helping.

I see that I need to access that file, which should be in <neo4j-home>/conf/neo4j.conf, but I'm having trouble finding out what neo4j-home is in my case.
Trying echo $NEO4J_HOME doesn't give me anything. How can I track down the directory?

depending on how Neo4j was installed will determine the location. See Default file locations - Operations Manual which describes the location and per install type

I managed to find the file /etc/neo4j/neo4j.conf. I think this is the file I need to edit? Do I simply add dbms.connectors.default_listen_address=0.0.0.0 anywhere in that file?

Update, I made the changes as above (actually I just uncommented the appropriate line in neo4j.conf).

Then I did sudo neo4j-admin set-initial-password mypassword.

Then sudo neo4j start.

Then I'm told Started neo4j (pid 2394). It is available at http://0.0.0.0:7474/.

According to ip route, the ip for the machine is 172.xx.xx.xx. I point my browser to http://172.xx.xx.xx:7474/ but nothing loads.

What am I doing wrong?

if use 0.0.0.0:7474, the neo4j browser will run on localhost:7474. So in case to remote access with specific IP, you need to specify the ip in dbms.connector.http.listen_address

Thank you. I now have these lines in the my neo4j.conf file:

dbms.connectors.default_listen_address=0.0.0.0
dbms.connector.http.listen_address=172.xx.xx.xx:7474

But still nothing loads when I try to access http://172.xx.xx.xx:7474/ from my local machine nothing loads up.

@Rogie

if you have Python installed and as a test you could have python start up a minimalistic webserver and see if you can reach that. See How do I establish a simple HTTP Server local to my Neo4j Instance to serve CSV files - Knowledge Base and run this on the same server as Neo4j

You can start said webserver by running

python -m SimpleHTTPServer

and then this is reachable via

https://<IP of the Neo4j Instance>:8000

if you cant reach the Python implementation of a webserver and you cant reach the Neo4j webserver that more than likely its something in the network stack preventing

Perhaps Firewall rules?