Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Error contacting apcupsd @ localhost:3551: Connection refused

  1. #11
    Join Date
    Jun 2006
    Location
    USA
    Beans
    151
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Error contacting apcupsd @ localhost:3551: Connection refused

    Quote Originally Posted by Monotoba View Post
    FYI for those who have issues getting apcupsd to work on Ubuntu 11.

    I just built a new machine with an P9X79 Deluxe motherboard and Ubuntu 11.10 OS. I beat my head against a wall for hours trying to get my APC XS 1500 ups to work with this machine. I got very similar errors to the above. When I read that the issues was the USB port, I reach around the machine and moved the ups' usb cable to another port. When I looked back up at the monitor I saw a message in the terminal window telling me communications had been restored with the ups. I then tried moving the cable around a few times to the other usb ports on the mb. I found that while my mouse and keyboard worked just fine in any usb port on the mb, the APC XS 1500 only worked with some of the usb ports and not others.

    I hope this helps others who may be experiencing the same issues. And thanks to those who diagnosed the issue above which lead me in the right direction.
    I'm having the same problem. apcupsd is running. I tried switching usb ports, I get a system notification that connection to my XS 1500 has been restored. But I'm still getting the access denied message when attempting to run sudo apcaccess. This has worked in the past. Hate to think that my usb controllers are starting to go.
    M2N-SLI with AMD Phenom II X4 940 8GB of 400Mhz 128bit DDR2 RAM, an Evga GTX560ti Video card Phoenix Bios Rev. 5001

    Kubuntu 12.10 (do-release-upgrade)

  2. #12
    Join Date
    Jun 2006
    Location
    USA
    Beans
    151
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Error contacting apcupsd @ localhost:3551: Connection refused

    So after several weeks I figured out why it wasn't working. In my apcupsd.conf file nisip server was assigned the localhost address of 127.0.1.1. I changed that to 127.0.0.1 which in my hosts file is assigned to localhost. Perform a restart and wahla. apcaccess works. That was simple oversite. Below is a pasting of my hosts file. I've been interested in why there would be two values for localhost. Would a piece of software do this?


    Code:
    ~$ cat /etc/hosts
    127.0.0.1       localhost localhost.localdomain tz-desktop <-- I just added this.
    127.0.1.1       my-desktop
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    $

    Later
    Last edited by skaramanger; July 25th, 2012 at 01:29 AM. Reason: I don't own the thread duh. remove marked solved statements
    M2N-SLI with AMD Phenom II X4 940 8GB of 400Mhz 128bit DDR2 RAM, an Evga GTX560ti Video card Phoenix Bios Rev. 5001

    Kubuntu 12.10 (do-release-upgrade)

  3. #13
    Join Date
    Apr 2006
    Location
    Sweden
    Beans
    420

    Re: Error contacting apcupsd @ localhost:3551: Connection refused

    wrong wrong wrong!

    There is likely nothing wrong with anyones USB controller card. It's because of the new localhost IP address that's appeared in 12.10 (I just noticed it but maybe it came in previous versions), plus the default settings in apcupsd.conf need changing.

    I have a USB device, which means the the DEVICE parameter _must_ be commented out, so that autodetection os the usb device works, otherwise, it's trying to tie the ups to a specific device that's not going to work.

    Secondly, due to the new 127.0.1.1 address in /etc/hosts, the NISIP setting needs changing. It doesn't work to change it to 127.0.0.1 without changing hosts file, but you can set it to 0.0.0.0, then apcaccess will work again. Otherwise, you can turn off NETSERVER access completely if you don't need to access your UPS over the network (which I doubt most home owners do).

    So:

    Code:
    sudo vi /etc/apcupsd/apcupsd.conf
    UPSCABLE usb
    UPSTYPE usb
    NISIP 0.0.0.0
    
    sudo service apcupsd restart
    cat /var/log/apcupsd.events
    
    2012-12-20 13:14:39 +0100  apcupsd exiting, signal 15
    2012-12-20 13:14:39 +0100  apcupsd shutdown succeeded
    2012-12-20 13:14:51 +0100  apcupsd 3.14.10 (13 September 2011) debian startup succeeded
    
    
    sudo apcaccess status
    Working.

  4. #14
    Join Date
    Apr 2013
    Beans
    1

    Re: Error contacting apcupsd @ localhost:3551: Connection refused

    Just wanted to thank you all for identifying the localhost issue. I feel like I should've caught it, but just spent an hour messing around with no success before finding this post.

  5. #15
    Join Date
    Sep 2013
    Beans
    1

    Re: Error contacting apcupsd @ localhost:3551: Connection refused

    I am having the same problem but I think the reasoning is different.

    I configured my APC PRO 1000 quite easily using the Ubuntu UPS guide. My problem is that apcupsd won't start during the normal boot sequence... but I can start the service once I have logged in. I think there must be some run level dependency that is not being met. I tried to mess with the Upstart settings by changing when the apcupsd started to run level 3 or 5, but I wasn't able to get it working.

    Here's what after I login:
    Code:
    foo@bar ~ $ sudo service apcupsd status
    Error contacting apcupsd @ localhost:3551: Connection refused
    But I can successfully start the apcupsd after I login:
    Code:
    foo@bar ~ $ sudo service apcupsd start
    Starting UPS power management: apcupsd.
    foo@bar ~ $ sudo service apcupsd status
    APC      : 001,036,0900
    DATE     : 2013-12-20 18:59:10 -0800  
    HOSTNAME : bar
    VERSION  : 3.14.10 (13 September 2011) debian
    UPSNAME  : bar
    CABLE    : USB Cable
    DRIVER   : USB UPS Driver
    UPSMODE  : Stand Alone
    STARTTIME: 2013-12-20 18:59:09 -0800  
    MODEL    : Back-UPS RS1000G 
    STATUS   : ONLINE 
    LINEV    : 121.0 Volts
    LOADPCT  :  24.0 Percent Load Capacity
    BCHARGE  : 034.0 Percent
    TIMELEFT :  11.6 Minutes
    MBATTCHG : 15 Percent
    MINTIMEL : 8 Minutes
    MAXTIME  : 0 Seconds
    SENSE    : Medium
    LOTRANS  : 088.0 Volts
    HITRANS  : 147.0 Volts
    ALARMDEL : 30 seconds
    BATTV    : 25.3 Volts
    LASTXFER : No transfers since turnon
    NUMXFERS : 0
    TONBATT  : 0 seconds
    CUMONBATT: 0 seconds
    XOFFBATT : N/A
    SELFTEST : NO
    STATFLAG : 0x07000008 Status Flag
    SERIALNO : 3B1336X14704  
    BATTDATE : 2013-09-05
    NOMINV   : 120 Volts
    NOMBATTV :  24.0 Volts
    NOMPOWER : 600 Watts
    FIRMWARE : 868.L3 -P.D USB FW:
    END APC  : 2013-12-20 18:59:13 -0800
    Please let me know if you need any additional information. Would be nice to have apcupsd start automatically.

  6. #16
    Join Date
    Dec 2013
    Beans
    2

    Smile Re: Error contacting apcupsd @ localhost:3551: Connection refused

    Thanks for all your posts guys. I was having the same issue using a serial to serial cable to connect a CyberPower CPS1500AVR (Older UPS). I discovered a few things that I want to share. The unit is rather older and as such setting UPSCable: usb does not work, neither does setting DEVICE: ttyS0.
    So I looked to the manufacturer and on their website cyberpowersystems.com > Products > Software, they have their PowerPanel software for Linux. Different flavors. It works.
    I also bought a cyberpower 625va product that does use the usb cable and was still getting the errors. What must be done is to check in the config file like the users say above and ensure that you have the following items turned on and set to a non-zero value:
    STATTIME
    LOGSTATS
    DATATIME
    You will find them near the end of the file /etc/apcupsd/apcupsd.conf
    Then restart the service, then you will see a log written in
    /var/log/apcupsd.events and /var/log/apcups.status files.
    Thanks to those who contributed.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •