运行Ubuntu服务器16.04和Neo4j 3.2.3。数据库无法启动。
我检查了日志文件,但是不明白它们在说什么。
当我尝试使用sudo service neo4j start
运行时,出现错误。
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: 2019-07-16 14:58:58.149+0000 INFO ======== Neo4j 3.2.3 ========
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: 2019-07-16 14:58:58.228+0000 INFO Starting...
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: 2019-07-16 14:58:58.322+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@5c072e3f' was successfully initialized, but failed to start. Please see the attached cause exception "/var/log/neo4j/debug.log
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@5c072e3f' was successfully initialized, but failed to start. Please see the attached cause exception "/var/log/neo4j/debug.log (Permission deni
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:215)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:107)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:80)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@5c072e3f' was successfully initialized, but failed to start. Please see the attached cause exception "/var/log/neo4j/debug.log (Permission denied)".
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:207)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: ... 3 more
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: /var/log/neo4j/debug.log (Permission denied)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.kernel.impl.factory.PlatformModule.createLogService(PlatformModule.java:269)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.kernel.impl.factory.PlatformModule.<init>(PlatformModule.java:156)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.createPlatform(GraphDatabaseFacadeFactory.java:242)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:156)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:124)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:58)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: ... 5 more
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: Caused by: java.io.FileNotFoundException: /var/log/neo4j/debug.log (Permission denied)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at java.io.FileOutputStream.open0(Native Method)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at java.io.FileOutputStream.open(FileOutputStream.java:270)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.io.fs.DefaultFileSystemAbstraction.openAsOutputStream(DefaultFileSystemAbstraction.java:75)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.io.file.Files.createOrOpenAsOuputStream(Files.java:47)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.logging.RotatingFileOutputStreamSupplier.openOutputFile(RotatingFileOutputStreamSupplier.java:336)
Jul 16 14:58:58 ip-172-31-13-173 neo4j[20535]: at org.neo4j.logging.RotatingFileOutputStreamSupplier.<init>(RotatingFileOutputStreamSupplier.java:135)
Jul 16 14:58:58 ip-172-31-13-173 systemd[1]: neo4j.service: Main process exited, code=exited, status=1/FAILURE
Jul 16 14:58:58 ip-172-31-13-173 systemd[1]: neo4j.service: Unit entered failed state.
Jul 16 14:58:58 ip-172-31-13-173 systemd[1]: neo4j.service: Failed with result 'exit-code'.
Jul 16 14:58:58 ip-172-31-13-173 systemd[1]: neo4j.service: Service hold-off time over, scheduling restart.
Jul 16 14:58:58 ip-172-31-13-173 systemd[1]: Stopped Neo4j Graph Database.
Jul 16 14:58:58 ip-172-31-13-173 systemd[1]: neo4j.service: Start request repeated too quickly.
Jul 16 14:58:58 ip-172-31-13-173 systemd[1]: Failed to start Neo4j Graph Database.
Jul 16 14:58:58 ip-172-31-13-173 systemd[1]: neo4j.service: Unit entered failed state.
Jul 16 14:58:58 ip-172-31-13-173 systemd[1]: neo4j.service: Failed with result 'start-limit-hit'.
权限为:
drwxr-xr-x 2 root root 4096 Aug 23 2017 certificates
drwxr-xr-x 4 neo4j adm 4096 Aug 23 2017 data
drwxr-xr-x 2 neo4j adm 4096 Jul 27 2017 import
drwxr-xr-x 2 neo4j adm 4096 Jul 27 2017 plugins
期望Neo4j启动,但出现错误。谢谢!
答案 0 :(得分:1)
看起来像是权限问题。
通常,您将使用neo4j用户运行neo4j。确保neo4j使用的任何用户都具有对目录的读写访问权限,尤其是数据下的所有内容,还包括写入调试日志的错误的路径。