marcus67 / little_brother

Parental Control Application implemented in Python 3 packaged for Debian and Ubuntu to monitor and limit kids' play time on Linux hosts
GNU General Public License v3.0
59 stars 9 forks source link

Stack trace = File "/usr/local/lib/python3.9/dist-packages/python_base_app/base_app.py", line 382, #165

Closed vaidls closed 2 years ago

vaidls commented 2 years ago

Ping target is ofline and other two targets is not processed.

ii little-brother 0.4.15-116

2022-01-29 21:27:44,951 - App - ERROR - Exception ['/bin/ping', '-w', '1', '-c', '1', 'fejapc.local'] returns exit code 2 in event queue 2022-01-29 21:27:44,952 - App - ERROR - Stack trace = File "/usr/local/lib/python3.9/dist-packages/python_base_app/base_app.py", line 382, in event_queue task.handler_method() File "/usr/local/lib/python3.9/dist-packages/little_brother/app.py", line 348, in p_handler_method=lambda: self._app_control._process_handler_manager.scan_processes( File "/usr/local/lib/python3.9/dist-packages/little_brother/process_handler_manager.py", line 311, in scan_processes events = p_process_handler.scan_processes( File "/usr/local/lib/python3.9/dist-packages/little_brother/client_device_handler.py", line 280, in scan_processes self.ping_device(p_reference_time=p_reference_time, p_device=device) File "/usr/local/lib/python3.9/dist-packages/little_brother/client_device_handler.py", line 237, in ping_device delay = self._pinger.ping(p_host=p_device.hostname) File "/usr/local/lib/python3.9/dist-packages/python_base_app/pinger.py", line 102, in ping return self.local_ping(p_host=p_host) File "/usr/local/lib/python3.9/dist-packages/python_base_app/pinger.py", line 166, in local_ping raise ConfigurationException(fmt.format(cmd=command, exitcode=proc.returncode))

2022-01-29 21:28:14,957 - App - ERROR - Exception ['/bin/ping', '-w', '1', '-c', '1', 'fejapc.local'] returns exit code 2 in event queue 2022-01-29 21:28:14,958 - App - ERROR - Stack trace = File "/usr/local/lib/python3.9/dist-packages/python_base_app/base_app.py", line 382, in event_queue task.handler_method() File "/usr/local/lib/python3.9/dist-packages/little_brother/app.py", line 348, in p_handler_method=lambda: self._app_control._process_handler_manager.scan_processes( File "/usr/local/lib/python3.9/dist-packages/little_brother/process_handler_manager.py", line 311, in scan_processes events = p_process_handler.scan_processes( File "/usr/local/lib/python3.9/dist-packages/little_brother/client_device_handler.py", line 280, in scan_processes self.ping_device(p_reference_time=p_reference_time, p_device=device) File "/usr/local/lib/python3.9/dist-packages/little_brother/client_device_handler.py", line 237, in ping_device delay = self._pinger.ping(p_host=p_device.hostname) File "/usr/local/lib/python3.9/dist-packages/python_base_app/pinger.py", line 102, in ping return self.local_ping(p_host=p_host) File "/usr/local/lib/python3.9/dist-packages/python_base_app/pinger.py", line 166, in local_ping raise ConfigurationException(fmt.format(cmd=command, exitcode=proc.returncode))

marcus67 commented 2 years ago

I noticed that the ping threw an exception in the new version if the target dns name was invalid. Could that be the case?

marcus67 commented 2 years ago

Hosts with invalid DNS names which are not recognized by ping only trigger an error message in the logging output. I hope this is OK now. @vaidls : Please, monitor your logging output for a while. If these messages occur you may have to choose different host names. Thanks for reporting!

vaidls commented 2 years ago

Yes. It's standard Avahi (zeroconf) domian (.local.).

Then users disconects from network, it disapeares from DNS (which is local and self hosted), entries are added/removed dinamicaly.

So, dns gives resolve error and ping does not even start as ip is not found.