12-16-2018, 10:29 PM
Hey Robbie,
I think I discovered a very minor processing issue here on startup. Over the weekend, I installed apticron so that I can get email when updates are available on the NEMS box. It's a standard I do on all my Raspberry Pi servers. Side Note: I am aware that NEMS automatically applies security updates as I reading that in another forum. I just prefer to know when I have updates and apticron sends the package details on what the updates are.
Anyway since I now get email notifications on cron jobs, I get the ones when a cron job fails. Whenever I startup NEMS, I get this email notification error:
Traceback (most recent call last):
File "/usr/local/share/nems/nems-scripts/stats-livestatus.py", line 35, in <module>
main()
File "/usr/local/share/nems/nems-scripts/stats-livestatus.py", line 15, in main
s.connect(socket_path)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused
Traceback (most recent call last):
File "/usr/local/share/nems/nems-scripts/stats-livestatus.py", line 35, in <module>
main()
File "/usr/local/share/nems/nems-scripts/stats-livestatus.py", line 15, in main
s.connect(socket_path)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused
I believe I understand what's going on here. The python file loads at reboot and NEMS isn't quite "fully initialized". Hence the cron job fails and now I get this email since I have apticron installed. It may be best to have add in a sleep 60 to put in a one minute delay. I would edit the crontab job, but I know that it's discouraged to manually edit config files. So just an idea down the road as a possible enhancement to NEMS.
I think I discovered a very minor processing issue here on startup. Over the weekend, I installed apticron so that I can get email when updates are available on the NEMS box. It's a standard I do on all my Raspberry Pi servers. Side Note: I am aware that NEMS automatically applies security updates as I reading that in another forum. I just prefer to know when I have updates and apticron sends the package details on what the updates are.
Anyway since I now get email notifications on cron jobs, I get the ones when a cron job fails. Whenever I startup NEMS, I get this email notification error:
Traceback (most recent call last):
File "/usr/local/share/nems/nems-scripts/stats-livestatus.py", line 35, in <module>
main()
File "/usr/local/share/nems/nems-scripts/stats-livestatus.py", line 15, in main
s.connect(socket_path)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused
Traceback (most recent call last):
File "/usr/local/share/nems/nems-scripts/stats-livestatus.py", line 35, in <module>
main()
File "/usr/local/share/nems/nems-scripts/stats-livestatus.py", line 15, in main
s.connect(socket_path)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused
I believe I understand what's going on here. The python file loads at reboot and NEMS isn't quite "fully initialized". Hence the cron job fails and now I get this email since I have apticron installed. It may be best to have add in a sleep 60 to put in a one minute delay. I would edit the crontab job, but I know that it's discouraged to manually edit config files. So just an idea down the road as a possible enhancement to NEMS.