It happened again this evening:
UPS goes onto battery -> USB comms go down -> USB comms come back up -> USB reconnects under a different port -> NUT immediately assumes the server must be shut down
I think there are several faults here, all of which contribute to this problem:
- The UPS goes onto battery every now and then. Most UPSs do that, in order to handle sudden peaks or lows in the mains.
- The USB loses comms: I assume this to be a UPS fault. It is only down for a second or so.
- The USB comes back up on a different virtual port: it is the OS doing this. It probably does not realise the new device it has detected is the same one that just went bad.
- NUT does not see the new USB connection: possibly a fault with NUT? If the USB has just disappeared from view, then perhaps it needs to rescan the USB ports to find the UPS again, instead of just assuming it has gone for good. Maybe it is, but is doing it too soon? Perhaps a longer delay somewhere would fix this.
Anyway - since I had an external modem set up with Hylafax, I configured the serial port to wake the server. About 40 seconds into calling the fax, and the server is rebooted, saving a visit to the office. That's my handy hint for the day

-- JJ