Jump to content

[Solved] How to troubleshoot a Docker container


Recommended Posts

I have several containers running and have not had an issue with them since setting them up. Last night I upgrade from 6.0 beta6 to beta7 and now sickbeard will not respond. The container seems to be running, but I can't access the gui. I tried removing the container and re-adding it, but pointing to my same config folder, but without success.

 

I plan on reverting back to beta6 later tonight to see if it's an issue with the upgrade, or just coincidence. However, it brings to light that I have no idea how to troubleshoot a container if it's not responding correctly.

 

Where does Docker keep it's logs (assuming it's different from the system log). Are there any other quick suggestions that can be tried to resolve this? As mentioned, I am going to try beta 6 as I believe docker was upgraded in this beta, but since I am not seeing others report issues I am guessing this is not the cause.

 

Any suggestions would be appreciated.

 

Link to comment

Okay, well I managed to fix my own issue, and thought I would pass along some notes in case anyone else faces this.

 

First, to view the logs for a container you need to determine the container ID, which if you are running the enhanced Docker GUI is easy to do.

 

Then from putty (or console) you type docker logs CONTAINER ID

 

When I did this I found a number of errors:

 

Your database version (17) has been incremented past what this version of Sick Beard supports (16)

 

I am not sure how this came about, but I did commit updates to Sickbeard yesterday as well (Which I do periodically, and didn't think anything of).

 

Anyways... when I looked in my Sickbeard config folder I had the following:

 

 

root@CydStorage:/mnt/cache/appdata/sickbeard# ls -al

total 9533

drwxr-xr-x  4 root  root      256 Aug 24 00:06 ./

drwxrwxrwx 11 nobody users    296 Aug 11 10:58 ../

drwxr-xr-x  2 nobody users        176 Aug 24 16:38 Logs/

drwxr-xr-x  4 nobody users          96 Jul  7 22:44 cache/

-rw-r--r--  1 nobody users      83968 Aug 24 00:04 cache.db

-rw-r--r--  1 nobody users        4286 Aug 22 17:02 config.ini

-rw-r--r--  1 nobody users  4564992 Aug 24 00:06 sickbeard.db

-rw-r--r--  1 nobody users        2576 Aug 24 00:06 sickbeard.db-journal

-rw-r--r--  1 nobody users  5084160 Aug 22 17:02 sickbeard.db.v16

 

I stopped the container, and then renamed sickbeard.db to sickbeard.db.v17 and then renamed sickbeard.db.v16 to sickbeard.db

 

Everything has come back up properly. I am not sure why the DB got out of sync, but I learned something valuable on how to troubleshoot an issue with a docker container.

 

 

Link to comment

You can view the docker logs for each container from the enhanced webgui by clicking on the "up x days" in the status column.

 

Well, what do you know. :)

 

Thanks for the tip... I guess I had managed to miss that previously. That is very handy when containers are not behaving as expected.

 

 

Link to comment

I didn't think so. I would have assumed that when you do an in-app update it updates the container as part of the process, so that when you restart the container it's up to date.

 

At least that is how I've been assuming it works. Where/how do you think you need to commit the change?

Link to comment

The way I read that it looks like it's when creating a new container to share, not necessarily for updates post publish, but again, I could be wrong. :)

 

However, Sickbeard checks for updates every 12 hours and I have now had this fixed/running for longer than that and I am not showing any commits behind, which would make me think I am current.

 

Beats me though... I may be complete off base here.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...