Nut UPS service won't start following v2.3.3 update



  • Just updated to v2.3.3 and the firewall is working but the nut ups service now won't start.  The configuration looks fine, I've reinstalled and restarted the service and removed and re-inserted the USB cable from the firewall to the UPS.  But I'm getting the console message "UPS APC is unavailable" and the system log contains the following error:

    Feb 21 02:13:25 firewall upsd[55102]: Can't connect to UPS [APC] (usbhid-ups-APC): No such file or directory

    I'm thinking this might indicate a file ownership/permissions issue now exists. Anyone else seen this?  My UPS is an APC Back-UPS CS 350 that was showing as online immediately before the update.


  • Banned

    Reboot.



  • I rebooted the firewall. No change. But a clarification: The service is starting but cannot connect to the driver.



  • Again, I believe this to be a permissions issue…note the "Can't open" lines below indicating the two configuration files cannot be opened due to permissions issues:

    
    2.3.3-RELEASE][admin@firewall.********.internal]/root: upsd -DDD
    Network UPS Tools upsd 2.7.4
       0.000000	fopen /var/db/nut/upsd.pid: No such file or directory
       0.001417	listen_add: added 127.0.0.1:3493
       0.001903	listen_add: added ::1:3493
       0.002097	setuptcp: try to bind to ::1 port 3493
       0.002408	listening on ::1 port 3493
       0.002645	setuptcp: try to bind to 127.0.0.1 port 3493
       0.002873	listening on 127.0.0.1 port 3493
       0.003994	Can't open /usr/local/etc/nut/ups.conf: Can't open /usr/local/etc/nut/ups.conf: Permission denied
    [2.3.3-RELEASE][admin@firewall.********.internal]/root: ls -l /usr/local/etc/nut/ups.conf
    -rw-r-----  1 root  wheel  34 Feb 22 12:46 /usr/local/etc/nut/ups.conf
    

    SO…what user is trying to open the configuration files and getting permission denied errors?



  • Also, once you temporarily change the permissions on /usr/local/etc/nut/ups.conf to 666 the error goes away and the next file open for /usr/local/etc/nut/upsd.users gives a permissions error that also goes away if you temporarily change the perms to 666. It then continues on to yield the error "Can't connect to UPS [APC] (usbhid-ups-APC): No such file or directory":

    Network UPS Tools upsd 2.7.4
       0.000000	fopen /var/db/nut/upsd.pid: No such file or directory
       0.001801	listen_add: added 127.0.0.1:3493
       0.002438	listen_add: added ::1:3493
       0.002600	setuptcp: try to bind to ::1 port 3493
       0.003025	listening on ::1 port 3493
       0.003256	setuptcp: try to bind to 127.0.0.1 port 3493
       0.003683	listening on 127.0.0.1 port 3493
       0.005443	Can't connect to UPS [APC] (usbhid-ups-APC): No such file or directory
       0.015973	/usr/local/etc/nut/upsd.users is world readable
       0.017002	user_add_action: adding 'set' for admin
       0.017381	user_add_instcmd: adding 'all' for admin
       0.017758	user_add_action: adding 'login' for monuser
       0.018074	user_add_action: adding 'master' for monuser
       0.018426	user_add_action: adding 'fsd' for monuser
       0.018966	mainloop: polling 2 filedescriptors
       2.090466	mainloop: no data available
    


  • @tweek:

    
    2.3.3-RELEASE][admin@firewall.********.internal]/root: upsd -DDD
    Network UPS Tools upsd 2.7.4
       0.000000	fopen /var/db/nut/upsd.pid: No such file or directory
       0.001417	listen_add: added 127.0.0.1:3493
       0.001903	listen_add: added ::1:3493
       0.002097	setuptcp: try to bind to ::1 port 3493
       0.002408	listening on ::1 port 3493
       0.002645	setuptcp: try to bind to 127.0.0.1 port 3493
       0.002873	listening on 127.0.0.1 port 3493
       0.003994	Can't open /usr/local/etc/nut/ups.conf: Can't open /usr/local/etc/nut/ups.conf: Permission denied
    [2.3.3-RELEASE][admin@firewall.********.internal]/root: ls -l /usr/local/etc/nut/ups.conf
    -rw-r-----  1 root  wheel  34 Feb 22 12:46 /usr/local/etc/nut/ups.conf
    

    This is not indicative of a permissions problem. You are trying to run it as admin rather than root. They are not the same thing. You would need to login as root and use /usr/local/etc/rc.d/nut.sh to test nut startup.

    Now, on to your problem. Let's start by ensuring that your UPS is connected and functioning on the USB bus. Please run

    usbconfig dump_device_desc

    and post the result.



  • Thanks for your assistance but I figured out the problem:

    1. This threw me off:

    [2.3.3-RELEASE][admin@firewall.*************.internal]/root: whoami
    root
    

    When I saw "root" I thought it meant "root"….  :)  I've reset the permissions to the defaults.

    2. The real issue is my UPS's firmware doesn't do plug and play properly, meaning I had to physically reset the UPS to get its USB connection to respond to the firewall.

    All is working now.  Thanks for your help.


Log in to reply