NUT package (2.8.0 and below)
-
Hello :)
I enabled email notifications, and now I am being flooded by these kinds of messages:
Wed, 14 Jun 2017 19:25:41 +0200 Communications with UPS ups@192.168.2.21 lost Wed, 14 Jun 2017 19:25:46 +0200 Communications with UPS ups@192.168.2.21 established
Wed, 14 Jun 2017 22:49:25 +0200 Communications with UPS ups@192.168.2.21 lost
Wed, 14 Jun 2017 22:49:30 +0200 Communications with UPS ups@192.168.2.21 established
And there's loads of them, as the attached screenshot shows.
Meanwhile, in system logs I see this:Jun 15 17:14:01 php-cgi nut_email.php: Message sent to [SCRUBBED]OK
Jun 15 17:14:00 upsmon 40316 Communications with UPS ups@192.168.300.117 established
Jun 15 17:13:56 php-cgi nut_email.php: Message sent to [SCRUBBED]OK
Jun 15 17:13:55 upsmon 40316 Communications with UPS ups@192.168.300.117 lost
Jun 15 17:13:55 upsmon 40316 Poll UPS [[email]ups@192.168.300.117] failed - Write error: Permission denied
Jun 15 17:12:35 php-cgi nut_email.php: Could not send the message to [SCRUBBED]– Error: it was not possible to read line from the SMTP server: data access time out
Jun 15 17:11:40 php-cgi nut_email.php: Message sent to [SCRUBBED]OK
Jun 15 17:11:40 upsmon 40316 Communications with UPS ups@192.168.300.117 established
Jun 15 17:11:35 upsmon 40316 Communications with UPS ups@192.168.300.117 lost
Jun 15 17:11:35 upsmon 40316 Poll UPS [[email]ups@192.168.300.117] failed - Write error: Permission deniedNut is acting as a client ("Remote NUT server") to a Synology (the ..300.117) that acts as a NUT-server in the network segment, and which is connected (via USB) to an APC UPS. So, since it is acting as a client, there isn't anything much to configure in the pfSense package.
Would anybody know how I can fix this problem?
Thank you in advance,
Bye,Nut is acting as a client ("Remote NUT server") to a Synology (the ..300.117) that acts as a NUT-server in the network segment, and which is connected (via USB) to an APC UPS. So, since it is acting as a client, there isn't anything much to configure in the pfSense package.
Would anybody know how I can fix this problem?
Thank you in advance,
Bye,
-
What are you seeing on the Synology?
-
With the help off this forum, the Syno forum and the NUT man pages, I hooked up my APC UPS USB to pfSense, pfSense is the "NUT server".
My Syno is the client off pfSense-NUT.
Works great for me.Btw : it seems to me that you have network errors. And "NUT" complains about it.
Your mail server isn't playing it softly neither ….
-
What are you seeing on the Synology?
Thank you Denny :P
Syno says nothing, other machines that are clients to Syno UPS-server also don't log anything.
Latest power outage (going on the UPS) was June 9 (per attached pic).
Thank you :D
-
With the help off this forum, the Syno forum and the NUT man pages, I hooked up my APC UPS USB to pfSense, pfSense is the "NUT server".
My Syno is the client off pfSense-NUT.
Works great for me.I've had it the other way around for the past 6 years, which worked fine. That is: I don't recall ever enabling email notifications (which is not to say I haven't done that. Simply don't recall it), which therefor never bugged me before either because the problem never existed in the past - or always existed but was never emailed to me.
Btw : it seems to me that you have network errors. And "NUT" complains about it.
How do you see that I have network problems if I could ask? Would you happen to know what kind of network problems?
Because I don't experience any network problems at all :-[
-
The NUT connection problem, and the SMTP problem are both suggestive of TCP connections being forcibly closed or timing out.
Questions:
Is the Synology that is hosting NUT also hosting your SMTP?
Is the Synology accessed via the LAN interface on pfSense?
Do you have anything set up on pfSense to kill states?
Do you have the firewall enabled on the Synology?
What is between pfSense and the Synology? A switch? Another firewall?@Mr.:
How do you see that I have network problems if I could ask? Would you happen to know what kind of network problems?
-
The NUT connection problem, and the SMTP problem are both suggestive of TCP connections being forcibly closed or timing out.
Questions:
1. Is the Synology that is hosting NUT also hosting your SMTP?
2. Is the Synology accessed via the LAN interface on pfSense?
3. Do you have anything set up on pfSense to kill states?
4. Do you have the firewall enabled on the Synology?
5. What is between pfSense and the Synology? A switch? Another firewall?@Mr.:
How do you see that I have network problems if I could ask? Would you happen to know what kind of network problems?
Thank you Denny :)
1. Yes.
2. Yes, both in the same LAN.
3. No.
4. No.
5. HP Procurve 1910 switch. -
@Mr.:
How do you see that I have network problems if I could ask? Would you happen to know what kind of network problems?
Because I don't experience any network problems at all :-[
[/quote]
upsmon says you so :
@Mr.:…..
Jun 15 17:11:35 upsmon 40316 Communications with UPS ups@192.168.300.117 lost
….
5 seconds later :
Jun 15 17:11:40 upsmon 40316 Communications with UPS ups@192.168.300.117 established
…..These log lines are from upsmon running on pfSense.
"ups@192.168.300.117" is the identity of the server, running on your diskstation (IP 192.168.300.117). This connection (some TCP link or whatever) fails and is reconstructed 5 seconds later.
At least, that's what I make on it.edit : ah ….
Wait a minute.
your smtp server is running on your diskstation. Using other words : your smtp sever is running on your LAN.
Are these :
..... ups@192.168.300.117 …...
log lines that indicate "smtp handshake" errors ? (being pfSense as a mail client and the app running on the diskstation as the mail server) ?One big advise : DO NOT, NEVER EVER run a smtp server on a LAN. Live is just to short. I know, a Synology can do many things, but don't make it think it is a (relaying) smtp server. Mail server settings are ..... huge. Far more easy will be : use the mail server of your ISP - or, why not, our your own mail server on a host on the net (your dedicated or VPS server somewhere on the net).
Client to server smtp communication is easy to debug, pfSense is just a pile of PHP script lines when it concerns the smtp transaction so you can find out easily what's up. But then your smtp mail server has to deliver the mail, so it reached out from your LAN to, for example, mail.gmail.com (GMail's mail server) and in that case your "DNS reverse" has to be ok, SPF should be fine, DKIM should be rock solid, and recently you better have your DMARC set correctly.
When I have some time I'll try to activate the "smtp server app" in my diskstation to I can see what you saw ... -
Something is interfering with TCP connections between your pfSense instance and the Synology on the LAN. Usually this would be a firewall, but that doesn't seem the case here based on your answers. Best thing I can suggest is to run tcpdump on both, and see if you can at least identify the direction packets are being lost in.
With regard to running an SMTP server in the LAN, I don't see an issue with this. You certainly don't want the SMTP server in the LAN exposed (tunneled) to the internet, but when used in conjunction with a an external server which handles the internet connections it is quite safe. I would consider it as a very common architecture.
I myself use a Synology as the internal IMAP/SMTP server, with Postfix in the DMZ as the external server.
-
bdf0506, can you please confirm that you haven't modified any of the system or nut scripts by hand? I will have a look at this, but it will be about a week before I can.
Any chance you've had a chance to look at this? Config files were provided in a previous post. Thanks!
-
I have. The power kill logic is gone from the base os level. Still searching to find out when and why.
-
I have. The power kill logic is gone from the base os level. Still searching to find out when and why.
Ah, interesting. Sounds like it isn't an issue with my specific setup and it is a bug affecting anyone trying to use that functionality in the NUT package. Looking forward to seeing a fix for this whenever one can be found.
-
Sounds like it isn't an issue with my specific setup and it is a bug affecting anyone trying to use that functionality in the NUT package.
Correct.
-
Gertjan, Are you using link aggregation on pfSense or bonding on the Synology?
Something is interfering with TCP connections between your pfSense instance and the Synology on the LAN.
-
Gertjan, Are you using link aggregation on pfSense or bonding on the Synology?
Something is interfering with TCP connections between your pfSense instance and the Synology on the LAN.
Although you asked Gertjan this question, it triggered me, and yes, I had bonding on the Synology. I deleted the bond, and I think the problem is gone. I am looking, but sofar no more emails about connection lost and established.
I'll report back tomorrow, thank you :-*
I was hoping this would also fix another problem I have with shared folder sync over VPN, but unfortunately not. I'll post a new thread for that (edit: it is here, in case you have a spare minute left and would be curious ;D https://forum.pfsense.org/index.php?topic=132628.0).
-
@Mr.:
Although you asked Gertjan this question, it triggered me, and yes, I had bonding on the Synology. I deleted the bond, and I think the problem is gone. I am looking, but sofar no more emails about connection lost and established.
Yep, I addressed the wrong person. Sorry about that.
Anyway, it makes sense. You have a disagreement between the link aggregation group configuration on the Synology and the switch.
-
@Mr.:
Although you asked Gertjan this question, it triggered me, and yes, I had bonding on the Synology. I deleted the bond, and I think the problem is gone. I am looking, but sofar no more emails about connection lost and established.
Yep, I addressed the wrong person. Sorry about that.
Anyway, it makes sense. You have a disagreement between the link aggregation group configuration on the Synology and the switch.
The benefit of understanding networking. Thank you for your message :-*
-
Too good to be true: I just got two :-[
[quote]
Fri, 23 Jun 2017 23:33:30 +0200
Communications with UPS lostFri, 23 Jun 2017 23:33:35 +0200
Communications with UPS established -
Suggest that you disable all lag/bonding for both pfSense and the Synology (don't forget to disable lag/lacp on the switch ports) and disconnect all but one cable to each system. Then check ping in both directions and confirm that there is no loss.
-
Hello, I have a Tripp Lite Smart1500LCDT that I'm trying to use with NUT. I have seen NUT connect to the UPS briefly a handful of times and will cycle between online \ offline.
I have tried using the usbhid driver without any extra arguments and with settings found http://networkupstools.org/ddl/Tripp_Lite/SMART1500LCDT.html
[2.3.4-RELEASE][root@pfSense]/root: cat /usr/local/etc/nut/ups.conf user=root [SMART1500LCDT] driver=usbhid-ups port=auto battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 30 battery.runtime: 10800 battery.type: PbAC battery.voltage: 0.0 battery.voltage.nominal: 24.0 device.mfr: Tripp Lite device.model: TRIPP LITE UPS device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.productid: 3016 driver.version: 2.6.3 driver.version.data: TrippLite HID 0.6 driver.version.internal: 0.35 input.frequency: 5990.0 input.transfer.high: 150.0 input.transfer.low: 92.0 input.voltage: 0.0 input.voltage.nominal: 120 output.current: 0.00 output.frequency: 5990.0 output.frequency.nominal: 60 output.voltage: 0.0 output.voltage.nominal: 120 ups.beeper.status: disabled ups.delay.shutdown: 20 ups.delay.start: 30 ups.load: 0 ups.mfr: Tripp Lite ups.model: TRIPP LITE UPS ups.power: 0.0 ups.power.nominal: 1500 ups.productid: 3016 ups.status: OL ups.timer.reboot: 65535 ups.timer.shutdown: 65535 ups.timer.start: 65535 ups.vendorid: 09ae ups.watchdog.status: 0 #CMD:beeper.disable #CMD:beeper.enable #CMD:beeper.mute #CMD:beeper.off #CMD:beeper.on #CMD:load.off #CMD:load.off.delay #CMD:load.on #CMD:load.on.delay #CMD:reset.watchdog #CMD:shutdown.reboot #CMD:shutdown.return #CMD:shutdown.stayoff #CMD:shutdown.stop #RW:battery.charge.low:STRING #RW:input.transfer.high:STRING #RW:input.transfer.low:STRING #RW:ups.delay.shutdown:STRING #RW:ups.delay.start:STRING
[2.3.4-RELEASE][root@pfSense]/root: cat /usr/local/etc/nut/upsd.conf LISTEN 127.0.0.1 LISTEN ::1
[2.3.4-RELEASE][root@pfSense]/root: cat /usr/local/etc/nut/upsmon.conf MONITOR SMART1500LCDT 1 monuser 3b3e3a783e68ff21be0b master SHUTDOWNCMD "/sbin/shutdown -p +0" POWERDOWNFLAG /etc/killpower
[2.3.4-RELEASE][root@pfsense]/root: usbconfig dump_device_desc ugen0.1: <ehci root="" hub="" intel="">at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0009 <hub>bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x0000 idProduct = 0x0000 bcdDevice = 0x0100 iManufacturer = 0x0001 <intel>iProduct = 0x0002 <ehci root="" hub="">iSerialNumber = 0x0000 <no string="">bNumConfigurations = 0x0001 ugen1.1: <ehci root="" hub="" intel="">at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0009 <hub>bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x0000 idProduct = 0x0000 bcdDevice = 0x0100 iManufacturer = 0x0001 <intel>iProduct = 0x0002 <ehci root="" hub="">iSerialNumber = 0x0000 <no string="">bNumConfigurations = 0x0001 ugen0.2: <product 0x0020="" vendor="" 0x8087="">at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0009 <hub>bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x8087 idProduct = 0x0020 bcdDevice = 0x0000 iManufacturer = 0x0000 <no string="">iProduct = 0x0000 <no string="">iSerialNumber = 0x0000 <no string="">bNumConfigurations = 0x0001 ugen1.2: <product 0x0020="" vendor="" 0x8087="">at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0009 <hub>bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x8087 idProduct = 0x0020 bcdDevice = 0x0000 iManufacturer = 0x0000 <no string="">iProduct = 0x0000 <no string="">iSerialNumber = 0x0000 <no string="">bNumConfigurations = 0x0001 ugen1.3: <tripp lite="" ups="" tripp="">at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x0000 <probed by="" interface="" class="">bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x09ae idProduct = 0x3016 bcdDevice = 0x0002 iManufacturer = 0x0003 <tripp lite="">iProduct = 0x0001 <tripp lite="" ups="">iSerialNumber = 0x0005 <retrieving string="" failed="">bNumConfigurations = 0x0001</retrieving></tripp></tripp></probed></tripp></no></no></no></hub></product></no></no></no></hub></product></no></ehci></intel></hub></ehci></no></ehci></intel></hub></ehci>
[2.3.4-RELEASE][root@pfsense]/root: service devd restart Stopping devd. Waiting for PIDS: 9885. Starting devd. [2.3.4-RELEASE][root@pfsense]/root: /usr/local/etc/rc.d/nut.sh restart stopping NUT starting NUT Network UPS Tools upsmon 2.7.4 kill: No such process UPS: SMART1500LCDT (master) (power value 1) Using power down flag file /etc/killpower Network UPS Tools - UPS driver controller 2.7.4 Network UPS Tools - Generic HID driver 0.41 (2.7.4) USB communication driver 0.33 Network UPS Tools upsd 2.7.4 fopen /var/db/nut/upsd.pid: No such file or directory listening on ::1 port 3493 listening on 127.0.0.1 port 3493 Can't connect to UPS [SMART1500LCDT] (usbhid-ups-SMART1500LCDT): No such file or directory Broadcast Message from root@pfsense (no tty) at 0:56 EDT... Communications with UPS SMART1500LCDT lost No matching HID UPS found Driver failed to start (exit status=1) Broadcast Message from root@pfsense (no tty) at 0:56 EDT... UPS SMART1500LCDT is unavailable
Jul 15 00:57:28 upsmon 13730 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:57:23 upsmon 13730 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:57:18 upsmon 13730 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:57:13 upsmon 13730 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:57:08 upsmon 13730 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:57:03 upsmon 13730 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:58 upsmon 13730 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:53 upsmon 13730 UPS SMART1500LCDT is unavailable Jul 15 00:56:53 upsmon 13730 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:48 upsmon 13730 Communications with UPS SMART1500LCDT lost Jul 15 00:56:48 upsmon 13730 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:48 upsd 14571 User monuser@::1 logged into UPS [SMART1500LCDT] Jul 15 00:56:46 upsd 14571 Startup successful Jul 15 00:56:46 upsd 14312 Can't connect to UPS [SMART1500LCDT] (usbhid-ups-SMART1500LCDT): No such file or directory Jul 15 00:56:46 upsd 14312 listening on 127.0.0.1 port 3493 Jul 15 00:56:46 upsd 14312 listening on ::1 port 3493 Jul 15 00:56:45 upsmon 13178 Startup successful Jul 15 00:56:45 upsd 76083 Signal 15: exiting Jul 15 00:56:45 upsd 76083 mainloop: Interrupted system call Jul 15 00:56:45 upsd 76083 User monuser@::1 logged out from UPS [SMART1500LCDT] Jul 15 00:56:45 upsmon 75446 Signal 15: exiting Jul 15 00:56:45 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:40 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:35 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:30 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:25 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:20 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:15 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:10 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:05 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:56:00 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:55 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:50 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:45 upsmon 75446 UPS SMART1500LCDT is unavailable Jul 15 00:55:45 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:40 upsmon 75446 Communications with UPS SMART1500LCDT lost Jul 15 00:55:40 upsmon 75446 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:40 upsd 76083 User monuser@::1 logged into UPS [SMART1500LCDT] Jul 15 00:55:38 upsd 76083 Startup successful Jul 15 00:55:38 upsd 75783 Can't connect to UPS [SMART1500LCDT] (usbhid-ups-SMART1500LCDT): No such file or directory Jul 15 00:55:38 upsd 75783 listening on 127.0.0.1 port 3493 Jul 15 00:55:38 upsd 75783 listening on ::1 port 3493 Jul 15 00:55:37 upsmon 74829 Startup successful Jul 15 00:55:35 upsmon 4012 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:30 upsmon 4012 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:25 upsmon 4012 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:19 upsmon 4012 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:14 upsmon 4012 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:13 kernel device_attach: uhid0 attach returned 12 Jul 15 00:55:13 kernel uhid0: no report descriptor Jul 15 00:55:09 upsmon 4012 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:55:08 kernel uhid0: <tripp 0="" 3="" lite="" tripp="" ups,="" class="" 0,="" rev="" 1.10="" 0.02,="" addr="">on usbus1 Jul 15 00:55:04 upsmon 4012 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:54:59 upsmon 4012 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:54:54 upsmon 4012 Poll UPS [SMART1500LCDT] failed - Driver not connected Jul 15 00:54:49 upsmon 4012 Poll UPS [SMART1500LCDT] failed - Driver not connected</tripp>