NUT package (2.8.0 and below)
-
Thanks for the clarification!
-
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.