Post by rodskyweather on Mar 5, 2021 10:35:43 GMT -8
Seems like the network is not ready and I fail on a startup. If I execute the command manually once I log in, everything is fine.
Is there a way to test for the network before starting the SkyWeather python script ?
rc-local.service - /etc/rc.local Compatibility
Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)Drop-In: /lib/systemd/system/rc-local.service.d
└─debian.conf
/etc/systemd/system/rc-local.service.d
└─ttyoutput.conf
Active: active (running) since Fri 2021-03-05 12:52:30 EST; 21min ago
Docs: man:systemd-rc-local-generator(8)
Process: 471 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
Tasks: 4 (limit: 1308)
CGroup: /system.slice/rc-local.service
└─513 pigpiod
Mar 05 12:52:53 SkyWeatherPotrerillosArribaPanama rc.local[471]: File "/usr/lib/python2.7/dist-packages/requests/api.py", line 60, in request
Mar 05 12:52:53 SkyWeatherPotrerillosArribaPanama rc.local[471]: return session.request(method=method, url=url, **kwargs)
Mar 05 12:52:53 SkyWeatherPotrerillosArribaPanama rc.local[471]: File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 533, in request
Mar 05 12:52:53 SkyWeatherPotrerillosArribaPanama rc.local[471]: resp = self.send(prep, **send_kwargs)
Mar 05 12:52:53 SkyWeatherPotrerillosArribaPanama rc.local[471]: File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 646, in send
Mar 05 12:52:53 SkyWeatherPotrerillosArribaPanama rc.local[471]: r = adapter.send(request, **kwargs)
Mar 05 12:52:53 SkyWeatherPotrerillosArribaPanama rc.local[471]: File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 516, in send
Mar 05 12:52:53 SkyWeatherPotrerillosArribaPanama rc.local[471]: raise ConnectionError(e, request=request)
Mar 05 12:52:53 SkyWeatherPotrerillosArribaPanama rc.local[471]: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='skyweather.weatherstem.com', port=443): Max retries exceeded with url: /
Mar 05 12:52:53 SkyWeatherPotrerillosArribaPanama sudo[528]: pam_unix(sudo:session): session closed for user root