beaglebone black services down

Hello

I did seven programas in python to measure the analogues inputs in my beaglebone black.I created one service for each script. I only have 4 signals connected to analogues inputs the other three are disconnect, but all services are running.
In my application I need all scripts are running automatically when the beaglebone black boot.
All scripts works well for a few days measuring the values in each analogue input , but , randomly if there is a change in the value in some input , this service fail and is necessary start it again. This happen in any input with a voltage , however , in the analogue inputs without voltages, the services always are working.
These are typical messages :

alarm.service - alarm

Loaded: loaded (/etc/systemd/system/alarm.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Wed 2019-02-06 18:27:24 -05; 1min 14s ago

Process: 1081 ExecStart=/usr/bin/alarm.sh (code=exited, status=1/FAILURE)

Main PID: 1081 (code=exited, status=1/FAILURE)

Feb 06 18:27:24 beaglebone alarm.sh[1081]: File “/usr/lib/python2.7/ssl.py”, line 943, in wrap_socket

Feb 06 18:27:24 beaglebone alarm.sh[1081]: ciphers=ciphers)

Feb 06 18:27:24 beaglebone alarm.sh[1081]: File “/usr/lib/python2.7/ssl.py”, line 611, in init

Feb 06 18:27:24 beaglebone alarm.sh[1081]: self.do_handshake()

Feb 06 18:27:24 beaglebone alarm.sh[1081]: File “/usr/lib/python2.7/ssl.py”, line 840, in do_handshake

Feb 06 18:27:24 beaglebone alarm.sh[1081]: self._sslobj.do_handshake()

Feb 06 18:27:24 beaglebone alarm.sh[1081]: socket.error: [Errno 0] Error

Feb 06 18:27:24 beaglebone systemd[1]: alarm.service: Main process exited, code=exited, status=1/FAILURE

Feb 06 18:27:24 beaglebone systemd[1]: alarm.service: Unit entered failed state.

Feb 06 18:27:24 beaglebone systemd[1]: alarm.service: Failed with result ‘exit-code’.

ptx1.service - ptx1

Loaded: loaded (/etc/systemd/system/ptx1.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Wed 2019-02-06 18:44:24 -05; 8s ago

Process: 1065 ExecStart=/usr/bin/ptx1.sh (code=exited, status=1/FAILURE)

Main PID: 1065 (code=exited, status=1/FAILURE)

Feb 06 18:44:25 beaglebone ptx1.sh[1065]: File “/usr/lib/python2.7/ssl.py”, line 943, in wrap_socket

Feb 06 18:44:25 beaglebone ptx1.sh[1065]: ciphers=ciphers)

Feb 06 18:44:25 beaglebone ptx1.sh[1065]: File “/usr/lib/python2.7/ssl.py”, line 611, in init

Feb 06 18:44:25 beaglebone ptx1.sh[1065]: self.do_handshake()

Feb 06 18:44:25 beaglebone ptx1.sh[1065]: File “/usr/lib/python2.7/ssl.py”, line 840, in do_handshake

Feb 06 18:44:25 beaglebone ptx1.sh[1065]: self._sslobj.do_handshake()

Feb 06 18:44:25 beaglebone ptx1.sh[1065]: socket.error: [Errno 0] Error

Feb 06 18:44:24 beaglebone systemd[1]: ptx1.service: Main process exited, code=exited, status=1/FAILURE

Feb 06 18:44:24 beaglebone systemd[1]: ptx1.service: Unit entered failed state.

Feb 06 18:44:24 beaglebone systemd[1]: ptx1.service: Failed with result ‘exit-code’.

What would be happening?

Thanks

Hugo