cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Migrating from 3.0.12 on docker to 3.4.10

Hallo,

I downloaded Neo4j directly using docker, and it comes with the v3.0.12 as the latest.

After spending a lot of time with the help of andrew bowman, to understand some strange errors, he suggested me to upgrade to the v3.4.10.

I got nothing of interest into my current installation, as I can recreate everything from external files.

So, I try to find a way to install docker with the 3.5 (still in beta), but it failed.

Then I retry with the 3.4, and it try to install the 3.4.9, while I was looking for the 3.4.10.

In any case I used the following command

sudo docker run \
	--publish=7474:7474 \
	--publish=7687:7687 \
	--volume=$HOME/neo4j/data:/data \
	--volume=$HOME/neo4j/logs:/logs \
	--volume=$HOME/neo4j/conf:/conf \
	--volume=$HOME/neo4j/import:/import \
	neo4j:3.4

which returns these errors:

amministratorelocale@ubuntu:~$ sh start.sh
Active database: graph.db
Directories in use:
  home:         /var/lib/neo4j
  config:       /var/lib/neo4j/conf
  logs:         /logs
  plugins:      /var/lib/neo4j/plugins
  import:       /import
  data:         /var/lib/neo4j/data
  certificates: /var/lib/neo4j/certificates
  run:          /var/lib/neo4j/run
Starting Neo4j.
2018-11-18 00:25:59.286+0000 WARN  Unknown config option: causal_clustering.discovery_listen_address
2018-11-18 00:25:59.303+0000 WARN  Unknown config option: causal_clustering.raft_advertised_address
2018-11-18 00:25:59.304+0000 WARN  Unknown config option: causal_clustering.raft_listen_address
2018-11-18 00:25:59.304+0000 WARN  Unknown config option: ha.host.coordination
2018-11-18 00:25:59.305+0000 WARN  Unknown config option: causal_clustering.transaction_advertised_address
2018-11-18 00:25:59.306+0000 WARN  Unknown config option: causal_clustering.discovery_advertised_address
2018-11-18 00:25:59.306+0000 WARN  Unknown config option: ha.host.data
2018-11-18 00:25:59.307+0000 WARN  Unknown config option: causal_clustering.transaction_listen_address
2018-11-18 00:25:59.391+0000 INFO  ======== Neo4j 3.4.9 ========
2018-11-18 00:25:59.523+0000 INFO  Starting...
2018-11-18 00:25:59.816+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@6a472554' was successfully initialized, but failed to start. Please see the attached cause exception "/logs/debug.log (Permission denied)". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@6a472554' was successfully initialized, but failed to start. Please see the attached cause exception "/logs/debug.log (Permission denied)".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@6a472554' was successfully initialized, but failed to start. Please see the attached cause exception "/logs/debug.log (Permission denied)".
	at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:220)
	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:111)
	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:79)
	at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:32)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@6a472554' was successfully initialized, but failed to start. Please see the attached cause exception "/logs/debug.log (Permission denied)".
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:466)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:212)
	... 3 more
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: /logs/debug.log (Permission denied)
	at org.neo4j.kernel.impl.factory.PlatformModule.createLogService(PlatformModule.java:297)
	at org.neo4j.kernel.impl.factory.PlatformModule.<init>(PlatformModule.java:161)
	at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.createPlatform(GraphDatabaseFacadeFactory.java:245)
	at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:157)
	at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:125)
	at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:58)
	at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:88)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
	... 5 more
Caused by: java.io.FileNotFoundException: /logs/debug.log (Permission denied)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at org.neo4j.io.fs.DefaultFileSystemAbstraction.openAsOutputStream(DefaultFileSystemAbstraction.java:76)
	at org.neo4j.io.file.Files.createOrOpenAsOutputStream(Files.java:51)
	at org.neo4j.logging.RotatingFileOutputStreamSupplier.openOutputFile(RotatingFileOutputStreamSupplier.java:338)
	at org.neo4j.logging.RotatingFileOutputStreamSupplier.<init>(RotatingFileOutputStreamSupplier.java:137)
	at org.neo4j.logging.RotatingFileOutputStreamSupplier.<init>(RotatingFileOutputStreamSupplier.java:121)
	at org.neo4j.kernel.impl.logging.StoreLogService.<init>(StoreLogService.java:180)
	at org.neo4j.kernel.impl.logging.StoreLogService.<init>(StoreLogService.java:44)
	at org.neo4j.kernel.impl.logging.StoreLogService$Builder.build(StoreLogService.java:124)
	at org.neo4j.kernel.impl.factory.PlatformModule.createLogService(PlatformModule.java:293)
	... 12 more
2018-11-18 00:25:59.825+0000 INFO  Neo4j Server shutdown initiated by request

Any idea? It looks like the 3.4.9 or 3.4.10 versions are not loaded on the docker library!

1 ACCEPTED SOLUTION

Recent docker installations do not use the root user any more, instead neo4j runs with a separate user id - this might be the reason you get permission issues for /logs.

You're also mapping the /conf volume. This means you're starting a 3.4.x instance with a 3.0.12 conf file. The recommended way is to use -e NEO4J_xxxx settings to customize the default config instead of supplying a config file on your own. See https://neo4j.com/docs/operations-manual/current/installation/docker/ for a list of available options.

View solution in original post

1 REPLY 1

Recent docker installations do not use the root user any more, instead neo4j runs with a separate user id - this might be the reason you get permission issues for /logs.

You're also mapping the /conf volume. This means you're starting a 3.4.x instance with a 3.0.12 conf file. The recommended way is to use -e NEO4J_xxxx settings to customize the default config instead of supplying a config file on your own. See https://neo4j.com/docs/operations-manual/current/installation/docker/ for a list of available options.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online