APCUPSD 3.14.10 Plugin for unRAID 5b11+


Recommended Posts

no worries.. SSH is more secure then putty anyways.

you're also giving a nix and apple way. some people are anti windows or don't have spare licenses. Plus nix is less overhead as a guest.

 

My power has gone out twice in the last 3 days. my script came through for me the first time and shutdown all my guests cleanly.

however it failed the second time. My fail over "timeout" in unMENU did kick in and at least shut down unRAID. just not ESXi.

 

 

I realized after it failed that my windows box was not listening. i had not logged into it since the previous days outage.

I since set the windows script guest to auto logon on reboot. now it picks up every time.

 

 

 

 

Link to comment
  • 3 weeks later...
  • Replies 443
  • Created
  • Last Reply

Top Posters In This Topic

Hmm... it looks like the apcupsd process quit out on me not too long ago.  Relevant portion of the logs:

 

Dec  4 04:40:01 Tower apcupsd[1711]: apcupsd exiting, signal 15
Dec  4 04:40:01 Tower apcupsd[23454]: Valid lock file for pid=1711, but not ours pid=23454 
Dec  4 04:40:01 Tower apcupsd[23454]: apcupsd FATAL ERROR in apcupsd.c at line 285 Failed to acquire device lock file  (Errors)
Dec  4 04:40:01 Tower apcupsd[23454]: Valid lock file for pid=1711, but not ours pid=23454 
Dec  4 04:40:01 Tower apcupsd[23454]: apcupsd error shutdown completed (Errors)
Dec  4 04:40:02 Tower kernel: apcupsd[1711]: segfault at 0 ip 0805e204 sp bfa395b0 error 4 in apcupsd[8048000+38000] (Errors)

 

Can anyone make sense of this?  When I went to the plugin config page it showed it not being connected.  Re-enabling it seems to have brought it back to life, but I'd hate to have this quit out on me then get a power failure.

Link to comment

I've been experiencing the same issue.  It's weird that it only recently started happening but maybe I just never noticed.  Now that I don't reboot my unRAID box too often, I noticed on my virtualized OS X that the apc monitor there said "NETWORK ERROR".  It's happened approx. 3-4x this weekend.  In unMENU, there was this warning about 3.14.8 (this is 3.14.10)

 

Several users have reported that this version of apcupsd stops responding to status requests after a period of time. For that reason, unless you need some feature added or fixed in this version, the older 3.14.3 version is the better choice. This newer version is here if you wish to give it a try and take the risk of it not responding.

Link to comment

I might get in trouble for doing this (and no disprespect meant) but I've just updated SeeDrs .plg file to install the old version.  This way, you can have the awesome UI he created but with the possibly more stable older version of the plugin.  I'll attach it here.

 

*NOTE*

 

On line 580, mine includes also includes a DoShutdown command append to apccontrol.  This solves the issue of shutting down ESXi for me.  You can follow my tutorial above to create the private key, etc and replace 192.168.0.109 with the IP address of your ESXi host OR you can remove it completely from the .plg.  Please keep this in mind when downloading the attached file!!!

Apcupsd-3.14.3-i468-2atv.plg.txt

Link to comment

