[英]Neo4j can't open database created by neo4j-admin import(neo4j-import)

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.

問題真的困擾了我一段時間。我嘗試使用neo4j 3.2.2按照[教程] [1]導入數據,但是如果我將數據庫路徑更改為我創建的路徑,似乎無法打開我的網頁。以下是我的步驟。如果有一些愚蠢的錯誤,請告訴我。

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

    在/ var / lib / neo4j / data / databases /(Ubuntu 16中neo4j的默認根目錄)下創建一個neo4j數據庫:

    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

    將neo4j.conf中的dbms.active_database更改為:dbms.active_database = mygraph.db

  3. start neo4j with service neo4j start

    用服務neo4j start啟動neo4j

  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:

    嘗試用localhost打開網頁:7474 / browser /但我不知道為什么我不能打開網頁了,它表明:

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.

但是如果我通過更改dbms.active_database = graph.db切換回默認數據庫,我可以再次打開網頁。

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.

    沒有使用neo4j啟動neo4j。 import-tool教程要求我們在數據庫目錄中使用neo4j restart,但是我不能使用neo4j start來使用neo4j,neo4j社區也不推薦使用neo4j。

  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


1 个解决方案



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



粤ICP备14056181号  © 2014-2020