Skip to content
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

Killing a Docker container running hackage-server causes it to fail to start again #548

Open
lexi-lambda opened this issue Oct 7, 2016 · 2 comments
Labels

Comments

@lexi-lambda
Copy link

I’m not currently sure if this is an issue with hackage-server, acid-state, Docker, or something else, but I figured I would report it all the same. Here are the steps I’ve used to reproduce the issue:

$ docker run -d --name hackage-server -v hackage-state:/runtime/state hackage-server
$ docker kill hackage-server
$ docker run -it -v hackage-state:/runtime/state hackage-server
hackage-server: Guessing public URI as http://f5143d805ae8:8080
(you can override with the --base-uri= flag)
state/db/Users/open.lock: Locked by 5: resource busy

I’m not sure what is causing that error, but it seems to be the opposite of what I would expect: my understanding was that the whole point of acid-state is to be able to recover from ungraceful shutdown.

@ghost
Copy link

ghost commented Sep 23, 2017

That's a false alarm raised by acid-state. Here's how you can reproduce this in current master.

Terminal 1:

$ docker build . -t siddhu/hackage-server
$ docker run -it -p 8080:8080 --name hackage-server siddhu/hackage-server /bin/bash
# hackage-server run --static-dir=datafiles

Terminal 2:

$ docker kill hackage-server
$ docker start hackage-server
$ docker attach hackage-server
# hackage-server run --static-dir=datafiles

My guess is that the function doesProcessExist in acid-state is not handling some condition correctly. Running the server again should be a quick workaround in this case.

@malob
Copy link

malob commented Nov 17, 2018

I ran into this issue as well. As a temporary fix I changed the command run by docker to:

bash -c "rm state/db/*/*/*.lock; rm state/db/*/*.lock; hackage-server run --static-dir=datafiles"

@gbaz gbaz added the docker label Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants