ertagh / teamspeak3-server-arm

150 stars 11 forks source link

sleep: cannot read realtime clock: Operation not permitted #12

Closed Max-q-1969 closed 3 years ago

Max-q-1969 commented 3 years ago

Hello,

since I updated the container image I get this error message

sleep: cannot read realtime clock: Operation not permitted

as the time seems not to be correct the container will not start after this

issue not seen if running container in privileged mode.

Aliero89 commented 3 years ago

Hi,

i have the same issue

Max-q-1969 commented 3 years ago

ertagh/teamspeak3-server:arm32v7-latest-box86

This image is working normal for me.

WazabiQc commented 3 years ago

Same issue here, had to run it privileged

SoraKasvgano commented 3 years ago

[services.d] starting services, [services.d] done., sleep: sleep: cannot read realtime clock: Operation not permitted, cannot read realtime clock: Operation not permitted, sleep: invalid option -- '1', Try 'sleep --help' for more information., Starting TeamSpeak 3 Server .., terminating with uncaught exception of type std::1::system_error: clock_gettime(CLOCK_MONOTONIC) failed: Operation not permitted, [cont-finish.d] executing container finish scripts..., [cont-finish.d] done., [s6-finish] waiting for services., unable to get current timestamp: Operation not permitteds6-svwait: fatal: supervisor died, [s6-finish] sending all processes the TERM signal., [s6-finish] sending all processes the KILL signal and exiting., [s6-init] making user provided files available at /var/run/s6/etc...exited 0., [s6-init] ensuring user provided files have correct perms...exited 0., [fix-attrs.d] applying ownership & permissions fixes..., [fix-attrs.d] done., [cont-init.d] executing container initialization scripts..., [cont-init.d] done., [services.d] starting services, [services.d] done., sleep: cannot read realtime clock: Operation not permitted, sleep: cannot read realtime clock: Operation not permitted, sleep: invalid option -- '1', Try 'sleep --help' for more information., Starting TeamSpeak 3 Server .., terminating with uncaught exception of type std::__1::system_error: clock_gettime(CLOCK_MONOTONIC) failed: Operation not permitted, [cont-finish.d] executing container finish scripts..., [cont-finish.d] done., [s6-finish] waiting for services., [s6-finish] sending all processes the TERM signal., [s6-finish] sending all processes the KILL signal and exiting., unable to get current timestamp: Operation not permittedN[s6-init] making user provided files available at /var/run/s6/etc...exited 0., [s6-init] ensuring user provided files have correct perms...exited 0., [fix-attrs.d] applying ownership & permissions fixes..., [fix-attrs.d] done., [cont-init.d] executing container initialization scripts..., [cont-init.d] done., [services.d] starting services, sleep: cannot read realtime clock: Operation not permitted, [services.d] done., sleep: cannot read realtime clock: Operation not permitted, sleep: invalid option -- '1', Try 'sleep --help' for more information., Starting TeamSpeak 3 Server .., terminating with uncaught exception of type std::1::system_error: clock_gettime(CLOCK_MONOTONIC) failed: Operation not permitted, [cont-finish.d] executing container finish scripts..., [cont-finish.d] done., [s6-finish] waiting for services., unable to get current timestamp: Operation not permitteds6-svwait: fatal: supervisor died, [s6-finish] sending all processes the TERM signal., [s6-finish] sending all processes the KILL signal and exiting., [s6-init] making user provided files available at /var/run/s6/etc...exited 0., [s6-init] ensuring user provided files have correct perms...exited 0., [fix-attrs.d] applying ownership & permissions fixes..., [fix-attrs.d] done., [cont-init.d] executing container initialization scripts..., [cont-init.d] done., [services.d] starting services, [services.d] done., sleep: cannot read realtime clock: Operation not permitted, sleep: cannot read realtime clock: Operation not permitted, sleep: invalid option -- '1', Try 'sleep --help' for more information., Starting TeamSpeak 3 Server .., 01-01-1970: Update available! 3.13.3 -> , sleep: invalid option -- '1', Try 'sleep --help' for more information., terminating with uncaught exception of type std::__1::system_error: clock_gettime(CLOCK_MONOTONIC) failed: Operation not permitted, [cont-finish.d] executing container finish scripts..., [cont-finish.d] done., [s6-finish] waiting for services., [s6-finish] sending all processes the TERM signal., [s6-finish] sending all processes the KILL signal and exiting., unable to get current timestamp: Operation not permittedN[s6-init] making user provided files available at /var/run/s6/etc...exited 0., [s6-init] ensuring user provided files have correct perms...exited 0., [fix-attrs.d] applying ownership & permissions fixes..., [fix-attrs.d] done., [cont-init.d] executing container initialization scripts..., [cont-init.d] done., [services.d] starting services, sleep: cannot read realtime clock: Operation not permitted, sleep: cannot read realtime clock: Operation not permitted, [services.d] done., sleep: invalid option -- '1', Try 'sleep --help' for more information., Starting TeamSpeak 3 Server .., terminating with uncaught exception of type std::__1::system_error: clock_gettime(CLOCK_MONOTONIC) failed: Operation not permitted, 01-01-1970: Update available! 3.13.3 -> , unable to get current timestamp: Operation not permittedsleep: invalid option -- '1', Try 'sleep --help' for more information., [cont-finish.d] executing container finish scripts..., [cont-finish.d] done., [s6-finish] waiting for services., s6-svwait: fatal: supervisor died, [s6-finish] sending all processes the TERM signal., [s6-finish] sending all processes the KILL signal and exiting.,

