2
votes

the problem really bothered me for a while. I try to import data follow this [tutorial][1] with neo4j 3.2.2, but it seems I can't open my web anymore if I change the database path to the one I created. The following is my steps. Please let me know if there are some stupid mistakes.

  1. Create an neo4j database under /var/lib/neo4j/data/databases/ (The default root of neo4j in Ubuntu 16):

    sudo neo4j-admin import --database=mygraph.db --nodes=movies.csv --nodes=actors.csv --relationships roles.csv
    

    All the data is from the neo4j-import tutorial

  2. Changed the dbms.active_database in neo4j.conf to: dbms.active_database=mygraph.db

  3. start neo4j with service neo4j start

  4. try to open the web page with localhost:7474/browser/ But I don't know why I can't open the webpage anymore, it shows that:

This site can't be reached, localhost resused to connect, ERR_CONNECTION_REFUSED

But if I switch back to the default database by changing dbms.active_database=graph.db I can open the webpage again.

I'm thinking there could be two potential reasons for this:

  1. Haven't used neo4j start to start neo4j. The tutorial for import-tool asked us to use neo4j restart in the database directory, but I can't use neo4j start to use neo4j, which is also not recommended from neo4j community anymore.

  2. The neo4j import is for some old version's neo4j and there are some bugs for the current one. Since I compared the database files from the good one and the one created from neo4j-admin import, there are some difference, from left to right: good, bad.

enter image description here

The following is the log that I created the database:

enter image description here

Thanks for your help, appreciate it

2

2 Answers

2
votes

My guess would be that the ownership of the newly created database is not correct. You are running neo4j-admin with sudo (without specifying a user) ... so the database is created as root. However, the service runs as neo4j. Please change the ownership of the whole mygraph.db directory to neo4j:adm first and then try again.

Hope this helps.

Regards, Tom

1
votes

You forget to change the paths of directories in the installations.

"dbms.directories.data=/var/lib/neo4j/data/databases/"

Good luck!