Re: [Nut-upsuser] nut-server service fails to start at boot

2017-10-22 Thread Manuel Wolfshant

On 10/22/2017 09:39 AM, Daniel Shields wrote:


Hello,

 I have a Raspberry Pi model B running Raspbian Stretch.  I have 
installed version 2.7.4-5 of nut from the raspbian repos.  I have a 
CyberPower 1500PFCLCD UPS. When I reboot the Pi, the nut-server 
service fails to start.


root@nut:~# service nut-server status

● nut-server.service - Network UPS Tools - power devices information 
server


   Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; 
vendor preset: enabled)


   Active: failed (Result: exit-code) since Sun 2017-10-22 05:57:37 
UTC; 5min ago


  Process: 341 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE)

Oct 22 05:57:37 nut.tklapp.com upsd[341]: fopen /var/run/nut/upsd.pid: 
No such file or directory


Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 
192.168.213.189 port 3493


Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 
192.168.213.189 port 3493


Oct 22 05:57:37 nut.tklapp.com upsd[341]: listening on 127.0.0.1 port 3493

Oct 22 05:57:37 nut.tklapp.com upsd[341]: no listening interface available

Oct 22 05:57:37 nut.tklapp.com upsd[341]: Network UPS Tools upsd 2.7.4

Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Control 
process exited, code=exited status=1


Oct 22 05:57:37 nut.tklapp.com systemd[1]: Failed to start Network UPS 
Tools - power devices information server.


Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Unit 
entered failed state.


Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Failed 
with result 'exit-code'.


root@nut:~#

I have looked through the syslogs, but have not been able to find 
anything obvious.


I have attached an excerpt from the syslog from when the server is 
rebooted and the nut-server service fails.  Any help or advice is 
greatly appreciated.  Thanks!




Can you please try replacing "after=network.target" with 
"after=network-online.target" ?
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] nut-server service fails to start at boot

2017-10-22 Thread Charles Lepple
On Oct 22, 2017, at 2:39 AM, Daniel Shields  wrote:
> 
> Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 192.168.213.189 
> port 3493
> Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 192.168.213.189 
> port 3493
> Oct 22 05:57:37 nut.tklapp.com upsd[341]: listening on 127.0.0.1 port 3493
> Oct 22 05:57:37 nut.tklapp.com upsd[341]: no listening interface available
> 
I think you're hitting this race condition: 
https://github.com/networkupstools/nut/issues/393

Using the LISTEN directive to selectively ignore certain interfaces worked a 
lot better when 1) we didn't have to worry about interfaces being removed and 
added at runtime and 2) when NUT was guaranteed to start after all of the 
network interfaces were already up.

Can you just use "LISTEN 0.0.0.0"? If there is one particular interface you are 
excluding, can you handle that with firewall rules?
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


[Nut-upsuser] nut-server service fails to start at boot

2017-10-22 Thread Daniel Shields
Hello,

 I have a Raspberry Pi model B running Raspbian Stretch.  I have installed 
version 2.7.4-5 of nut from the raspbian repos.  I have a CyberPower 1500PFCLCD 
UPS.  When I reboot the Pi, the nut-server service fails to start.

root@nut:~# service nut-server status
● nut-server.service - Network UPS Tools - power devices information server
   Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor 
preset: enabled)
   Active: failed (Result: exit-code) since Sun 2017-10-22 05:57:37 UTC; 5min 
ago
  Process: 341 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE)

Oct 22 05:57:37 nut.tklapp.com upsd[341]: fopen /var/run/nut/upsd.pid: No such 
file or directory
Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 192.168.213.189 port 
3493
Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 192.168.213.189 port 
3493
Oct 22 05:57:37 nut.tklapp.com upsd[341]: listening on 127.0.0.1 port 3493
Oct 22 05:57:37 nut.tklapp.com upsd[341]: no listening interface available
Oct 22 05:57:37 nut.tklapp.com upsd[341]: Network UPS Tools upsd 2.7.4
Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Control process 
exited, code=exited status=1
Oct 22 05:57:37 nut.tklapp.com systemd[1]: Failed to start Network UPS Tools - 
power devices information server.
Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Unit entered 
failed state.
Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Failed with 
result 'exit-code'.
root@nut:~#

I have looked through the syslogs, but have not been able to find anything 
obvious.

I have attached an excerpt from the syslog from when the server is rebooted and 
the nut-server service fails.  Any help or advice is greatly appreciated.  
Thanks!

