Container started but neo4j connot start

HI
I pulled neo4j:latest image. and create and start a container with this command successfully:


> docker create \
> --name myneo4j \
> -p7688:7688  \
> -v $HOME/neo4j/data:/data \
> -v $HOME/neo4j/logs:/logs \
> -v $HOME/neo4j/plugins:/plugins \
> -v $HOME/neo4j/import:/var/lib/neo4j/import  \
> --env NEO4J_AUTH=neo4j/test \
>  neo4j:latest

aeb03348cf1bab0d487e250e505add56b4785c632f6560abdd701bfcfcead8fb

> docker start myneo4j
myneo4j

> docker exec -it myneo4j bash neo4j start

here is the neo4j.log file:


nohup: ignoring input
2019-10-02 16:43:40.835+0000 INFO  ======== Neo4j 3.5.11 ========
2019-10-02 16:43:40.852+0000 INFO  Starting...
2019-10-02 16:43:41.936+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@6239aba6' was successfully initialized, but failed to start. Please see the attached cause exception "Store and its 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)". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@6239aba6' was successfully initialized, but failed to start. Please see the attached cause exception "Store and its 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)".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@6239aba6' was successfully initialized, but failed to start. Please see the attached cause exception "Store and its 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.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:187)
	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:124)
	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:91)
	at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:32)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@6239aba6' was successfully initialized, but failed to start. Please see the attached cause exception "Store and its 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:473)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:180)
	... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory, /data/databases
	at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:232)
	at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:148)
	at org.neo4j.server.database.CommunityGraphFactory.newGraphDatabase(CommunityGraphFactory.java:41)
	at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:90)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
	... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.internal.locker.StoreLockerLifecycleAdapter@1984b1f' was successfully initialized, but failed to start. Please see the attached cause exception "Store and its 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:473)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
	at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:227)
	... 9 more
Caused by: org.neo4j.kernel.StoreLockException: Store and its 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.StoreLocker.storeLockException(StoreLocker.java:116)
	at org.neo4j.kernel.internal.locker.StoreLocker.checkLock(StoreLocker.java:92)
	at org.neo4j.kernel.internal.locker.GlobalStoreLocker.checkLock(GlobalStoreLocker.java:61)
	at org.neo4j.kernel.internal.locker.StoreLockerLifecycleAdapter.start(StoreLockerLifecycleAdapter.java:36)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
	... 11 more
2019-10-02 16:43:41.937+0000 INFO  Neo4j Server shutdown initiated by request

how solve this issue?
tnx before

If you get that error message, it usually means that two processes are trying to start a database using the same data directory.

I think that might have happened because you ran two docker start commands after each other.

If you change the command to read like this it'll work:

$  docker run \
>  --name myneo4j \
>  -p7688:7688  \
>  -v $HOME/neo4j/data:/data \
>  -v $HOME/neo4j/plugins:/plugins \
>  -v $HOME/neo4j/import:/var/lib/neo4j/import  \
>  --env NEO4J_AUTH=neo4j/test \
>   neo4j:latest
org.neo4j.commandline.admin.CommandFailed: initial password was not set because live Neo4j-users were detected.
	at org.neo4j.commandline.admin.security.SetInitialPasswordCommand.setPassword(SetInitialPasswordCommand.java:83)
	at org.neo4j.commandline.admin.security.SetInitialPasswordCommand.execute(SetInitialPasswordCommand.java:66)
	at org.neo4j.commandline.admin.AdminTool.execute(AdminTool.java:127)
	at org.neo4j.commandline.admin.AdminTool.main(AdminTool.java:51)
command failed: initial password was not set because live Neo4j-users were detected.
Active database: graph.db
Directories in use:
  home:         /var/lib/neo4j
  config:       /var/lib/neo4j/conf
  logs:         /var/lib/neo4j/logs
  plugins:      /plugins
  import:       /var/lib/neo4j/import
  data:         /var/lib/neo4j/data
  certificates: /var/lib/neo4j/certificates
  run:          /var/lib/neo4j/run
Starting Neo4j.
2019-10-04 13:40:27.299+0000 WARN  Unknown config option: causal_clustering.discovery_listen_address
2019-10-04 13:40:27.302+0000 WARN  Unknown config option: causal_clustering.raft_advertised_address
2019-10-04 13:40:27.302+0000 WARN  Unknown config option: causal_clustering.raft_listen_address
2019-10-04 13:40:27.302+0000 WARN  Unknown config option: ha.host.coordination
2019-10-04 13:40:27.303+0000 WARN  Unknown config option: causal_clustering.transaction_advertised_address
2019-10-04 13:40:27.303+0000 WARN  Unknown config option: causal_clustering.discovery_advertised_address
2019-10-04 13:40:27.303+0000 WARN  Unknown config option: ha.host.data
2019-10-04 13:40:27.303+0000 WARN  Unknown config option: causal_clustering.transaction_listen_address
2019-10-04 13:40:27.325+0000 INFO  ======== Neo4j 3.4.5 ========
2019-10-04 13:40:27.375+0000 INFO  Starting...
2019-10-04 13:40:29.798+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2019-10-04 13:40:32.168+0000 INFO  Started.
2019-10-04 13:40:33.361+0000 INFO  Remote interface available at http://localhost:7474/