something wrong with newest version

ertagh commented 3 years ago

Sorry for the late reply but I'm kinda busy lately.

First of all, if you are reporting any issues, please always mention your host OS, Docker version, platform and your run command! Also please dump the whole output of the logs so that I'm able to identify the location of the problem.

Why am I mentioning this? Because I'm actually not able to reproduce the error. I setup a new container with the :latest tag and everything works as intended and no privileged mode was enabled.

Also when do you get the error?

SoraKasvgano commented 3 years ago

Sorry for the late reply but I'm kinda busy lately.

First of all, if you are reporting any issues, please always mention your host OS, Docker version, platform and your run command! Also please dump the whole output of the logs so that I'm able to identify the location of the problem.

Why am I mentioning this? Because I'm actually not able to reproduce the error. I setup a new container with the :latest tag and everything works as intended and no privileged mode was enabled.

Also when do you get the error?

  • Before the server gets set up
  • After the server was installed and should start
  • ...

host:rpi4 4g 1.2 ,raspbian Linux version 5.4.72-v8+ (dom@buildbot) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #1356 SMP PREEMPT Thu Oct 22 13:58:52 BST 2020

Docker version:Docker version 19.03.14, build 5eb3275d40

Run command

I use 2020.10.3 version

docker run -d --name TeamSpeak3_Server -e TIME_ZONE=Europe/Berlin -p 9987:9987/udp -p 10011:10011/tcp -p 30033:30033/tcp --restart=always -v ts3:/teamspeak/save/ ertagh/teamspeak3-server:latest-predownloaded

After that i use watchtower auto update to 2021.1.13 version

then it show error logs

sleep: cannot read realtime clock: Operation not permitted

ertagh commented 3 years ago

Thanks @SoraKasvgano for the information. Would be nice if @Max-q-1969, @Aliero89 and @WazabiQc could do the same. I want to gather some more information on that topic, because I'm still unable to replicate that error. Maybe there is something all of you have in common..

SoraKasvgano commented 3 years ago

Thanks @SoraKasvgano for the information. Would be nice if @Max-q-1969, @Aliero89 and @WazabiQc could do the same. I want to gather some more information on that topic, because I'm still unable to replicate that error. Maybe there is something all of you have in common..

Thanks for reply..

ertagh,i can offer you my rpi4 ssh login infomation for testing environment,what's your email?

PhobosX commented 3 years ago

Have same issue container stops after few seconds with: [s6-finish] waiting for services., s6-svwait: fatal: supervisor died, [s6-finish] sending all processes the TERM signal., [s6-finish] sending all processes the KILL signal and exiting.,

Raspberry pi 4, latest raspian, latest docker.

docker run -d --name TeamSpeak3_Server -e TIME_ZONE=Europe/Berlin -p 9987:9987/udp -p 10011:10011/tcp -p 30033:30033/tcp -v /home/pi/ts/:/teamspeak/save/ ertagh/teamspeak3-server:latest-predownloaded

/home/pi/ts dir is created

ertagh commented 3 years ago

Big sorry for the late reply.

The last days I actually tested a few different configs.

I can confirm that the container is fully working on ubuntu (arm32v7 and arm64v8) without the privileged flag.

