ansemjo / speedtest-plotter

running scheduled speedtests inside docker and plotting the results with gnuplot
MIT License
59 stars 12 forks source link

On ever reboot docker container shows status of EXITED. #160

Closed bonnerkirkd closed 6 months ago

bonnerkirkd commented 6 months ago

I have a remote site with cellular internet. I use Speedtest plotter to keep an eye on performance of the connection. I also have the raspberry pi 4 running Speedtest plotter in a docker container rebooting daily. After every reboot Speedtest plotter shows exited. Looking at logs via protainer, there are no errors. Manually restarting, it starts up normally. Any ideas?

ansemjo commented 6 months ago

First off, I am amazed at all the places that this project is being used. Out of interest: do you have any insight on how much data this uses when running hourly/daily? I figure this would be a metric to look out for on cellular connections?

More to the point:

bonnerkirkd commented 6 months ago

Yah we live in the Colorado Rockies. I have some RV property 3-4 miles from our cabin. We rent the property in the summer months and occasionally I have to reboot the AT&T hotspot which gets great speeds. Using an Omada SDN I have a T-Mobile hotspot as my secondary internet connection which gives me enough bandwidth to log into the raspberry pi to reboot the AT&T hotspot. While not perfect I pay a total of $40 for both hotspot with unlimited data. "Grandfathered" plans of course. Cheaper than Starlink. My Speedtest schedule is 4x per day so it's using maybe 1-2gb per day. If I run it on its default 15m interval im certain I'd use close to 1TB every month just doing speed tests.

Anyhow, I currently do not have a restart policy set. Looking a little deeper im seeing the exit code is 143.

Thanks!

Kirk

bonnerkirkd commented 6 months ago

OK ... yup ... I'm an idiot. I normally have a restart policy on all my containers. I was always under the impression a docker container would automagically start up after a server reboot. But to your point it looks like the exite status was from the shut down and not from the start up. Thank you!!! Awesome tool and even better support.

ansemjo commented 6 months ago

Ugh, I am paying T-Mobile about 40 € for just 10 GB of data here in Germany. Either way, very interesting, thanks!

A quick search leads me to believe that error 143 is the "happy path" when a container correctly obeys the SIGTERM signal and shuts down. At the same time, the default for Docker is not to restart the container when no particular policy is set.

Haha, well, you were a few seconds faster. Glad this was an easy fix! 😊

bonnerkirkd commented 6 months ago

Pretty sure with my tmo plan im using an iPad plan sim in a 4g/lte hotspot (GL.iNet 4G LTE). you just have to use a hotspot for which you can change the TTL so it doesn't look like tethered data use. Changing the TTL makes it look like on device data. With my family plan adding an iPad at the time was $20 USD for unlimited data. My ATT plan on the other hand is a legit unlimited plan for $20 from about 10 years ago. I will never let that one go :)

Father was US Air Force. I was born and raised in Germany from age 4-12. Best wished from Colorado :)