kantlivelong / OctoPrint-UPS

Integrates a UPS monitored by NUT into OctoPrint
GNU Affero General Public License v3.0
17 stars 7 forks source link

Sudden Loss of Comms GUI Interface #13

Closed InoSiX closed 2 years ago

InoSiX commented 2 years ago

Hiya!

Recently came back to my Octoprint instance on my FFCP and noted I was having issues issuing commands. After a reboot, the Octoprint service wouldn't even start. While looking into the issue, I found my SD card completely full. Turned out it was log related and Daemon.log had been some 400+ mb. I deleted it and restarted. Everything back to normal!

Well, I thought so. Before the reboot, I was well aware of the top bar (including the UPS plugin icon). I could still see the data coming back as normal. Once I rebooted, the icon is blank with the status OFFLINE.

I confirmed NUT was acting normally using PuTTY. The data was available. But the plugin couldn't see it. I still see the configured UPS on the plugin menu drop down, so it isn't like it lost that configuration.

While checking for and update, I noticed the plugin requires Python 3+. I am still running 1.7.3, which I think operates on Python 2.7 something. I know for a fact it was working prior to the reboot I described. Am I missing something?

InoSiX commented 2 years ago

Uhhhhh..

I installed a few more plugins and restarted multiple times. I installed the M117 popup plugin (M117PopUp) to deal with an error I saw in the terminal on Octoprint. After the reboot from that installation, UPS was back online. I didn't change any other settings or install any other plugins.

I am not sure if it's related, but I also cannot help troubleshoot the original issue. Rebooting prior did nothing. So simply rebooting couldn't have been the issue.

I suppose you can close me?

InoSiX commented 2 years ago

Alright so I need to retract my previous comment about closing this issue. Turns out my log started filling up again. I just deleted it 3 days ago and it's back to 223 mb. Instead of simply deleting it this time, I decided to read what was filling it up. Turns out it's the UPS plugin:

033[31m2022-03-21 00:01:29,653 - octoprint.plugins.ups - ERROR - An exception occurred while getting vars info#033[0m

Mar 21 00:01:29 octopi octoprint[377]: Traceback (most recent call last): Mar 21 00:01:29 octopi octoprint[377]: File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_ups/init.py", line 132, in _loop Mar 21 00:01:29 octopi octoprint[377]: vars = self.ups.list_vars(ups=self.config['ups']) Mar 21 00:01:29 octopi octoprint[377]: File "/home/pi/oprint/lib/python3.7/site-packages/nut2.py", line 157, in list_vars Mar 21 00:01:29 octopi octoprint[377]: self._srv_handler.write(b"LIST VAR %s\n" % ups.encode('utf-8')) Mar 21 00:01:29 octopi octoprint[377]: AttributeError: 'NoneType' object has no attribute 'encode'#033[0m

And so on. I am going to disable the plugin for the time being. Look forward to a fix, I really like this plugin!

InoSiX commented 2 years ago

Screenshot 2022-03-24 204349

For context, see the attached image.

kantlivelong commented 2 years ago

Thanks for the info. Looks like a dupe of #12

kantlivelong commented 2 years ago

Potential fix in #12. Closing this ticket.

InoSiX commented 2 years ago

I am happy to report that the supplied zip from #12 seems to have resolved the problem. After 48 hours, my logs have not been flooded. Thank you for all your hard work. I look forward to version 0.0.2.