2012-11-24 30 views
1

我想配置我neo4j服務器(在Mac)在這裏使用dbpedia4neo是文件 neo4j-server.properties爲什麼neo4j的.db文件路徑無效?

################################################################ 
# Neo4j configuration 
# 
################################################################ 

#*************************************************************** 
# Server configuration 
#*************************************************************** 

# location of the database directory 
org.neo4j.server.database.location=/Users/0x90/dbpedia4neo/index.db 

# let the webserver only listen on the specified IP. Default 
# is localhost (only accept local connections). Uncomment to allow 
# any connection. Please see the security section in the neo4j 
# manual before modifying this. 
#org.neo4j.server.webserver.address=0.0.0.0 

# 
# HTTP Connector 
# 

# http port (for all data, administrative, and UI access) 
org.neo4j.server.webserver.port=7474 

# 
# HTTPS Connector 
# 

# Turn https-support on/off 
org.neo4j.server.webserver.https.enabled=true 

# https port (for all data, administrative, and UI access) 
org.neo4j.server.webserver.https.port=7473 

# Certificate location (auto generated if the file does not exist) 
org.neo4j.server.webserver.https.cert.location=conf/ssl/snakeoil.cert 

# Private key location (auto generated if the file does not exist) 
org.neo4j.server.webserver.https.key.location=conf/ssl/snakeoil.key 

# Internally generated keystore (don't try to put your own 
# keystore there, it will get deleted when the server starts) 
org.neo4j.server.webserver.https.keystore.location=data/keystore 

#***************************************************************** 
# Administration client configuration 
#***************************************************************** 

# location of the servers round-robin database directory. possible values: 
# - absolute path like /var/rrd 
# - path relative to the server working directory like data/rrd 
# - commented out, will default to the database data directory. 
org.neo4j.server.webadmin.rrdb.location=data/rrd 

# REST endpoint for the data API 
# Note the/in the end is mandatory 
org.neo4j.server.webadmin.data.uri=/db/data/ 

# REST endpoint of the administration API (used by Webadmin) 
org.neo4j.server.webadmin.management.uri=/db/manage/ 

# Low-level graph engine tuning file 
org.neo4j.server.db.tuning.properties=conf/neo4j.properties 


# Comma separated list of JAX-RS packages containing JAX-RS resources, one package name for each mountpoint. 
# The listed package names will be loaded under the mountpoints specified. Uncomment this line 
# to mount the org.neo4j.examples.server.unmanaged.HelloWorldResource.java from neo4j-examples 
# under /examples/unmanaged, resulting in a final URL of 
# http://localhost:7474/examples/unmanaged/helloworld/{nodeId} 
#org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.examples.server.unmanaged=/examples/unmanaged 


#***************************************************************** 
# HTTP logging configuration 
#***************************************************************** 

# HTTP logging is disabled. HTTP logging can be enabled by setting this property to 'true'. 
org.neo4j.server.http.log.enabled=false 

# Logging policy file that governs how HTTP log output is presented and archived. 
# Note: changing the rollover and retention policy is sensible, but changing the 
# output format is less so, since it is configured to use the ubiquitous common log format 
org.neo4j.server.http.log.config=conf/neo4j-http-logging.xml 

.db文件替代我已經是:

./index/lucene-store.db 
./index/neostore.relationshipstore.db 
./index/neostore.relationshipstore.db/index/lucene-store.db 
./index/neostore.relationshipstore.db/neostore.nodestore.db 
./index/neostore.relationshipstore.db/neostore.propertystore.db 
./index/neostore.relationshipstore.db/neostore.relationshipstore.db 
./index/neostore.relationshipstore.db/neostore.relationshiptypestore.db 
./index.db 
./neostore.nodestore.db 
./neostore.propertystore.db 
./neostore.relationshipstore.db 
./neostore.relationshiptypestore.db 
./upgrade_backup/neostore.nodestore.db 
./upgrade_backup/neostore.propertystore.db 
./upgrade_backup/neostore.relationshipstore.db 
./upgrade_backup/neostore.relationshiptypestore.db 

但是當我嘗試他們我得到這個錯誤:

./bin/neo4j start 
Starting Neo4j Server...WARNING: not changing user 
process [31011]... waiting for server to be ready.. Failed to start within 120 seconds. 
Neo4j Server may have failed to start, please check the logs. 

這裏是日誌:

java.lang.IllegalArgumentException: Invalid value '/Users/0x90/dbpedia4neo/index.db' for config property 'store_dir': Must be a valid file path. 
    at org.neo4j.graphdb.factory.GraphDatabaseSetting.illegalValue(GraphDatabaseSetting.java:963) 
    at org.neo4j.graphdb.factory.GraphDatabaseSetting.illegalValue(GraphDatabaseSetting.java:951) 
    at org.neo4j.graphdb.factory.GraphDatabaseSetting$DirectorySetting.validate(GraphDatabaseSetting.java:668) 
    at org.neo4j.graphdb.factory.GraphDatabaseSetting.validate(GraphDatabaseSetting.java:903) 
    at org.neo4j.kernel.configuration.ConfigurationValidator.validate(ConfigurationValidator.java:50) 
    at org.neo4j.kernel.configuration.Config.applyChanges(Config.java:125) 
    at org.neo4j.kernel.configuration.Config.<init>(Config.java:81) 
    at org.neo4j.kernel.InternalAbstractGraphDatabase.<init>(InternalAbstractGraphDatabase.java:206) 
    at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:77) 
    at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:70) 
    at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:205) 
    at org.neo4j.server.database.CommunityDatabase.start(CommunityDatabase.java:55) 
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:103) 
    at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:79) 
    at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:46) 

回答

3

路徑值應該指向包含數據庫文件的目錄,而不是一個單一的文件。

儘量只

即使在指定的位置到一個目錄
org.neo4j.server.database.location=/Users/0x90/dbpedia4neo 
+0

,它不是爲我工作。我在Ubuntu中遇到了這個問題。 Windows非常直接,使用瀏覽按鈕和所有作品選擇目錄。 – arunram

+0

我後來發現它是文件夾權限問題。其他人(用戶)未被授予書面許可。所以,做了一個chmod,然後啓動了服務。現在一切正常。 – arunram