docker_base_images icon indicating copy to clipboard operation
docker_base_images copied to clipboard

[MiniDLNA+podman] Health check always fails

Open ltguillaume opened this issue 2 years ago • 4 comments

I am using podman on Arch ARM. The health check for minidlna always fails on my system, causing a container exec_died journal entry and a restart every 10 sec.

podman[32243]: container exec a0ba94eb0da9e9e4dd7d92d0ead4b5286f0b0cd06f79bc10c26805113cccb5fc (image=docker.io/vladgh/minidlna:latest, name=minidlna, PODMAN_SYS)
podman[32243]: container exec_died a0ba94eb0da9e9e4dd7d92d0ead4b5286f0b0cd06f79bc10c26805113cccb5fc (image=docker.io/vladgh/minidlna:latest, name=minidlna, execI)
podman[32263]: container exec a0ba94eb0da9e9e4dd7d92d0ead4b5286f0b0cd06f79bc10c26805113cccb5fc (image=docker.io/vladgh/minidlna:latest, name=minidlna, PODMAN_SYS)
podman[32263]: container exec_died a0ba94eb0da9e9e4dd7d92d0ead4b5286f0b0cd06f79bc10c26805113cccb5fc (image=docker.io/vladgh/minidlna:latest, name=minidlna, execI)
podman[32283]: container exec a0ba94eb0da9e9e4dd7d92d0ead4b5286f0b0cd06f79bc10c26805113cccb5fc (image=docker.io/vladgh/minidlna:latest, name=minidlna, maintainer)
podman[32283]: container exec_died a0ba94eb0da9e9e4dd7d92d0ead4b5286f0b0cd06f79bc10c26805113cccb5fc (image=docker.io/vladgh/minidlna:latest, name=minidlna, execI)
podman[32301]: container exec a0ba94eb0da9e9e4dd7d92d0ead4b5286f0b0cd06f79bc10c26805113cccb5fc (image=docker.io/vladgh/minidlna:latest, name=minidlna, maintainer)
podman[32301]: container exec_died a0ba94eb0da9e9e4dd7d92d0ead4b5286f0b0cd06f79bc10c26805113cccb5fc (image=docker.io/vladgh/minidlna:latest, name=minidlna, execID)

Given the comment here (change localhost to 127.0.0.1), I have tried to use --health-cmd="curl --silent --fail 127.0.0.1:8200 || exit 1", but only --no-healthcheck solved the issue. I'm beginning to wonder if curl is even available in the image.

ltguillaume avatar May 10 '22 00:05 ltguillaume

How are you running the container? I am not familiar with podman at all, yet, but from a brief google search, I see that the healthcheck syntax is different: --healthcheck-command 'CMD-SHELL curl --silent --fail localhost:8200 || exit 1'

Curl is present inside the image, the problem is probably in the check syntax and the difference between podman / docker

vladgh avatar May 10 '22 00:05 vladgh

https://docs.podman.io/en/latest/markdown/podman-run.1.html says it's --health-cmd and "the command will be interpreted as an argument to /bin/sh -c"

I'm just running

podman run -d \
 --name minidlna \
 --net=host \
 -v /srv/containers/media:/media \
 -e MINIDLNA_MEDIA_DIR=/media \
 -e MINIDLNA_FRIENDLY_NAME=Pi \
 -e MINIDLNA_ROOT_CONTAINER=B \
 -e MINIDLNA_ALBUM_ART_NAMES=Folder.jpg/folder.jpg/Cover.jpg/cover.jpg \
 -e MINIDLNA_MERGE_MEDIA_DIRS=YES \
 -e MINIDLNA_WIDE_LINKS=YES \
 docker.io/vladgh/minidlna

ltguillaume avatar May 10 '22 01:05 ltguillaume

Something else is going on, because I just tried the following and it works. Still, if I don't disable the health check, it will show exec_died every 10 seconds.

$ podman exec minidlna curl --fail --silent localhost:8200 || echo 1
<HTML><HEAD><TITLE>MiniDLNA 1.3.0</TITLE></HEAD><BODY><div style="text-align: center"><h2>MiniDLNA status</h2></div><h3>Media library</h3><table border=1 cellpadding=10><tr><td>Audio files</td><td>0</td></tr><tr><td>Video files</td><td>>

$ podman exec minidlna curl --fail --silent 127.0.0.1:8200 || echo 1
<HTML><HEAD><TITLE>MiniDLNA 1.3.0</TITLE></HEAD><BODY><div style="text-align: center"><h2>MiniDLNA status</h2></div><h3>Media library</h3><table border=1 cellpadding=10><tr><td>Audio files</td><td>0</td></tr><tr><td>Video files</td><td>>

ltguillaume avatar May 10 '22 02:05 ltguillaume

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

github-actions[bot] avatar Aug 08 '22 03:08 github-actions[bot]

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

github-actions[bot] avatar Sep 07 '22 04:09 github-actions[bot]