I am running NUT as part of FreeNAS 9.2.0. I have looked through the manuals, but I don't see how to address my issue. The box has 4 NIC's in a LACP LAGG group. It takes a while for LACP to finish, and NUT tries to start before packets are flowing. NUT will complain endlessly about communication errors and never establish SNMP communication with my APC UPS. If I stop NUT and restart it after the LACP negotiation has finished, everything works as it should. Any ideas how to delay the start or make it re-try to establish communications? EBD
On Feb 4, 2014, at 10:48 PM, Elliot Dierksen wrote:> I am running NUT as part of FreeNAS 9.2.0. I have looked through the manuals, but I don't see how to address my issue. The box has 4 NIC's in a LACP LAGG group. It takes a while for LACP to finish, and NUT tries to start before packets are flowing. NUT will complain endlessly about communication errors and never establish SNMP communication with my APC UPS. If I stop NUT and restart it after the LACP negotiation has finished, everything works as it should. Any ideas how to delay the start or make it re-try to establish communications?We just merged a retry feature (maxretry and retrydelay in ups.conf) late last year, but it isn't in a released version of NUT yet. The patch doesn't have any dependencies, so it should apply to 2.7.1 or even 2.6.5. https://github.com/networkupstools/nut/pull/70 The other option is to ask the FreeNAS folks if they can delay the start of NUT until the network is completely configured. If you go that route, let us know what bug or ticket number gets assigned to that. -- Charles Lepple clepple at gmail
On Feb 4, 2014, at 10:48 PM, Elliot Dierksen wrote:> NUT will complain endlessly about communication errors and never establish SNMP communication with my APC UPSHmm, at first glance, I read the "complain endlessly" part as a figure of speech, and figured SNMP would get there eventually since it's UDP. But if you have to stop and restart NUT, that is a different story. What errors are you actually getting from NUT? If upsd is trying to bind to the aggregated interface before it gets an IP address, then I'm not really sure what we should do, since network comms (at least loopback) is a prerequisite for NUT. I think that should be handled by the init system, with a dependency on the network interfaces being fully started. (I haven't looked at the FreeNAS init system much.) If the comms errors are from the SNMP driver, then we should be able to tweak the retry settings in the driver itself, or get the driver to fail and rely on the maxretry/retrydelay that I mentioned earlier. Then, the question becomes "where is the driver getting stuck?" -- Charles Lepple clepple at gmail
On 2/5/2014 8:24 AM, Charles Lepple wrote:> On Feb 4, 2014, at 10:48 PM, Elliot Dierksen wrote: > >> NUT will complain endlessly about communication errors and never establish SNMP communication with my APC UPS > Hmm, at first glance, I read the "complain endlessly" part as a figure of speech, and figured SNMP would get there eventually since it's UDP. But if you have to stop and restart NUT, that is a different story. >Sorry about the time warp on this. I had some issues in my office and wasn't running the box for a while. Here is the actual error: Feb 16 10:15:40 freenas upsmon[2939]: UPS [CR-UPS]: connect failed: Connection failure: Connection refused Feb 16 10:16:15 freenas last message repeated 7 times Feb 16 10:18:17 freenas last message repeated 24 times Feb 16 10:19:38 freenas last message repeated 16 times And the subsequent messages are what I mean about complaining endlessly. Stopping and restarting the UPS service (nut) resolves the problem as follows: Feb 16 10:20:13 freenas notifier: Detected SMART-UPS 5000 RM DL4 on host 192.168.253.32 (mib: apcc 1.2) Feb 16 10:20:13 freenas notifier: [CR-UPS] Warning: excessive poll failures, limiting error reporting Feb 16 10:20:15 freenas notifier: [CR-UPS] Warning: excessive poll failures, limiting error reporting Feb 16 10:20:17 freenas notifier: Network UPS Tools - UPS driver controller 2.6.5 Feb 16 10:20:17 freenas notifier: Starting nut. Feb 16 10:20:17 freenas notifier: listening on 0.0.0.0 port 3493 Feb 16 10:20:17 freenas notifier: Connected to UPS [CR-UPS]: snmp-ups-CR-UPS Feb 16 10:20:17 freenas notifier: Starting nut_upsmon. Feb 16 10:20:17 freenas notifier: UPS: CR-UPS (master) (power value 1) Feb 16 10:20:17 freenas notifier: Starting nut_upslog. Hopefully that makes what I meant more clear. Thanx, EBD
On 2/5/2014 8:24 AM, Charles Lepple wrote:> On Feb 4, 2014, at 10:48 PM, Elliot Dierksen wrote: > >> NUT will complain endlessly about communication errors and never establish SNMP communication with my APC UPS > Hmm, at first glance, I read the "complain endlessly" part as a figure of speech, and figured SNMP would get there eventually since it's UDP. But if you have to stop and restart NUT, that is a different storySorry about the time warp on this. I had some issues in my office and wasn't running the box for a while. Here is the actual error: Feb 16 10:15:40 freenas upsmon[2939]: UPS [CR-UPS]: connect failed: Connection failure: Connection refused Feb 16 10:16:15 freenas last message repeated 7 times Feb 16 10:18:17 freenas last message repeated 24 times Feb 16 10:19:38 freenas last message repeated 16 times And the subsequent messages are what I mean about complaining endlessly. Stopping and restarting the UPS service (nut) resolves the problem as follows: Feb 16 10:20:13 freenas notifier: Detected SMART-UPS 5000 RM DL4 on host 192.168.253.32 (mib: apcc 1.2) Feb 16 10:20:13 freenas notifier: [CR-UPS] Warning: excessive poll failures, limiting error reporting Feb 16 10:20:15 freenas notifier: [CR-UPS] Warning: excessive poll failures, limiting error reporting Feb 16 10:20:17 freenas notifier: Network UPS Tools - UPS driver controller 2.6.5 Feb 16 10:20:17 freenas notifier: Starting nut. Feb 16 10:20:17 freenas notifier: listening on 0.0.0.0 port 3493 Feb 16 10:20:17 freenas notifier: Connected to UPS [CR-UPS]: snmp-ups-CR-UPS Feb 16 10:20:17 freenas notifier: Starting nut_upsmon. Feb 16 10:20:17 freenas notifier: UPS: CR-UPS (master) (power value 1) Feb 16 10:20:17 freenas notifier: Starting nut_upslog. Hopefully that makes what I meant more clear. Thanx, EBD