I have this problem also (see: http://lime-technology.com/forum/index.php?topic=16537.0)

 

It happened to me on the 13th and the 20th at the same time. Seems to be its always Sunday morning at the same time and is the same in your case shown. After the instance on the 20th, i played with the dropdown where USB was selected (at work now, cant remember what the option is exactly), and tried to bring up APCUPSD using different ones, none of them worked. I changed it back to USB and started it, and to my surprise, I did not have the problem again this past week. We'll see if it holds on, but that did the trick for me for whatever reason.

Link to comment
  • 4 weeks later...
  • 4 weeks later...
  • 1 month later...
  • 2 weeks later...

Ok question. I had my first power outtage that lasted more than 5 minutes since I got a UPS. I have this plug-in installed and have seen severl short outtages that work properly, server stays up and all. This long one i had, didnt shutdown cleanly. When i restarted, array was stopped and it tried to do a parity check. I know why this happened, because i have Plex running and the array couldnt stop.

 

Here is where my questions kick in. How long will the script wait while trying to spin-down drives before the server is powered down? Is there a way to have unRAID save syslog's so i can view them after a restart, like a way to archive them where they arent lost? Also, is there a way to modify the script to stop a process before stopping the array, such as Plex?

 

Thanks in advance!

Link to comment

Ok question. I had my first power outtage that lasted more than 5 minutes since I got a UPS. I have this plug-in installed and have seen severl short outtages that work properly, server stays up and all. This long one i had, didnt shutdown cleanly. When i restarted, array was stopped and it tried to do a parity check. I know why this happened, because i have Plex running and the array couldnt stop.

 

Here is where my questions kick in. How long will the script wait while trying to spin-down drives before the server is powered down? Is there a way to have unRAID save syslog's so i can view them after a restart, like a way to archive them where they arent lost? Also, is there a way to modify the script to stop a process before stopping the array, such as Plex?

 

Thanks in advance!

I know nothing about  this plugin, but the apcupsd install script in unMENU also REQUIRES you also install the "powerdown" script, otherwise it cannot stop processes holding disks busy.

 

Do you also have the powerdown script installed?

 

Joe L.

Link to comment

I installed it on 5b12a, configured it, and yes, it simply works.

 

Just one request:

Can the output when selecting Full Status be more formatted or grouped? I have an IBM-branded APC SUA1500i and now just get a long list of values.

Maybe a little "visual prettiness" could be added too.

 

But so it does the job nicely.

 

Maybe it can be integrated in the SimpleFeatures plugin?

Link to comment
  • 1 month later...

I dropped apcupsd-3.14.10-i468-2atv.plg into /boot/config/plugins then rebooted... I could not find the plugin on the settings page so I sent the telnet command "installplg /boot/config/plugins/apcupsd-3.14.10-i468-1atv.plg" and received this error:

 

root@Inara:/boot/config/plugins# installplg /boot/config/plugins/apcupsd-3.14.10-i468-1atv.plg
installing plugin: apcupsd-3.14.10-i468-1atv

Warning: simplexml_load_file(): I/O warning : failed to load external entity "/boot/config/plugins/apcupsd-3.14.10-i468-1atv.plg" in /usr/local/sbin/installplg on line 13
xml parse error

 

What did I do wrong? I'm running beta 14

Link to comment

I am having an issue when the Apcupsd plugin is installed on boot up, the syslog gets stuck in a constant refresh when I try to view it.  Installing the plugin manually does not produce the problem until a reboot.

 

As a work around I renamed the plugin to .plug and install it with installplg in the go file.

 

Has anyone seen this?

 

SOLVED: It was an issue in the plugin.  I took care of it - appears to have been a race issue within the plugin.

Link to comment

Hi,

I´ve been having the same problem with the syslog, can you explain exactly how you solve the problem.

 

Thanks

 

Attached is the modified plugin to fix the problem.  I've also reverted back to Apcupsd 3.14.3 because of potential issues I've seen posted about the later version(s).

 

I moved the start up script to the array being mounted event.  While this fixed the problem in this situation, I wonder if an event to indicate when the WebGui is ready might be better.  The apcupsd is not dependent on the array being mounted, but it appears to want the WebGui available to take html messages?  I see messages on the console at boot up with '<br>' rather than line feeds (/n), so I'm guessing that the start up script is expecting the message to go to the WebGui (not sure what I am talking about here) that is not ready to accept those messages.

 

Tom, is there a plugin event more suited to this situation?  While I was able to get this plugin to work, I'm wondering if down the road there is a better solution.  If the array does not mount, the apcupsd daemon will not start?  Not sure this is all that important here, but could impact other plugins.  I would not hold up any release of 5.0 for these seemingly minor issues.

 

SeeDrs, feel free to review the validity of my changes to see if it is appropriate to include them in your plugin permanently.

 

I re-versioned the plugin just so you can tell the difference between the original and my revised version; I'm not claiming authorship for this plugin.

 

EDIT: Plugin updated.  I modified the plugin because of an extra line left in that was specific to one user.

Apcupsd-3.14.3-i486-3dl.txt

Link to comment

Hi,

I´ve been having the same problem with the syslog, can you explain exactly how you solve the problem.

 

Thanks

 

Attached is the modified plugin to fix the problem.  I've also reverted back to Apcupsd 3.14.3 because of potential issues I've seen posted about the later version(s).

 

I moved the start up script to the array being mounted event.  While this fixed the problem in this situation, I wonder if an event to indicate when the WebGui is ready might be better.  The apcupsd is not dependent on the array being mounted, but it appears to want the WebGui available to take html messages?  I see messages on the console at boot up with '<br>' rather than line feeds (/n), so I'm guessing that the start up script is expecting the message to go to the WebGui (not sure what I am talking about here) that is not ready to accept those messages.

 

Tom, is there a plugin event more suited to this situation?  While I was able to get this plugin to work, I'm wondering if down the road there is a better solution.  If the array does not mount, the apcupsd daemon will not start?  Not sure this is all that important here, but could impact other plugins.  I would not hold up any release of 5.0 for these seemingly minor issues.

 

SeeDrs, feel free to review the validity of my changes to see if it is appropriate to include them in your plugin permanently.

 

I re-versioned the plugin just so you can tell the difference between the original and my revised version; I'm not claiming authorship for this plugin.

 

I'd prefer the apcupsd daemon to run regardless of the state of unRAID. There are many situations that call for the daemon to be running all the time, like network piggybacks & potential emhttp faults.

Link to comment

Hi,

I´ve been having the same problem with the syslog, can you explain exactly how you solve the problem.

 

Thanks

 

Attached is the modified plugin to fix the problem.  I've also reverted back to Apcupsd 3.14.3 because of potential issues I've seen posted about the later version(s).

 

I moved the start up script to the array being mounted event.  While this fixed the problem in this situation, I wonder if an event to indicate when the WebGui is ready might be better.  The apcupsd is not dependent on the array being mounted, but it appears to want the WebGui available to take html messages?  I see messages on the console at boot up with '<br>' rather than line feeds (/n), so I'm guessing that the start up script is expecting the message to go to the WebGui (not sure what I am talking about here) that is not ready to accept those messages.

 

Tom, is there a plugin event more suited to this situation?  While I was able to get this plugin to work, I'm wondering if down the road there is a better solution.  If the array does not mount, the apcupsd daemon will not start?  Not sure this is all that important here, but could impact other plugins.  I would not hold up any release of 5.0 for these seemingly minor issues.

 

SeeDrs, feel free to review the validity of my changes to see if it is appropriate to include them in your plugin permanently.

 

I re-versioned the plugin just so you can tell the difference between the original and my revised version; I'm not claiming authorship for this plugin.

 

I'd prefer the apcupsd daemon to run regardless of the state of unRAID. There are many situations that call for the daemon to be running all the time, like network piggybacks & potential emhttp faults.

 

I agree.  I'm hoping Tom can offer a suggestion on how this can be done so this plugin does not depend on the state of unRaid.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.