部署第二个neo4j时,报错如下:
ERROR Failed to start Neo4j on dbms.connector.http.listen_address, a socket address. If missing port or hostname it is acquired from dbms.default_listen_address.
java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:214) ~[neo4j-4.3.2.jar:4.3.2]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:170) ~[neo4j-4.3.2.jar:4.3.2]
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36) ~[neo4j-4.3.2.jar:4.3.2]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:134) [neo4j-4.3.2.jar:4.3.2]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:90) [neo4j-4.3.2.jar:4.3.2]
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:34) [neo4j-4.3.2.jar:4.3.2]
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.internal.locker.LockerLifecycleAdapter@3eed0f5' was successfully initialized, but failed to start. Please see the attached cause exception "Lock file has been locked by another process: /data/databases/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:463) ~[neo4j-common-4.3.2.jar:4.3.2]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.3.2.jar:4.3.2]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:205) ~[neo4j-4.3.2.jar:4.3.2]
... 5 more
Caused by: org.neo4j.kernel.internal.locker.FileLockException: Lock file has been locked by another process: /data/databases/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)
at org.neo4j.kernel.internal.locker.Locker.storeLockException(Locker.java:175) ~[neo4j-kernel-4.3.2.jar:4.3.2]
at org.neo4j.kernel.internal.locker.Locker.checkLock(Locker.java:95) ~[neo4j-kernel-4.3.2.jar:4.3.2]
at org.neo4j.kernel.internal.locker.GlobalFileLocker.checkLock(GlobalFileLocker.java:58) ~[neo4j-kernel-4.3.2.jar:4.3.2]
at org.neo4j.kernel.internal.locker.GlobalLocker.checkLock(GlobalLocker.java:28) ~[neo4j-kernel-4.3.2.jar:4.3.2]
at org.neo4j.kernel.internal.locker.LockerLifecycleAdapter.start(LockerLifecycleAdapter.java:36) ~[neo4j-kernel-4.3.2.jar:4.3.2]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.3.2.jar:4.3.2]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.3.2.jar:4.3.2]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:205) ~[neo4j-4.3.2.jar:4.3.2]
... 5 more
解决方法:
修改neo4j.conf文件中:
dbms.directories.data=/var/lib/dev/Neo4j/ # 不相同即可