Skip to content

TDB concurrent usage error #34

@jtrugman

Description

@jtrugman

Hi,

I ran into a weird error while running stain/jena-fuseki using Docker Compose. Whenever I run:

version: '3'
services:
  fuseki:
    image: stain/jena-fuseki:latest
    environment:
      - ADMIN_PASSWORD=enter1234
    ports:
      - "5050:3030" 

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:

Server     ERROR Exception in initialization: Process ID 7 can't open database at location /fuseki/system/ because it is already locked by the process with PID 8. 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
fuseki_1  | [2020-03-11 16:44:57] WebAppContext WARN  Failed startup of context o.e.j.w.WebAppContext@1a28aef1{Apache Jena Fuseki Server,/,file:///jena-fuseki/webapp/,UNAVAILABLE}
fuseki_1  | org.apache.jena.tdb.TDBException: Process ID 7 can't open database at location /fuseki/system/ because it is already locked by the process with PID 8. 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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions