fruit-uk
Posts: 609
Joined: Wed Aug 06, 2014 4:19 pm
Location: Suffolk, UK

[Solved] jessie and nut-server

Mon Dec 21, 2015 7:53 am

I have just replaced a wheezy B+ with a jessie Pi2

I have a problem with nut-server which used to work fine under wheezy but fails on boot under jessie
I can start it manually once booted but that's not an ideal solution

UPS is APC Smart UPS750

Syslog extract...

Code: Select all

Dec 21 07:36:08 rpi systemd[1]: Starting Network UPS Tools - power devices information server...
Dec 21 07:36:09 rpi upsd[667]: fopen /var/run/nut/upsd.pid: No such file or directory
Dec 21 07:36:09 rpi upsd[667]: not listening on 81.187.182.35 port 3493
Dec 21 07:36:09 rpi upsd[667]: listening on 127.0.0.1 port 3493
Dec 21 07:36:09 rpi upsd[667]: no listening interface available
Dec 21 07:36:09 rpi upsd[667]: not listening on 81.187.182.35 port 3493
Dec 21 07:36:09 rpi upsd[667]: listening on 127.0.0.1 port 3493
Dec 21 07:36:09 rpi upsd[667]: no listening interface available
Dec 21 07:36:09 rpi upsd[667]: Network UPS Tools upsd 2.7.2
Dec 21 07:36:09 rpi systemd[1]: nut-server.service: control process exited, code=exited status=1
Dec 21 07:36:09 rpi systemd[1]: Failed to start Network UPS Tools - power devices information server.
Dec 21 07:36:09 rpi systemd[1]: Service nut-driver.service is not needed anymore. Stopping.
Dec 21 07:36:09 rpi systemd[1]: Unit nut-server.service entered failed state.
Dec 21 07:36:09 rpi systemd[1]: Stopping Network UPS Tools - power device driver controller...
Dec 21 07:36:09 rpi systemd[1]: Starting Network UPS Tools - power device monitor and shutdown controller...
Dec 21 07:36:09 rpi upsdrvctl[708]: Network UPS Tools - UPS driver controller 2.7.2
Dec 21 07:36:09 rpi usbhid-ups[663]: Signal 15: exiting
Dec 21 07:36:09 rpi systemd[1]: Stopped Network UPS Tools - power device driver controller.
Dec 21 07:36:09 rpi upsmon[709]: fopen /var/run/nut/upsmon.pid: No such file or directory
Dec 21 07:36:09 rpi upsmon[709]: UPS: [email protected] (master) (power value 1)
Dec 21 07:36:09 rpi upsmon[709]: Using power down flag file /etc/killpower
Dec 21 07:36:09 rpi upsmon[712]: Startup successful
Dec 21 07:36:09 rpi systemd[1]: PID file /var/run/nut/upsmon.pid not readable (yet?) after start.
Dec 21 07:36:09 rpi systemd[1]: nut-monitor.service: Supervising process 713 which is not our child. We'll most likely not notice when it exits.
Dec 21 07:36:09 rpi upsmon[713]: Init SSL without certificate database
Dec 21 07:36:09 rpi systemd[1]: Started Network UPS Tools - power device monitor and shutdown controller.
Dec 21 07:36:09 rpi owhttpd[666]: Starting 1-Wire HTTP Daemon: owhttpd.
Dec 21 07:36:09 rpi owftpd[665]: Starting 1-Wire FTP server: owftpd.
Dec 21 07:36:09 rpi systemd[1]: Started LSB: 1-wire HTTP server.
Dec 21 07:36:09 rpi systemd[1]: Started LSB: 1-wire FTP server.
Dec 21 07:36:09 rpi upsmon[713]: UPS [[email protected]]: connect failed: Connection failure: Connection refused
Dec 21 07:36:09 rpi upsmon[713]: Communications with UPS [email protected] lost
Anyone any ideas or seeing similar issues?
Last edited by fruit-uk on Mon Dec 21, 2015 10:50 am, edited 1 time in total.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: jessie and nut-server

Mon Dec 21, 2015 8:42 am

fruit-uk wrote:Anyone any ideas or seeing similar issues?
I still don't have any pi running Jessie but your problem, I suspect, involves systemd somehow. Ubuntu for the x86 at least had a way to boot up using Upstart and I have a system that works only if I do that. But if everything works if you start it yourself after booting, the systemd problem should involve the way you used to start things not being the current way to do that.

fruit-uk
Posts: 609
Joined: Wed Aug 06, 2014 4:19 pm
Location: Suffolk, UK

Re: jessie and nut-server

Mon Dec 21, 2015 9:08 am

My feeling too.

It seems to me to be starting too early. There is a post somewhere describing systemd mods for fedora but raspbian does not have most of the files mentioned

I can't find anything useful looking for mainstream debian jessie although I would expect startup scripts/systemd to be the same

I have a feeling I am going to have to start it from a cron @reboot until someone comes up with a fix

User avatar
DougieLawson
Posts: 35378
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: jessie and nut-server

Mon Dec 21, 2015 10:18 am

What do you have in /etc/network/interfaces & /etc/dhcpcd.conf?
Can you post the output from these commands, since it looks like a networking problem?
ifconfig -a
ip route
ping -c3 $(ip route | awk '/default/ {print $3}')
ping -c3 8.8.8.8
ping google.com


BTW, what is nut and where does it come from?
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

fruit-uk
Posts: 609
Joined: Wed Aug 06, 2014 4:19 pm
Location: Suffolk, UK

Re: jessie and nut-server

Mon Dec 21, 2015 10:49 am

Thanks Dougie - problem solved.

This was a very rushed switch over at the weekend due to boot failure[1] and I had forgotten completely about /etc/dhcpcd.conf

The Pi2 was partly configured some time back with new IP and hostname commented out in varous places until actual changeover - I did the other bits :)

Uncommenting static address in /etc/dhcpcd.conf has it all working nicely again
Guess it was sitting there waiting for dhcp

[1]My fault entirely. My early Pis were all set up with a /boot on HDD and I transferred any updates manually to SD - fine - except I missed a recent one :(

oseias
Posts: 1
Joined: Fri May 10, 2019 1:27 pm

Re: [Solved] jessie and nut-server

Fri May 10, 2019 1:37 pm

Hello,

I'm still stuck since I've changed upsd.conf file, adding LISTEN "my class C IP" to that. I also have already tried to use fixed IP, as commented before, but with no success.

When I start service, manually, it works perfectly.

Do you guys have any idea?

Thanks!

Return to “Raspbian”