Hello There, Guest! Login Register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

/usr/local/share/nems/nems-scripts/stats-livestatus.py - Errno 111 on startup

#1
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.
 
Messages In This Thread
/usr/local/share/nems/nems-scripts/stats-livestatus.py - Errno 111 on startup - by panda2297 - 12-16-2018, 10:29 PM
RE: /usr/local/share/nems/nems-scripts/stats-livestatus.py - Errno 111 on startup - by Robbie Ferguson - 12-17-2018, 11:33 AM
RE: /usr/local/share/nems/nems-scripts/stats-livestatus.py - Errno 111 on startup - by Robbie Ferguson - 12-17-2018, 12:03 PM
RE: /usr/local/share/nems/nems-scripts/stats-livestatus.py - Errno 111 on startup - by quincybatten - 01-14-2020, 06:19 AM
 
Forum Jump:

Users browsing this thread: 1 Guest(s)