Closed KevinRoebert closed 6 months ago
Hmmi have no idea what is causing this for you, i never had any issues while running netkeeper... (if i understand you correctly, your connection goes bananas when you do ~5 "i'm online" checks?) Those online checks does not have anything to do with the modem... netkeeper is using ping, your script is using http check... maybe it is caused by something else and this is just coincidence? IDK sounds weird...
Okay. Thank you. I've found out that I get the following error in with netkeeper:
* netkeeper.service - Netkeeper Service
Loaded: loaded (/lib/systemd/system/netkeeper.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2024-05-04 20:46:12 UTC; 18min ago
Main PID: 26701 (netkeeper)
Tasks: 1 (limit: 38293)
Memory: 20.5M
CPU: 365ms
CGroup: /system.slice/netkeeper.service
`-26701 /usr/bin/python3 /usr/bin/netkeeper run --config_prod --log_dir /var/log
May 04 20:53:28 netkeeper netkeeper[26701]: Loading config from /etc/netkeeper/config.yml
May 04 20:53:28 netkeeper netkeeper[26701]: W0504 20:53:28.733 26701 netkeeper.py:282] Connection error rate reached threshold
May 04 20:53:28 netkeeper netkeeper[26701]: W0504 20:53:28.933 26701 netkeeper.py:294] Modem thinks its connected, sleeping for 1 minute...
May 04 21:03:55 netkeeper netkeeper[26701]: Exception ignored in: <function MultiPing.__del__ at 0x7f89d4003760>
May 04 21:03:55 netkeeper netkeeper[26701]: Traceback (most recent call last):
May 04 21:03:55 netkeeper netkeeper[26701]: File "/usr/lib/python3/dist-packages/netkeeper/ext/multiping.py", line 472, in __del__
May 04 21:03:55 netkeeper netkeeper[26701]: self._sock.close()
May 04 21:03:55 netkeeper netkeeper[26701]: AttributeError: 'MultiPing' object has no attribute '_sock'
May 04 21:03:55 netkeeper netkeeper[26701]: W0504 21:03:55.957 26701 netkeeper.py:282] Connection error rate reached threshold
May 04 21:03:56 netkeeper netkeeper[26701]: W0504 21:03:56.157 26701 netkeeper.py:294] Modem thinks its connected, sleeping for 1 minute...```
That most likely happens due to DNS resolution failure in multiping (that is happening before self._sock is defined) but del is called always... This should be detected as network error by netkeeper (with is most likely is) so that is not the issue.
I'm not sure if it's because of this tool or something else. What I have noticed, however, is that when I use netkeeper or my self-written script (see below), the internet connection drops after five to six calls (crontab every minute). What is very strange about this is that I can ping IP addresses, but cannot open a website or SSH connections etc. This does not work even if I use the IP address directly (i.e. no DNS error).
My device: B818-263
My script: