Kerwood / Rtorrent-LXC

A Docker container with Rtorrent + Rutorrent.
46 stars 9 forks source link

httpd (pid 24) already running #6

Closed D0rd closed 6 years ago

D0rd commented 6 years ago

Hi there,

First of all thank you, I've been using your stuff for a while!

So I've installed docker and the container, things go well, but when I reboot the machine, or do a "docker stop" I end up with a httpd already running error when I try to start the container again: the docker logs gives me "httpd (pid 24) already running". I've trying killing the pid, but that does not work. Only fix is to remove the container and re-run it.

After some googling around I found that it was a case of Apache being grumpy that could get fixed by adding a script to remove apache2.pid But I see you have made that adjustment already with your startup.sh, so I'm confused as to why I'm still getting this issue.

Would you have any pointers as to how I could fix it? Let me know if I need to provide any other logs.

Thanks!

Kerwood commented 6 years ago

If you look at the main page at the top, it says:

Update Jun 13 2017
The container now removes the apache.pid file and the rtorrent.lock upon startup.
Should fix some issues when restarting the container.

Pull the new image, create a new rtorrent container and you should be good to go :+1:

D0rd commented 6 years ago

Hey there, sorry I was travelling and couldn't dig deeper on this issue before today.

So I tried a pull but that did not help (I installed your image for the first time last week and your update is from June 2017, so it would have already been in anyway.)

I looked around, and the issue was that your script does 'rm -f /var/run/apache2/apache2.pid' but I have a different path for some reason: /var/lib/docker/aufs/diff/20bc3f01de0aab80f206676e263fbe78be56d993526c6d15d12b1c0e9829657f/run/apache2/apache2.pid

So I deleted that file and then I can start the container again. I'll make a startup script to delete it and then I should be able to restart the container by rebooting the server.

D0rd commented 6 years ago

Also while I'm at it, I had a permission issue, rtorrent did not have permission to write in /home/dord/downloads I had to 775 the folder and chown :1000 (debian)

Figured I'd mention it in case someone else runs into this issue.

Kerwood commented 6 years ago

Hmm.. there also seems like theres a little type her.. https://github.com/Kerwood/Rtorrent-LXC/blob/57666923651dceb646b3d46e721c63b1e009f5c8/startup.sh#L25

Kerwood commented 6 years ago

I had the same issue as you. I was able to fix the typo in the container and when i restarted the container startup.sh was able to delete the file. Thanks for your help