Announcement

Collapse
No announcement yet.

apcupsd does not start

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    apcupsd does not start

    Installed apcupsd 3.14.6 from universe/admin for a usb UPS.
    APCUPS User Manual says:
    To make sure that your USB subsystem can see the UPS, just do this from a shell prompt:
    cat /proc/bus/usb/devices

    No such file in response . Trying to proceed with starting apcupsd was unsuccessful. What is wrong with it?

    #2
    Re: apcupsd does not start

    If you don't have that file you've got nothing attached no usb interface. Even your usb ports are listed in that file. What does lsusb and lsmod |grep usb report?

    Please Read Me

    Comment


      #3
      Re: apcupsd does not start

      Originally posted by oshunluvr
      If you don't have that file you've got nothing attached no usb interface. Even your usb ports are listed in that file. What does lsusb and lsmod |grep usb report?
      Thanks very much for your response!
      Here are the reports:
      $ lsusb
      Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
      Bus 001 Device 003: ID 09da:002b A4 Tech Co., Ltd
      Bus 001 Device 002: ID 03eb:0902 Atmel Corp. 4-Port Hub
      Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      $ lsmod | grep usb
      usbhid 36110 1
      hid 67032 1 usbhid

      Comment


        #4
        Re: apcupsd does not start

        Well, all that looks normal. Sorry about the other comment regarding /proc/bus/usb/devices : we don't have that file. My APC is hooked to my server that runs a different distro.

        I have attached my apcupsd.conf file (all remarks removed). Check your settings against mine.

        You say starting apcupsd is unsuccessful but you don't say what error(s) your getting? Try starting it in a terminal and report the exact error messages. Then run "dmesg" and see if anything refers to your APC.

        Please Read Me

        Comment


          #5
          Re: apcupsd does not start

          As a base for my apcupsd.conf file I took usb.conf (and renamed it of course) from the examples/ directory of the apcupsd package documentation.
          APCUPS User Manual says: "If you have a USB device, it is better not to specify a DEVICE directive by leaving it black or commenting it out."
          So did I (and changed also NOLOGON directive which does not affect the problem) and the essential elements of my apcupsd.conf file are the following:

          UPSCABLE usb
          UPSTYPE usb
          DEVICE
          LOCKFILE /var/lock
          UPSCLASS standalone
          UPSMODE disable

          in accordance with the Manual. By the way these preparations worked on my system under a previous Red Hat clone distro.
          Then I set ISCONFIGURED=yes in /etc/default/apcupsd and rebooted the system.

          syslog says:
          kernel [ 3.871236] generic-usb 0003:051D:0002.0002: hiddev96,hidraw1: USB HID v1.10 Device [American Power Conversion Back-UPS RS 500 FW:30.j4.I USB FW:j4] on usb-0000:00:07.2-2.4/input0
          apcupsd[799] Terminating due to configuration file errors.
          apcupsd[799] Lock file read error. ERR=Is a directory
          apcupsd[799] apcupsd error shutdown completed

          dmesg says:
          [ 3.871236] generic-usb 0003:051D:0002.0002: hiddev96,hidraw1: USB HID v1.10 Device [American Power Conversion Back-UPS RS 500 FW:30.j4.I USB FW:j4] on usb-0000:00:07.2-2.4/input0

          Comment


            #6
            Re: apcupsd does not start

            Have you tried setting the lock to a different directory?? Seems that's the error you're getting.

            Please Read Me

            Comment


              #7
              Re: apcupsd does not start

              Originally posted by oshunluvr
              Have you tried setting the lock to a different directory?? Seems that's the error you're getting.
              No, I have not.
              That is quite easy to try: which directory do you advise to use?

              _But_:
              1) Directory /var/lock do exist on the system and is used by other applications successfully.
              2) APCUPSD User Manual says:
              To make sure that your USB subsystem can see the UPS, just do this from a shell prompt:
              cat /proc/bus/usb/devices

              This information is updated by the kernel whenever a device is plugged in or unplugged, irrespective of whether apcupsd is running or not. It contains details on all the USB devices in your system including hubs (internal and external), input devices, and UPSes.
              You should get some output back that includes something like this, featuring a BackUPS RS 1000:
              T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
              D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
              P: Vendor=051d ProdID=0002 Rev= 1.06
              S: Manufacturer=American Power Conversion
              S: Product=Back-UPS RS 1000 FW:7.g3 .D USB FW:g3
              S: SerialNumber=JB0308036505
              C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 24mA
              I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=hid
              --------------------------------------------------------------------------------
              NB "irrespective of whether apcupsd is running or not"

              As I wrote before this 1st test has failed.
              apcupsd cannot _reach_ the UPS through its usb-cable, not lock file, afaik. On the previous Red Hat clone system the lock file was situated on the same place w/o any problems.

              Well, /proc/bus/usb/devices does not exist; but /proc/bus/input/devices and /proc/bus/pci/devices are on their places. That drives my mind to the file system layout but I cannot resolve this problem due to lack of knowledge.

              Comment


                #8
                Re: apcupsd does not start

                The /proc/bus/usb/devices file is a redhat type system file. In debian based (like Kubuntu) it's /dev/bus/usb/001 - the "001" being the bus number your ups is connected to according to your lsusb. I doubt that's the issue, but it's worth noting.

                I'm sort of hamstrung by the fact that mine is connected to a redhat server, not my kubuntu desktop.

                Anyway: maybe pick a lock file location in your home just to see if it works?

                Please Read Me

                Comment


                  #9
                  Re: apcupsd does not start

                  I have just changed LOCKFILE value in /etc/apcupsd/apcupsd.conf to my home directory and rebooted the system -- the same result; syslog:
                  apcupsd[799] Terminating due to configuration file errors.
                  apcupsd[799] Lock file read error. ERR=Is a directory
                  apcupsd[799] apcupsd error shutdown completed

                  Comment


                    #10
                    Re: apcupsd does not start

                    I can't find anything about this error.

                    My lock file is called /var/lock/LCK.. and contains 0000004255.

                    Maybe creating the file manually?

                    Please Read Me

                    Comment


                      #11
                      Re: apcupsd does not start

                      Originally posted by oshunluvr
                      I can't find anything about this error.

                      My lock file is called /var/lock/LCK.. and contains 0000004255.

                      Maybe creating the file manually?
                      Following your advice I have created the file in my home directory which contents is a copy of yours:
                      ~/LCK..: ASCII text, with no line terminators
                      ~$ cat LCK..
                      0000004255

                      The same result:
                      apcupsd[803] Terminating due to configuration file errors.
                      apcupsd[803] Lock file read error. ERR=Is a directory
                      apcupsd[803] apcupsd error shutdown completed

                      Comment


                        #12
                        Re: apcupsd does not start

                        Is anyone use apcupsd under this OS without problem?

                        Comment


                          #13
                          Re: apcupsd does not start

                          Hey Aleck,
                          Try this, it worked for me:

                          Step 1: In the console:
                          sudo cupsd
                          Step 2: Then in your browser go to
                          The user ID and Password are the same you have for the system

                          Step 3: On the Administration tab, click on add printer and follow the usual steps.
                          Does it follow that I reject all authority? Perish the thought! In the matter of boots, I defer to the authority of the bootmaker. <br /> -Mikhail Bakunin-, &quot;God and the State&quot;

                          Comment


                            #14
                            Re: apcupsd does not start

                            Originally posted by sabbathpriest
                            Hey Aleck,
                            Try this, it worked for me:

                            Step 1: In the console:
                            sudo cupsd
                            Step 2: Then in your browser go to
                            The user ID and Password are the same you have for the system

                            Step 3: On the Administration tab, click on add printer and follow the usual steps.
                            I do not understand what relation has cupsd to apcupsd? The latter is software for APC UPSes.

                            Comment


                              #15
                              Re: apcupsd does not start

                              You are right, sorry.
                              Does it follow that I reject all authority? Perish the thought! In the matter of boots, I defer to the authority of the bootmaker. <br /> -Mikhail Bakunin-, &quot;God and the State&quot;

                              Comment

                              Working...
                              X