mikebrady / shairport-sync-docker

Docker setup for Shairport Sync
MIT License
49 stars 19 forks source link

Not working on Raspberry Pi 4 B running newest Raspberry Pi OS ("GLib requires working CLOCK_MONOTONIC") #11

Closed onewang92 closed 3 years ago

onewang92 commented 3 years ago

Hi there. At first - thank you very much for creating this awesome piece of software!

Today i got my brand new RPi4B which i plan to use as a docker host for multiple services in my home network. I baked the newest Raspberry Pi OS onto the SD-Card, fired it up and ran the usual apt-get update && apt-get upgrade. First thing i tried out was setting up shairport-sync as a docker container using the example command in the README.md

Unfortunately it seems that the container is not able to run. Docker ist constantly restarting it. Running

docker logs <containerid>

reveals that some "GLib requires working CLOCK_MONOTONIC"

pi@raspberrypi:~ $ docker logs 12bd6fe0aa2a

(process:14): GLib-ERROR **: 23:06:30.771: GLib requires working CLOCK_MONOTONIC
Trace/breakpoint trap
Process 13 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)

(process:14): GLib-ERROR **: 15:27:50.771: GLib requires working CLOCK_MONOTONIC
Trace/breakpoint trap
Process 13 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)

(process:15): GLib-ERROR **: 17:57:10.771: GLib requires working CLOCK_MONOTONIC
Trace/breakpoint trap
Process 14 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)

At first i ran it on Raspberry Pi OS Lite, however, just to be sure i ran it on the "standard" Pi OS as well and unfortunately it is the exact same behaviour. I also tried out installing all the packages required for building but that didn't help either.

Via google i couldn't find anything...

I wonder if there is somebody who whas an idea what the problem could be. Am I missing something?

Your help would be very much appreciated :-)

Greetings, Chris

kevocl commented 3 years ago

I've just run into the exactly the same error on a RPi3 I'm setting up. I tried pulling version 3.3.7 instead and that looks like it might work.

mikebrady commented 3 years ago

Apologies — I am late looking at this.

At first i ran it on Raspberry Pi OS Lite, however, just to be sure i ran it on the "standard" Pi OS as well and unfortunately it is the exact same behaviour.

Can you say exactly what version of Raspberry Pi OS you are using? Use $ uname -a or similar.

kevocl commented 3 years ago

Hi Mike, this is what my uname -a returns:

Linux Edmund 5.10.17-v7+ #1414 SMP Fri Apr 30 13:18:35 BST 2021 armv7l GNU/Linux

mikebrady commented 3 years ago

Hmm. That’s identical so what I’m using right now:

Linux raspberrypi 5.10.17-v7+ #1414 SMP Fri Apr 30 13:18:35 BST 2021 armv7l

I’ve been running Shairport Sync on it without problems, but let me revert to the latest public version and check it. Are you building your own Shairport Sync, or are you installing it from a package?

mikebrady commented 3 years ago

And a quick follow-up question, please. To clarify: did you try running Shairport Sync outside docker, i.e. on Raspberry Pi OS directly?

(BTW, Raspberry Pi OS Lite is fine.)

mikebrady commented 3 years ago

[Update] The public version of Shairport Sync runs normally directly on the latest Raspberry Pi OS. Maybe there is something wrong or outdated in the Docker image, which is based on Arch Linux. Unfortunately, it'll be late next week before I can get a look at that.

kevocl commented 3 years ago

Hi Mike, I remember having a similar issue with another container and it turned out to be related to changes in Alpine Linux and 64bit time. Here is a link to the Release Notes. https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.13.0#time64_requirements

mikebrady commented 3 years ago

That sound like the problem alright, thanks. What's nice about Alpine is that it's small, but this is not nice!

onewang92 commented 3 years ago

At first thank you very much already! I'm running the docker container simply using the docker command suggested by you. My uname-a shows Linux dockerpi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux

slochewie commented 3 years ago

I too get the CLOCK_MONOTONIC error with the latest version. Rolling back to 3.3.7 initially fixes the problem. However if I restart the container or reboot the Pi a new error arises. Process 13 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid) Occurs on two different Pis. Both are Raspberry Pi 4 4GB. Both are brand new with fresh installs of Raspian. Deleting the container and re-running the Docker run command to rebuild the container fixes the problem, until the next reboot… Linux motav-pi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux

mikebrady commented 3 years ago

Thanks. It does seem to be due to changes in the Alpine image used as the basis for the Docker image. I'm experimenting with changing to Debian or Ubuntu, but they are bigger images.

mikebrady commented 3 years ago

Okay, so I've done a slightly hacky thing -- I have pinned the version of Alpine Linux that is used to the previous version to the current one, in the hope that the previous version does not exhibit this incompatibility with Raspberry Pi OS.

It seems as if the incompatibility should go away when the as the host operating systems are updated.

If you would be kind enough to try it, I'd be obliged.

mpkonmbk commented 3 years ago

Hi @mikebrady, I've tried the latest image from 9 days ago and it works for me. Thank you

mikebrady commented 3 years ago

Excellent, thank you!