Comments (7)
Yes I have the trouble too! I want to import some csv data to graph.db ,but always display error.
Because the docker run a instance of neo4j which I can access it about http://localhost:7474/
but how can I stop the process rather than simply stop the container.
/var/lib/neo4j # neo4j-admin import --nodes=import/movies.csv --database graph.db
Neo4j version: 3.5.5
Importing the contents of these files into /data/databases/graph.db:
Nodes:
/var/lib/neo4j/import/movies.csv
Available resources:
Total machine memory: 3.86 GB
Free machine memory: 895.90 MB
Max heap memory : 491.00 MB
Processors: 1
Configured max memory: 3.04 GB
High-IO: false
IMPORT FAILED in 18047d 12h 53m 50s 261ms.
Data statistics is not available.
Peak memory usage: 0.00 B
Import error: org.neo4j.io.pagecache.impl.FileLockException: This file is locked by another process, please ensure you don't have another Neo4j process or tool using it: '/data/databases/graph.db/neostore'.'
Caused by:org.neo4j.io.pagecache.impl.FileLockException: This file is locked by another process, please ensure you don't have another Neo4j process or tool using it: '/data/databases/graph.db/neostore'.'
org.neo4j.kernel.impl.store.UnderlyingStorageException: org.neo4j.io.pagecache.impl.FileLockException: This file is locked by another process, please ensure you don't have another Neo4j process or tool using it: '/data/databases/graph.db/neostore'.'
at org.neo4j.kernel.impl.store.NeoStores.verifyRecordFormat(NeoStores.java:217)
at org.neo4j.kernel.impl.store.NeoStores.(NeoStores.java:144)
at org.neo4j.kernel.impl.store.StoreFactory.openNeoStores(StoreFactory.java:129)
at org.neo4j.kernel.impl.store.StoreFactory.openAllNeoStores(StoreFactory.java:93)
at org.neo4j.unsafe.impl.batchimport.store.BatchingNeoStores.instantiateStores(BatchingNeoStores.java:237)
at org.neo4j.unsafe.impl.batchimport.store.BatchingNeoStores.createNew(BatchingNeoStores.java:181)
at com.neo4j.unsafe.impl.batchimport.RestartableParallelBatchImporter.fastForwardToLastCompletedState(RestartableParallelBatchImporter.java:190)
at com.neo4j.unsafe.impl.batchimport.RestartableParallelBatchImporter.doImport(RestartableParallelBatchImporter.java:113)
at org.neo4j.tooling.ImportTool.doImport(ImportTool.java:585)
at org.neo4j.commandline.dbms.CsvImporter.doImport(CsvImporter.java:128)
at org.neo4j.commandline.dbms.ImportCommand.execute(ImportCommand.java:236)
at org.neo4j.commandline.admin.AdminTool.execute(AdminTool.java:127)
at org.neo4j.commandline.admin.AdminTool.main(AdminTool.java:51)
Suppressed: java.lang.IllegalStateException: VM pause monitor is not started
at org.neo4j.util.Preconditions.checkState(Preconditions.java:142)
at org.neo4j.kernel.monitoring.VmPauseMonitor.stop(VmPauseMonitor.java:71)
at org.neo4j.unsafe.impl.batchimport.staging.OnDemandDetailsExecutionMonitor.done(OnDemandDetailsExecutionMonitor.java:128)
at org.neo4j.unsafe.impl.batchimport.staging.MultiExecutionMonitor.done(MultiExecutionMonitor.java:82)
at org.neo4j.unsafe.impl.batchimport.staging.MultiExecutionMonitor.done(MultiExecutionMonitor.java:82)
at org.neo4j.unsafe.impl.batchimport.ImportLogic.close(ImportLogic.java:520)
at com.neo4j.unsafe.impl.batchimport.RestartableParallelBatchImporter.doImport(RestartableParallelBatchImporter.java:118)
... 5 more
Caused by: org.neo4j.io.pagecache.impl.FileLockException: This file is locked by another process, please ensure you don't have another Neo4j process or tool using it: '/data/databases/graph.db/neostore'.'
at org.neo4j.io.pagecache.impl.SingleFilePageSwapper.acquireLock(SingleFilePageSwapper.java:227)
at org.neo4j.io.pagecache.impl.SingleFilePageSwapper.(SingleFilePageSwapper.java:178)
at org.neo4j.io.pagecache.impl.SingleFilePageSwapperFactory.createPageSwapper(SingleFilePageSwapperFactory.java:66)
at org.neo4j.io.pagecache.impl.muninn.MuninnPagedFile.(MuninnPagedFile.java:149)
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.map(MuninnPageCache.java:408)
at org.neo4j.kernel.impl.store.MetaDataStore.getRecord(MetaDataStore.java:285)
at org.neo4j.kernel.impl.store.NeoStores.verifyRecordFormat(NeoStores.java:198)
... 12 more
WARNING Import failed. The store files in /data/databases/graph.db are left as they are, although they are likely in an unusable state. Starting a database on these store files will likely fail or observe inconsistent records so start at your own risk or delete the store manually
unexpected error: org.neo4j.io.pagecache.impl.FileLockException: This file is locked by another process, please ensure you don't have another Neo4j process or tool using it: '/data/databases/graph.db/neostore'.'
from docker-neo4j.
Same issue here, using it in Kubernetes. For now I use a workaround:
- Start the container with a custom command to ensure it is remains running:
tail -f /dev/null
- Exec into the container and run the admin commands.
- Stop the container and restart it with the default command.
To solve the use-case of imports I'm now working on using a Kubernetes initContainer to seed the database using a previously registered dump.
from docker-neo4j.
If you're going to the trouble of making your own docker image to use supervisord I'd heavily recommend that you run neo4j directly instead of the entrypoint script. Then you wouldn't have to fight the setting code.
So something like
[program:neo4j]
command=/var/lib/neo4j/bin/neo4j console
stopsignal=INT
from docker-neo4j.
using supervisord in a docker container is not the way to go: if you process dies, the container dies. Just restart the container. Docker provides the --restart always
flag for this purpose.
from docker-neo4j.
@spacecowboy I am in a situation where I want to restore a graph.db
folder from a different machine. The process needs me to unbind the cluster-state. But because I am running docker containers, stopping the process will simply stop the container.
from docker-neo4j.
@nicorikken I have the same problem, but a different solution in Kubernetes. I used a Job and created a modified image from the Neo4j image. I mounted a Persistent Volume to this container on /data
. From this, I ran neo4j-admin
on the data, saving the ingested data to the volume. I then created a Deployment for a fresh, unmodified Neo4j image and mounted this volume to it, so it contained the ingested data.
from docker-neo4j.
@Rohithzr This would count as an administrative procedure and needs to be done by set of cli parameters where you can import your new graph from the other directory without restarting the main process. The proper solution wouldn't be to make this kind of workaround to keep the container always running, would be to add the proper functionality in neo4j for import from a directory / NFS
Having said that you could override the entrypoint to start neo4j &; and to tail -f somke log file
from docker-neo4j.
Related Issues (20)
- Missing docker-entrypoint.sh in latest image? HOT 2
- Error using or configuring APOC in GithubAction HOT 1
- Why am I encountering an issue with the GDS library on a Neo4j Docker container on Windows, despite it working on Linux? HOT 5
- Version 4.4.19 fails when installing APOC HOT 3
- Missing proper health check
- chown: changing ownership of '/var/lib/neo4j/conf/neo4j.conf': Read-only file system HOT 3
- Volume inaccessible, although uid and gid match those of the user parameter HOT 2
- my_ip:7474 >> This site canβt be reached HOT 3
- Pods unready/CrashLoopBackOff with message "sed: cannot rename /var/lib/neo4j/conf/sed8pylkX: Operation not permitted" HOT 2
- neo4j-admin:5.10.0 not released on Docker Hub HOT 2
- Unable to mount local config folder with apoc.conf HOT 2
- ERROR: No compatible "graph-data-science" plugin found for Neo4j 5.13.0. HOT 8
- neo4j-admin:5.17.0 not released on Docker Hub HOT 1
- Docker bind only 192.168.58.110 address and not all interfaces HOT 1
- Plugins for "genai","n10s","graphql","graph-algorithms" missing after docker install neo4j:5.18 HOT 3
- Critical/High Severity issues reported by Snyk for neo4j:5.18.1
- conf folder not persisted
- openshift support with "random UID"
- neo4j-admin:5.20.0 not released on Docker Hub HOT 1
- Error when dumping database neo4j-admin Docker HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-neo4j.