-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TDB concurrent usage error #34
Comments
I have a similar problem I did:
Here the commands I executed: docker run --detach --name fuseki-data --volume /fuseki busybox # data container
docker run --detach --name fuseki-app -p 3030:3030 \
-e ADMIN_PASSWORD=pw123 \
--volumes-from fuseki-data stain/jena-fuseki
docker logs fuseki-app
# OK
docker stop fuseki-app
docker ps --all
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# 6f6af0faad44 stain/jena-fuseki "/docker-entrypoint.…" About a minute ago Exited (137) Less than a second ago fuseki-app
# 6591645f4ee6 busybox "sh" About a minute ago Exited (0) About a minute ago fuseki-data
# try to load into a brand new cetaf-test20200312-1205
docker run --name fuseki-loadsh-use-fuseki-data \
--volumes-from fuseki-data \
--volume /home/aplank/sandbox/staging:/staging \
stain/jena-fuseki \
./load.sh cetaf-test20200312-1205 Thread-2_herbarium.bgbm.org.rdf
# OK
docker ps --all
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# 65bd64c29a01 stain/jena-fuseki "/docker-entrypoint.…" About a minute ago Up About a minute 3030/tcp fuseki-loadsh-use-fuseki-data
# 6f6af0faad44 stain/jena-fuseki "/docker-entrypoint.…" 4 minutes ago Exited (137) 3 minutes ago fuseki-app
# 6591645f4ee6 busybox "sh" 4 minutes ago Exited (0) 4 minutes ago fuseki-data
docker stop fuseki-loadsh-use-fuseki-data
docker ps --all
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# 65bd64c29a01 stain/jena-fuseki "/docker-entrypoint.…" 3 minutes ago Exited (137) 22 seconds ago fuseki-loadsh-use-fuseki-data
# 6f6af0faad44 stain/jena-fuseki "/docker-entrypoint.…" 6 minutes ago Exited (137) 4 minutes ago fuseki-app
# 6591645f4ee6 busybox "sh" 6 minutes ago Exited (0) 6 minutes ago fuseki-data
docker start fuseki-app
docker logs fuseki-app
# TDB WARN Your platform does not support checking process liveness so TDB disk locations cannot be reliably locked to prevent possible corruption due to unsafe multi-JVM usage
# java.io.IOException: Cannot run program "ps": error=2, No such file or directory
# [2020-03-12 11:09:54] Server ERROR Exception in initialization: caught: Process ID 8 can’t open database at location /fuseki/databases/cetaf-test20200312/ because it is already locked by the process with PID 9. TDB databases do not permit concurrent usage across JVMs so in order to prevent possible data corruption you cannot open this location from the JVM that does not own the lock for the dataset
# [2020-03-12 11:09:54] WebAppContext WARN Failed startup of context o.e.j.w.WebAppContext@859ea42{Apache Jena Fuseki Server,/,file:///jena-fuseki/webapp/,UNAVAILABLE}
# org.apache.jena.assembler.exceptions.AssemblerException: caught: Process ID 8 can’t open database at location /fuseki/databases/cetaf-test20200312/ because it is already locked by the process with PID 9. TDB databases do not permit concurrent usage across JVMs so in order to prevent possible data corruption you cannot open this location from the JVM that does not own the lock for the dataset
# [2020-03-12 11:09:54] Server INFO Started 2020/03/12 11:09:54 UTC on port 3030 … and the server is broken. I guess the Update: later, when I was starting my named containers docker exec -it fuseki-app bash # run in the container named “fuseki-app”
root@7fc3133f5863:/jena-fuseki#
apt-get update;
apt-get install -y --no-install-recommends procps
exit
docker start fuseki-app
# proceed with normal usage |
Same problem here, after a |
The bug is still there on the latest Docker Hub image... |
I have the same problem. Could you tell me how you solved the issue? |
You can try to build your docker image frome the Dockerfile in this repo (I didn't try). It seems that this bus has been fixed here in Master but that it also made the automatic build of Docker Hub image fail. You could also try a different image from Docker Hub. I'm running since yesterday with the following docker-compose.yml :
|
So, I followed @infinite-dao and it worked. Here's what I did:
Here's the result I got - no errors:
|
for anyone else running into this, we had some success by using |
This workaround worked for me even after a rebuild! |
Hi,
I ran into a weird error while running stain/jena-fuseki using Docker Compose. Whenever I run:
It works the first time, when stain/jena-fuseki cannot be found locally and has to be fetched from the internet. However, when I run it again after stopping the container/killing the docker process I get an error like this:
This is making me think that some processes are not cleaning up fully when they are stopped or something similar to that. Especially since when I remove all of the containers (docker rm container_id) and remove the docker image (docker rmi stain/jena-fuseki) and rerun it, it works.
More than happy to help debug the issue too! Just let me know.
Cheers,
Justin
The text was updated successfully, but these errors were encountered: