On 20/09/15 21:09, Stian Soiland-Reyes wrote:
Which command are you running, with which image?
I assume you mean something like
docker run --rm -v /tmp/1:/fuseki stain/jena-fuseki
In an exploration of the database management issues about (not) loosing
state across container restarts ...
DIR="/home/afs/jlib/apache-jena-fuseki-2.3.0"
DATA="$PWD/DB"
docker run -t --rm=true --name Fuseki2 \
-v ${DIR}:/fuseki \
-v ${DATA}:/fuseki/DB \
--net=host \
java:8 \
env FUSEKI_HOME=/fuseki /fuseki/fuseki-server --update
--loc=/fuseki/DB /ds
--mem : no problems.
If it is fuseki, it would not terrminate by itself, so you used ctrl-C?
Yes
What are the errors..?
Can't run a second time because of --name. Can't delete the temporary
layers. Need to kill docker to unblock.
Which Docker and Linux OS/kernel versions?
Latest / 1.8.2, and Ubuntu 15.04 latest / 3.19.0-21-generic.
Do you have a use pattern to cause the issue, e.g. must some queries be run
first?
run, ^C
Where does the volume come from? Local folder, data container or something
external?
When you say zombie, is that true zombie according to ps, or just that
docker rm won't work?
What does docker ps -a say about this container?
The preferred way to stop a running Docker container is
docker stop fuseki
https://docs.docker.com/reference/commandline/stop/
This is SIGTERM, followed by SIGKILL after (by default) 10 seconds.
After this stops you can use
docker rm -v fuseki
docker rm on a running container only works with -f, which sends the
nastier SIGKILL right away (note, SIGKILL is not handed over to the JVM, so
the kernel would need to tidy the file handles)
I'm finding that "docker --rm -v" does not work reliably when mapping in a
TDB database directory. The container is left running, seemingly in some
zombie state. This happen more often than not.
My guess is that some of mmap file clearup is still pending when the
process exits (or rather, the process becomes a linux zombie or somesuch)
and the container is not removable.
Whether this is a docker problem, a kernel problem or a fact of linux life
is not clear.
No --rm and an immediate "docker kill; docker rm" has worked each time.
(timing!)
I am running docker direct - no VM (I'm on a linux kernel on the hardware)
Has anyone else seen anything like this?
Andy