Hi,

I have a similar problem, but I only have the basic database (neo4j).
The container is starting fine, but the database locked.

Neo4j bash:
root@neo4j:/var/lib/neo4j# neo4j console
Directories in use:
home: /var/lib/neo4j
config: /var/lib/neo4j/conf
logs: /logs
plugins: /plugins
import: /import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/lib/neo4j/run
Starting Neo4j.
2020-12-05 15:41:37.049+0000 INFO Starting...
2020-12-05 15:41:44.140+0000 INFO ======== Neo4j 4.1.3 ========
2020-12-05 15:41:49.672+0000 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_li
sten_address. Error starting Neo4j database server at /data/databases
java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:198)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:158)
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:117)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:87)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.internal.locker.LockerLifecycleAdapter@7de62196' was successfully initialized, but failed t
o 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)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:189)
... 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:176)
at org.neo4j.kernel.internal.locker.Locker.checkLock(Locker.java:96)
at org.neo4j.kernel.internal.locker.GlobalFileLocker.checkLock(GlobalFileLocker.java:58)
at org.neo4j.kernel.internal.locker.GlobalLocker.checkLock(GlobalLocker.java:28)
at org.neo4j.kernel.internal.locker.LockerLifecycleAdapter.start(LockerLifecycleAdapter.java:36)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442)
... 7 more
2020-12-05 15:41:49.674+0000 INFO Neo4j Server shutdown initiated by request

What is wrong?

THX

seems that neo4j is already running.
login to the docker with bash and check for neo4j process.
How did you start the docker ?

share your Dockerfile or docker-compose file .

THX

Tamas

Feladó: Dominic Kumar via Neo4j Online Community
Elküldve: 2020. december 13., vasárnap 0:30
Címzett: thomas.keszi@gmail.com
Tárgy: [Neo4j Online Community] [Integrations/Docker] Container started butneo4j connot start





|

dominicvivek06 Dominic Kumar Neo4j Certified Professional
December 12

|

  • | - |

seems that neo4j is already running.
login to the docker with bash and check for neo4j process.
How did you start the docker ?

share your Dockerfile or docker-compose file .

Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

(Attachment debug.log is missing)

(Attachment neo4j.log is missing)

Dear Kumar,

I use an Synology DS718+ NAS storage.

I'm running the latest docker on this unit (via GUI).

The start command is "/sbin/tini -g -- /docker-entrypoint.sh neo4j"

root@neo4j:/var/lib/neo4j# ls -l

total 216

-rwxrwxrwx 1 neo4j neo4j 36005 Sep 29 18:56 LICENSE.txt

-rwxrwxrwx 1 neo4j neo4j 152478 Sep 29 18:56 LICENSES.txt

-rwxrwxrwx 1 neo4j neo4j 9118 Sep 29 18:56 NOTICE.txt

-rwxrwxrwx 1 neo4j neo4j 1399 Sep 29 18:56 README.txt

-rwxrwxrwx 1 neo4j neo4j 96 Sep 29 18:56 UPGRADE.txt

drwx------ 1 neo4j neo4j 66 Sep 29 19:10 bin

drws--S--- 1 neo4j neo4j 18 Dec 5 16:09 certificates

drws--S--- 1 neo4j neo4j 56 Dec 13 18:09 conf

lrwxrwxrwx 1 neo4j neo4j 5 Oct 23 02:14 data -> /data

drws--S--- 1 neo4j neo4j 0 Dec 3 01:55 import

drwx------ 1 neo4j neo4j 76 Oct 23 02:14 labs

drwx------ 1 neo4j neo4j 7644 Oct 23 02:14 lib

lrwxrwxrwx 1 neo4j neo4j 5 Oct 23 02:14 logs -> /logs

drws--S--- 1 neo4j neo4j 140 Dec 5 18:05 plugins

drwx------ 1 neo4j neo4j 18 Dec 5 22:47 run

I use own certificate, what the browser see, so it's OK.

In the Chrome I see:

neo4j-driver.chunkhash.bundle.js:1 WebSocket connection to 'wss://ds817.synology.me:7687/' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED

r @ neo4j-driver.chunkhash.bundle.js:1

As shown above, a "lock" file is created and while it is there it cannot start the database.

I have seen pages related to this problem but I don't know the solution.

I want to try the database in a smaller environment, but unfortunately it doesn't start due to some error.

If you have any idea what the problem might be please help me.

I look forward to your reply,

Tamas

Feladó: Dominic Kumar via Neo4j Online Community
Elküldve: 2020. december 13., vasárnap 0:30
Címzett: thomas.keszi@gmail.com
Tárgy: [Neo4j Online Community] [Integrations/Docker] Container started butneo4j connot start





|

dominicvivek06 Dominic Kumar Neo4j Certified Professional
December 12

|

  • | - |

seems that neo4j is already running.
login to the docker with bash and check for neo4j process.
How did you start the docker ?

share your Dockerfile or docker-compose file .

Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.