Menu

NIS Network Error

Help
Dave
2007-07-17
2013-04-17
  • Dave

    Dave - 2007-07-17

    OS:  Ubuntu Linux AMD64
    UPS:  APC w/USB cable connect

    After installing I did the following:

    $ cat /proc/bus/usb/devices

    T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=03 Dev#=  9 Spd=1.5 MxCh= 0
    D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
    P:  Vendor=09ae ProdID=0001 Rev= 0.01
    S:  Manufacturer=TRIPP LITE
    S:  Product=TRIPP LITE OMNIVS1000
    C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 60mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=00 Driver=usbhid
    E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

    Then I did:

    $ ls -l /sys/bus/usb/drivers/

    total 0
    drwxr-xr-x 2 root root 0 2007-07-17 13:22 hiddev
    drwxr-xr-x 2 root root 0 2007-07-17 13:22 hub
    drwxr-xr-x 2 root root 0 2007-07-17 13:22 libusual
    drwxr-xr-x 2 root root 0 2007-07-17 13:22 snd-usb-audio
    drwxr-xr-x 2 root root 0 2007-07-17 13:22 usb
    drwxr-xr-x 2 root root 0 2007-07-17 13:22 usbfs
    drwxr-xr-x 2 root root 0 2007-07-17 13:22 usbhid
    drwxr-xr-x 2 root root 0 2007-07-17 13:22 usblp
    drwxr-xr-x 2 root root 0 2007-07-17 13:22 usb-storage
    drwxr-xr-x 2 root root 0 2007-07-17 13:22 xpad

    The GUI shows no data and this message:

    unknown@127.0.0.0 is NISERR NIS network error

    I do not know what addresss to place in the Preferences of gapcmon.

    Request help.

    Thank you in advance.

     
    • James Scott Jr.

      James Scott Jr. - 2007-07-18

      Dave,

      Q1: Is GAPCMON and APCUPSD on the same machine? if not, use the ip address of the machine APCUPSD is running on.  If yes, use 'localhost' as the ip address.

      Background:
      1. apcupsd contains an internal service (NIS) that communicates ups status and events.  It makes this available on port 3551, when it has been compiled with NIS enabled.  'NIS enabled' is the default compile option, so you should not normally need to recompile apcupsd.

      2. gapcmon connects to port 3551 on the machine apcupsd is running on to collect the status and events to preform its function.  gapcmon can do this from any linux machine on the network capable of reaching the apcupsd host.

      James,

       
    • Dave

      Dave - 2007-07-18

      I still get the same message.  I made a screen capture and posted it to alt.binaries.test with the title "/home/dave/gapcmon_capture.jpg"  Hope that helps.  I am trying to figure it out here but no luck.  This is a simple one workstation one ups arrangement.  Thank you for your reply!  Dave

       
      • James Scott Jr.

        James Scott Jr. - 2007-07-18

        I am going to assume two things.
        1. You started apcupsd's daemon or service.
        2. You have apcupsd running normally, and are trying to get gapcmon configured to work with it!

        I can help with both, but I want to clarify what I'm helping with.

        You messages said they were on the same host: To answer the question of what to configure in gapcmon.  Use the address of "localhost" or "127.0.0.1".

        I cannot see your screenshot, try sending it directly to me at "skoona@users.sourceforge.net"

        James,

         
    • James Scott Jr.

      James Scott Jr. - 2007-07-24

      Dave,

      Before you can expect gapcmon to work correctly you must be able to sucessfully execute the following command.

      $ /usr/sbin/apcaccess

      its output should be something like this:

      APC      : 001,035,0888
      DATE     : Tue Jul 24 14:59:51 EDT 2007
      HOSTNAME : homedev.skoona.net
      RELEASE  : 3.12.4
      VERSION  : 3.12.4 (19 August 2006) redhat
      UPSNAME  : development_servers
      CABLE    : USB Cable
      MODEL    : Back-UPS RS 1000
      UPSMODE  : Stand Alone
      STARTTIME: Mon Jul 23 10:44:16 EDT 2007
      STATUS   : ONLINE
      LINEV    : 123.0 Volts
      LOADPCT  :  75.0 Percent Load Capacity
      BCHARGE  : 100.0 Percent
      TIMELEFT :   7.5 Minutes
      MBATTCHG : 10 Percent
      MINTIMEL : 3 Minutes
      MAXTIME  : 0 Seconds
      LOTRANS  : 100.0 Volts
      HITRANS  : 133.0 Volts
      ALARMDEL : 30 seconds
      BATTV    : 27.3 Volts
      LASTXFER : Low line voltage
      NUMXFERS : 0
      TONBATT  : 0 seconds
      CUMONBATT: 0 seconds
      XOFFBATT : N/A
      SELFTEST : NO
      STATFLAG : 0x07000008 Status Flag
      MANDATE  : 2004-12-07
      SERIALNO : JB0450009537 
      BATTDATE : 2001-09-25
      NOMBATTV :  24.0
      FIRMWARE : .g8 .D USB FW:g8
      APCMODEL : Back-UPS RS 1000
      END APC  : Tue Jul 24 14:59:54 EDT 2007

      The ACPACCESS command is shipped with APCUPSD.  It is its private api to verify that the NIS interface is enabled and operating.  GAPCMON using the NIS interface to extract data and perform its function.

      I had not heard back from you, so I thought I would leave you with this method to verify both apcupsd and gapcmon.

      James,

       
    • zkab

      zkab - 2008-09-05

      I have one Ubuntu desktop and one Ubuntu server (both 8.04 and networked) and they are connected to its own USB APC UPS.
      Apcupsd are installed and configured on both computers, apcaccess gives me correct information about their UPS.
      On the desktop computer GapcMon is installed and it gives me correct information about localhost but when I add a new monitor and give the ip-address for my server (pref tab in GapcMon) an error message is diplayed in status window:

      NISERR   unknown@ip-address
                    NIS network connection not responding!

      What is wrong - I had the impression (after reading the docs) that I could get UPS-information with GapcMon from any LAN-computer that run Apcupsd.

       
      • James Scott Jr.

        James Scott Jr. - 2008-09-06

        I need a little more information from to diagnose your problem.  But first let me give you a few tips or things to check.
        1. gapcmon does work on linux machines with and without apcupad locally installed.  It is also designed to monitor and unlimited number of machines with apcupsd installed; using apcupsd's NIS interface on port 3551.
        2. Use apcaccess to verify the networked server has NIS enabled and working properly.
           A. apcaccess status host-name-or-number:3551
           B. if you get output, thing are ok and gapcmon should be configured (prefs tab) using that addres/name:port
           C. if they don't see the attached info (** B **), to configure apcupsd with NIS support.

        send me this info, if your still have problems.
        1. dpkg -l | grep -e apcupsd -e gapcmon
        2. I'm looking for the versions of apcupsd and gapcmon!?

        Thanks,
        James,

        (** A **)
        syntax: ApcAccess

        apcaccess [command ][host|:port]
        - command defaults to 'status'
        - host defaults to 'localhost'
        - :port defaults to 3551

        Example: /sbin/apcaccess status 192.168.1.16:3551

        (** B **)
        To enable the apcupsd Network Information Server, which is normally the default, you set:

             NETSERVER on
             NISPORT 3551

        in your apcupsd.conf file.

         
    • zkab

      zkab - 2008-09-06

      Thanks for you answer.
      Here is what I have.

      1. Desktop computer (hostname=zkab)

      *** now I do a login to desktop computer ***
       
         - apcupsd installed (3.14.2-1build1, installed with Synaptic)
         - gapcmon installed (0.8.6-1, installed with Synaptic)
         - apcaccess status localhost:3551 gives me OK output (pls check below)
         - apcaccess status zkab:3551 (which is desktop hostname) gives me:

           FATAL ERROR in apcaccess.c at line 41
           tcp_open: cannot connect to server zkab on port 3551.
           ERR=Connection refused

         - apcaccess status arkiv-x:3551 (which is server hostname) gives the
           same error as above

      2. Server computer (hostname=arkiv-x)

      *** now I do a login to server computer ***
        
         - apcupsd installed (3.14.2-1build1, installed with Synaptic)
         - gapcmon NOT installed
         - apcaccess status localhost:3551 gives me OK output (pls check below)
         - apcaccess status arkiv-x:3551 (which is server hostname) gives me:

           FATAL ERROR in apcaccess.c at line 41
           tcp_open: cannot connect to server arkix-x on port 3551.
           ERR=Connection refused

      3.  NETSERVER on
           NISPORT 3551

          are in both desktop & server  /etc/apcupsd/apcupsd.conf

      4.  dpkg -l | grep -e apcupsd -e gapcmon (desktop):

          ii  apcupsd     3.14.2-1build1     APC UPS Power Management (daemon)
          ii  gapcmon     0.8.6-1               apcupsd monitor GUI

          dpkg -l | grep -e apcupsd -e gapcmon (server):

          ii  apcupsd     3.14.2-1build1     APC UPS Power Management (daemon)
          rc  gapcmon     0.8.6-1              apcupsd monitor GUI

      5.  Desktop computer:
      --------------------------------------------------------------------
      APC      : 001,038,1005
      DATE     : Sat Sep 06 10:38:30 CEST 2008
      HOSTNAME : zkab
      RELEASE  : 3.14.2
      VERSION  : 3.14.2 (15 September 2007) debian
      UPSNAME  : ES700
      CABLE    : USB Cable
      MODEL    : Back-UPS ES 700
      UPSMODE  : Stand Alone
      STARTTIME: Tue Sep 02 16:34:46 CEST 2008
      STATUS   : ONLINE
      LINEV    : 230.0 Volts
      LOADPCT  :  38.0 Percent Load Capacity
      BCHARGE  : 100.0 Percent
      TIMELEFT :  16.0 Minutes
      MBATTCHG : 5 Percent
      MINTIMEL : 3 Minutes
      MAXTIME  : 0 Seconds
      SENSE    : Medium
      LOTRANS  : 180.0 Volts
      HITRANS  : 266.0 Volts
      ALARMDEL : Always
      BATTV    : 13.6 Volts
      LASTXFER : Automatic or explicit self test
      NUMXFERS : 1
      XONBATT  : Thu Sep 04 11:52:07 CEST 2008
      TONBATT  : 0 seconds
      CUMONBATT: 10 seconds
      XOFFBATT : Thu Sep 04 11:52:17 CEST 2008
      LASTSTEST: Thu Sep 04 11:52:07 CEST 2008
      STATFLAG : 0x07000008 Status Flag
      MANDATE  : 2006-10-11
      SERIALNO : 5B0642U06588 
      BATTDATE : 2000-00-00
      NOMINV   : 230
      NOMBATTV :  12.0
      FIRMWARE : 829.D2.I USB FW:D2
      APCMODEL : Back-UPS ES 700
      END APC  : Sat Sep 06 10:38:55 CEST 2008

      6.  Server computer:
      --------------------------------------------------------------------
      APC      : 001,052,1241
      DATE     : Sat Sep 06 10:40:25 CEST 2008
      HOSTNAME : arkiv-x
      RELEASE  : 3.14.2
      VERSION  : 3.14.2 (15 September 2007) debian
      UPSNAME  : SUPS1400
      CABLE    : APC Cable 940-0024C
      MODEL    : SMART-UPS 1400
      UPSMODE  : Stand Alone
      STARTTIME: Sun Aug 31 00:43:00 CEST 2008
      STATUS   : ONLINE
      LINEV    : 228.8 Volts
      LOADPCT  :  19.2 Percent Load Capacity
      BCHARGE  : 100.0 Percent
      TIMELEFT :  65.0 Minutes
      MBATTCHG : 5 Percent
      MINTIMEL : 3 Minutes
      MAXTIME  : 0 Seconds
      MAXLINEV : 231.4 Volts
      MINLINEV : 226.2 Volts
      OUTPUTV  : 228.8 Volts
      SENSE    : High
      DWAKE    : 000 Seconds
      DSHUTD   : 180 Seconds
      DLOWBATT : 02 Minutes
      LOTRANS  : 196.0 Volts
      HITRANS  : 253.0 Volts
      RETPCT   : 000.0 Percent
      ITEMP    : 33.3 C Internal
      ALARMDEL : Low Battery
      BATTV    : 27.5 Volts
      LINEFREQ : 50.0 Hz
      LASTXFER : Automatic or explicit self test
      NUMXFERS : 0
      TONBATT  : 0 seconds
      CUMONBATT: 0 seconds
      XOFFBATT : N/A
      SELFTEST : NO
      STESTI   : 336
      STATFLAG : 0x07000008 Status Flag
      DIPSW    : 0x00 Dip Switch
      REG1     : 0x00 Register 1
      REG2     : 0x00 Register 2
      REG3     : 0x00 Register 3
      MANDATE  : 10/18/00
      SERIALNO : GS0043004914
      BATTDATE : 05/29/04
      NOMOUTV  : 230
      NOMBATTV :  24.0
      EXTBATTS : 0
      FIRMWARE : 70.11.I
      APCMODEL : KWI
      END APC  : Sat Sep 06 10:40:51 CEST 2008

      --------------------------------------------------------------------

      Hope this information can help you to solve my problem ...

      /raivo

       
      • James Scott Jr.

        James Scott Jr. - 2008-09-06

        zkab,

        Thanks for the response.  It appears that apcaccess only works to the localhost; from both the server and the desktop.  Something is blocking their communications to port 3551.  UNLESS the apcupsd.conf param is set " NISIP 0.0.0.0 ".  Check this setting and restart apcupsd if needed.

        James,

         
    • zkab

      zkab - 2008-09-07

      That solved the problem - in the apcupsd.conf (both desktop & server) it was NISIP 127.0.0.1 and after changing to NISIP 0.0.0.0 and restarting apcupsd it worked like a charm ...

      In our network there are also a bunch of Windows computers and they all run APC Powerchute ... I understand  there is a way to monitor them form my Linux desktop ... I have studied the documentation but can't figure out howto proceed ...

      Thanks again for your support.

       
    • James Scott Jr.

      James Scott Jr. - 2008-09-08

      The APCUPSD project is also a sourceforge project.  Try posting a message on thier main list to get input on Monitoring Windows Machines.

      I can tell you there is a windows version of APCUPSD and that the linux version of GAPCMON will monitor windows platforms that are using apcupsd. I.E. As long as gapcmon can get to the NIS interface, it will monitor it.

      James,

       
    • zkab

      zkab - 2008-09-08

      I replaced Powerchute with windows version of APCUPSD (3.14.4) ... and it works great ... after opening Port 3551 in Windows Firewall

       

Log in to post a comment.