简体   繁体   中英

Neo4j failing to start

Running Ubuntu server 16.04 and Neo4j 3.2.3. Database fails to start.

I've checked the log files, but can't understand what they're saying.

When I try to run with sudo service neo4j start I get an error.

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'.

Permissions are:

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

Expecting Neo4j to start, but get error. Thanks!

Looks like a permissions issue.

Usually you would run neo4j with the neo4j user. Ensure that whichever user is being used by neo4j has read and write access to your directories, especially everything under data, and also including the path from the error where the debug log is being written to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM