Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-21-2022 10:44 AM
Hi all,
I am new to docker neo4j and met an interesting problem when trying to use docker admin import - the import failed due to neostore file locked, a common issue when DB is still running, but when I check the db status, it reported that it's not running.
~/neo4j-test04 $ docker exec -it --user $(id -u):$(id -g) neo4j-test04 neo4j stop
Neo4j not running
~/neo4j-test04 $ docker exec -it --user $(id -u):$(id -g) neo4j-test04 neo4j status
Neo4j is not running
Then I checked further in browser, it is actually working and I can create/pull nodes.
then I checked the docker logs below - and see the data/ folder issue
docker logs neo4j-test06
Warning: Folder mounted to "/logs" is not writable from inside container. Changing folder owner to neo4j.
Warning: Folder mounted to "/data" is not writable from inside container. Changing folder owner to neo4j.
Changed password for user 'neo4j'.
Directories in use:
home: /var/lib/neo4j
config: /var/lib/neo4j/conf
logs: /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.
2022-11-17 17:29:58.423+0000 WARN Unrecognized setting. No declared setting with name: apoc.export.file.enabled
2022-11-17 17:29:58.426+0000 WARN Unrecognized setting. No declared setting with name: apoc.import.file.enabled
2022-11-17 17:29:58.426+0000 WARN Unrecognized setting. No declared setting with name: apoc.import.file.use_neo4j_config
2022-11-17 17:29:58.426+0000 INFO Starting...
2022-11-17 17:30:00.198+0000 INFO ======== Neo4j 4.1.4 ========
2022-11-17 17:30:01.444+0000 INFO Initializing system graph model for component 'security-users' with version -1 and status UNINITIALIZED
2022-11-17 17:30:01.447+0000 INFO Setting up initial user from `auth.ini` file: neo4j
2022-11-17 17:30:01.447+0000 INFO Creating new user 'neo4j' (passwordChangeRequired=false, suspended=false)
2022-11-17 17:30:01.453+0000 INFO Setting version for 'security-users' to 2
2022-11-17 17:30:01.456+0000 INFO After initialization of system graph model component 'security-users' have version 2 and status CURRENT
2022-11-17 17:30:01.459+0000 INFO Performing postInitialization step for component 'security-users' with version 2 and status CURRENT
2022-11-17 17:30:01.559+0000 INFO Bolt enabled on 0.0.0.0:7687.
2022-11-17 17:30:02.449+0000 INFO Remote interface available at http://localhost:7474/
2022-11-17 17:30:02.451+0000 INFO Started.
2022-11-17 21:14:37.052+0000 INFO Neo4j Server shutdown initiated by request
2022-11-17 21:14:37.054+0000 INFO Stopping...
2022-11-17 21:14:42.527+0000 INFO Stopped.
Changed password for user 'neo4j'.
Directories in use:
home: /var/lib/neo4j
config: /var/lib/neo4j/conf
logs: /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.
Did anyone see this before? Thanks!
11-21-2022 10:47 AM
Here's the template I used for creating my containers-
11-26-2022 08:18 PM
So I updated the docker run code to add the rights for folders but still got the error for my docker neo4j-admin import as cannot open folder data... did anyone meet this issue before? Thanks!
docker run \
--name neo4j-test04 \
-p37474:7474 -p37687:7687 \
-d \
-v $HOME/neo4j-test04/data:/data:rw \
-v $HOME/neo4j-test04/logs:/logs:rw \
-v $HOME/neo4j-test04/import:/var/lib/neo4j/import \
-v $HOME/neo4j-test04/plugins:/plugins \
--env NEO4J_AUTH=neo4j/test \
--privileged \
neo4j:latest
error message for neo4j-admin import -
IMPORT FAILED in 19323d 4h 15m 28s 530ms.
Data statistics is not available.
Peak memory usage: 0B
Import error: Unable to open store file: /data/databases/neo4j/neostore
Caused by:Unable to open store file: /data/databases/neo4j/neostore
org.neo4j.exceptions.UnderlyingStorageException: Unable to open store file: /data/databases/neo4j/neostore
at org.neo4j.kernel.impl.store.CommonAbstractStore.checkAndLoadStorage(CommonAbstractStore.java:253)
at org.neo4j.kernel.impl.store.CommonAbstractStore.initialise(CommonAbstractStore.java:150)
at org.neo4j.kernel.impl.store.NeoStores.initialize(NeoStores.java:260)
at org.neo4j.kernel.impl.store.NeoStores.createMetadataStore(NeoStores.java:523)
at org.neo4j.kernel.impl.store.StoreType$15.open(StoreType.java:148)
at org.neo4j.kernel.impl.store.NeoStores.openStore(NeoStores.java:253)
at org.neo4j.kernel.impl.store.NeoStores.getOrOpenStore(NeoStores.java:298)
at org.neo4j.kernel.impl.store.NeoStores.verifyRecordFormat(NeoStores.java:178)
at org.neo4j.kernel.impl.store.NeoStores.<init>(NeoStores.java:116)
at org.neo4j.kernel.impl.store.StoreFactory.openNeoStores(StoreFactory.java:135)
at org.neo4j.kernel.impl.store.StoreFactory.openAllNeoStores(StoreFactory.java:99)
12-01-2022 03:25 PM
Just an update that I tried-
I wonder if how we can stop the database properly so I can run the docker neo4j-admin import. Thanks!
All the sessions of the conference are now available online