On raspbian I tested a lot of different docker as well as containerd versions, they all resulted in the same error. So it seems like it's a problem with raspbian and the new debian base-image. ATM the only way is to use the privileged flag.

I will actually try to fix that problem as soon as possible, but I've got some upcoming exams.

SoraKasvgano commented 3 years ago

Big sorry for the late reply.

The last days I actually tested a few different configs.

I can confirm that the container is fully working on ubuntu (arm32v7 and arm64v8) without the privileged flag.

On raspbian I tested a lot of different docker as well as containerd versions, they all resulted in the same error. So it seems like it's a problem with raspbian and the new debian base-image. ATM the only way is to use the privileged flag.

I will actually try to fix that problem as soon as possible, but I've got some upcoming exams.

i received your email this morning.... i tried....

but still not working = =

[s6-init] making user provided files available at /var/run/s6/etc...exited 0., [s6-init] ensuring user provided files have correct perms...exited 0., [fix-attrs.d] applying ownership & permissions fixes..., [fix-attrs.d] done., [cont-init.d] executing container initialization scripts..., [cont-init.d] done., [services.d] starting services, [services.d] done., Updating timezone to Europe/Berlin, , Current default time zone: 'Europe/Berlin', Local time is now: Mon Mar 15 01:44:46 CET 2021., Universal Time is now: Mon Mar 15 00:44:46 UTC 2021., , Completing the installation of the predownloaded server, Starting TeamSpeak 3 Server with ini-file .., [cont-finish.d] executing container finish scripts..., [cont-finish.d] done., [s6-finish] waiting for services., [s6-finish] sending all processes the TERM signal., [s6-finish] sending all processes the KILL signal and exiting., [s6-init] making user provided files available at /var/run/s6/etc...exited 0., [s6-init] ensuring user provided files have correct perms...exited 0., [fix-attrs.d] applying ownership & permissions fixes..., [fix-attrs.d] done., [cont-init.d] executing container initialization scripts..., [cont-init.d] done., [services.d] starting services, [services.d] done.,

ertagh commented 3 years ago

I wrote a comment before and thought everything works now but I tested the container and forgot to disable the privileged flag..

So, after that I actually tested an idea and switched back to debian buster but added the backport repository. It seems that debian bullseye has some problems.. With the new update I can confirm, that at least on an Raspberry Pi 3b+ with Raspbian there are no problems and the "sleep" error is now gone.

I hope this fixes your problem too @SoraKasvgano. If not, please report back again.

SoraKasvgano commented 3 years ago

I wrote a comment before and thought everything works now but I tested the container and forgot to disable the privileged flag..

So, after that I actually tested an idea and switched back to debian buster but added the backport repository. It seems that debian bullseye has some problems.. With the new update I can confirm, that at least on an Raspberry Pi 3b+ with Raspbian there are no problems and the "sleep" error is now gone.

I hope this fixes your problem too @SoraKasvgano. If not, please report back again.

aha,thanks for your reply.....

what tag should i use ..... ertagh/teamspeak3-server:latest-predownloaded or sth else...... it seems that the container image has not been updated yet....

btw,how's your test XD.....

ertagh commented 3 years ago

Well, I updated all tags like an hour ago, so I'm not sure if you already had the newest container I pushed.. If so, then it seems like there is another problem and we have to debug why your server crashes during startup..

The tests actually went well.. I guess.. but the last one is in 2 days. If the error is still present I will get back at you as soon as the test is over

SoraKasvgano commented 3 years ago

ohhh,i saw the new update!!! it works again...

thanks for your hardworking!!!!!!!!!

2021-03-15 01:56:15.184122|INFO |Query | |listening for query on 0.0.0.0:10011, [::]:10011, 2021-03-15 01:56:15.162247|INFO |VirtualServerBase|1 |listening on 0.0.0.0:9987, [::]:9987, 2021-03-15 01:56:11.506287|INFO |Query | |Using a query thread pool size of 2, 2021-03-15 01:56:11.383622|INFO |FileManager | |listening on 0.0.0.0:30033, [::]:30033

Well, I updated all tags like an hour ago, so I'm not sure if you already had the newest container I pushed.. If so, then it seems like there is another problem and we have to debug why your server crashes during startup..

The tests actually went well.. I guess.. but the last one is in 2 days. If the error is still present I will get back at you as soon as the test is over

ertagh commented 3 years ago

I'm glad to hear that! Also thanks for helping and have a nice day!