Sent from Mail for Windows 10

Oct 22 05:57:20 nut systemd[1]: Stopped target Timers.
Oct 22 05:57:20 nut systemd[1]: Stopped Daily Cleanup of Temporary Directories.
Oct 22 05:57:20 nut systemd[1]: Stopping Session c1 of user root.
Oct 22 05:57:20 nut systemd[1]: Stopping User Manager for UID 0...
Oct 22 05:57:20 nut systemd[1]: Stopped target Graphical Interface.
Oct 22 05:57:20 nut systemd[1]: Stopped target Multi-User System.
Oct 22 05:57:20 nut systemd[1]: Stopping OpenBSD Secure Shell server...
Oct 22 05:57:20 nut avahi-daemon[317]: Got SIGTERM, quitting.
Oct 22 05:57:20 nut systemd[909]: Stopped target Default.
Oct 22 05:57:20 nut avahi-daemon[317]: Leaving mDNS multicast group on 
interface eth0.IPv6 with address fe80::4ee8:e4cc:3a10:9a1c.
Oct 22 05:57:20 nut systemd[909]: Stopped target Basic System.
Oct 22 05:57:20 nut avahi-daemon[317]: Leaving mDNS multicast group on 
interface eth0.IPv4 with address 192.168.213.189.
Oct 22 05:57:20 nut systemd[909]: Stopped target Sockets.
Oct 22 05:57:20 nut avahi-daemon[317]: avahi-daemon 0.6.32 exiting.
Oct 22 05:57:20 nut systemd[909]: Closed GnuPG cryptographic agent and 
passphrase cache.
Oct 22 05:57:20 nut upsmon[416]: Signal 15: exiting
Oct 22 05:57:20 nut systemd[909]: Closed GnuPG network certificate management 
daemon.
Oct 22 05:57:20 nut upsmon[415]: upsmon parent: read
Oct 22 05:57:20 nut systemd[909]: Closed GnuPG cryptographic agent (ssh-agent 
emulation).
Oct 22 05:57:20 nut upsd[1018]: mainloop: Interrupted system call
Oct 22 05:57:20 nut systemd[909]: Closed GnuPG cryptographic agent (access for 
web browsers).
Oct 22 05:57:34 nut fake-hwclock[93]: Sun Oct 22 05:57:24 UTC 2017
Oct 22 05:57:34 nut systemd-fsck[99]: e2fsck 1.43.4 (31-Jan-2017)
Oct 22 05:57:34 nut systemd-fsck[99]: /dev/mmcblk0p2: clean, 45851/959616 
files, 453583/3872384 blocks
Oct 22 05:57:34 nut kernel: [0.00] Booting Linux on physical CPU 0x0
Oct 22 05:57:34 nut kernel: [0.00] Linux version 4.9.35+ 
(dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG 
crosstool-ng-1.22.0-88-g8460611) ) #1014 Fri Jun 30 ST 2017
Oct 22 05:57:34 nut kernel: [0.00] CPU: ARMv6-compatible processor 
[410fb767] revision 7 (ARMv7), cr=00c5387d
Oct 22 05:57:34 nut kernel: [0.00] CPU: PIPT / VIPT nonaliasing data 
cache, VIPT nonaliasing instruction cache
Oct 22 05:57:34 nut kernel: [0.00] OF: fdt:Machine model: Raspberry Pi 
Model B Rev 2
Oct 22 05:57:34 nut kernel: [0.00] cma: Reserved 8 MiB at 0x1b40
Oct 22 05:57:34 nut kernel: [0.00] Memory policy: Data cache writeback
Oct 22 05:57:34 nut kernel: [0.00] On node 0 totalpages: 114688
Oct 22 05:57:34 nut kernel: [0.00] free_area_init_node: node 0, pgdat 
c0914874, node_mem_map db01
Oct 22 05:57:34 nut kernel: [0.00]   Normal zone: 1008 pages used for 
memmap
Oct 22 05:57:34 nut kernel: [0.00]   Normal zone: 0 pages reserved
Oct 22 05:57:34 nut kernel: [0.00]   Normal zone: 114688 pages, LIFO 
batch:31
Oct 22 05:57:34 nut kernel: [0.00] pcpu-alloc: s0 r0 d32768 u32768 
alloc=1*32768
Oct 22 05:57:34 nut kernel: [0.00] pcpu-alloc: [0] 0
Oct 22 05:57:34 nut