Debian
Neo4j 服務不會從 Debian 上的導入數據庫啟動
我最近在安裝 Debian 7.8 時一直在玩 neo4j。這很棒!
今天我使用 neo4j-import 工具導入了大約 100000 個節點和 75000 個關係。我停止了 neo4j 服務並將導入的數據庫複製到 /var/lib/neo4j/data/graph.db - 但現在 Neo4j 服務將無法啟動
Starting Neo4j Server...WARNING: not changing user process [4963]... waiting for server to be ready....... Failed to start within 120 seconds. Neo4j Server may have failed to start, please check the logs.
這很奇怪,因為它不會等待 120 秒才能啟動 - 最多 5 秒。生成的唯一日誌是 /var/log/neo4j 中的 console.log
2015-07-01 00:10:24.363+0000 INFO [API] Setting startup timeout to: 120000ms based on 120000 2015-07-01 00:10:26.501+0000 INFO [API] Successfully shutdown Neo4j Server.
這不是很有用。當我刪除數據庫時,neo4j 能夠啟動。我將graph.db複製到我的Windows安裝中,它執行良好,我可以搜尋節點等。所以也許它與我的Debian上的配置有關?我在 /etc/neo4j/neo4j-server.properties 添加了一行
org.neo4j.server.startup_timeout=0
但這沒有任何改變,幾秒鐘後服務啟動仍然超時。有任何想法嗎?
這是 graph.db messages.log - 當我嘗試啟動服務時沒有附加任何內容
2015-07-01 01:58:12.142+0000 INFO [org.neo4j]: Import starting 2015-07-01 01:58:12.282+0000 INFO [org.neo4j]: Creating new db @ /var/www/ddl/scripts/./graph.db/neostore 2015-07-01 01:58:13.238+0000 INFO [org.neo4j]: Missing counts store, rebuilding it. 2015-07-01 01:58:13.607+0000 INFO [org.neo4j]: No lucene scan store index found, this might just be first use. Preparing to rebuild. 2015-07-01 01:58:13.663+0000 INFO [org.neo4j]: No lucene scan store index found, this might just be first use. Preparing to rebuild. 2015-07-01 01:58:13.952+0000 INFO [org.neo4j]: Rebuilding lucene scan store, this may take a while 2015-07-01 01:58:13.955+0000 INFO [org.neo4j]: Lucene scan store rebuilt (roughly -1 nodes) 2015-07-01 01:58:30.337+0000 INFO [org.neo4j]: IMPORT DONE in 18s 182ms. Imported: 95941 nodes 158227 relationships 369482 properties 2015-07-01 01:58:30.341+0000 INFO [org.neo4j]: About to rotate counts store at transaction 1 to [/var/www/ddl/scripts/./graph.db/neostore.counts.db.b], from [/var/www/ddl/scripts/./graph.db/neostore.counts.db.a]. 2015-07-01 01:58:30.344+0000 INFO [org.neo4j]: Successfully rotated counts store at transaction 1 to [/var/www/ddl/scripts/./graph.db/neostore.counts.db.b], from [/var/www/ddl/scripts/./graph.db/neostore.counts.db.a].
事實證明,我需要做的是確保我的權限是正確的。我用
chown -r Neo4j:adm graph.db
現在一切似乎都很好。我認為如果 Neo4j 無法訪問 graph.db,它應該會產生某種警告