Re: [Nut-upsuser] NUT v2.6.4 with HP AF401A won't start
Hi Arnaud, and apologies for the delay in getting back to you. For a totally separate reason I’d intended to install NUT on a new VMware image so, in view of your comments and to avoid confusion at a later date with a hybrid installation, I decided to install on the new image from the tarball and set up the start/stop script manually. I unpacked the tarball, applied the patch you sent me and then ran the configure/make/make install sequence. The driver started OK as it did on the old image so I copied the /etc/init.d/ups script installed by the rpm package from the old image to the new one and edited the paths. I then ran chkconfig to set it up as a service. I haven’t fully tested that yet as I haven’t completed the config but I see no reason why it won’t work. Many thanks for your help with this. Regards, Chris. Chris Pratt Development Infrastructure Manager T: +44 118 929 4176 | M: +44 7979 854 307 | F: +44 118 929 4001 From: Arnaud Quette [mailto:aquette@gmail.com] Sent: 01 November 2012 11:50 To: Pratt Chris Cc: nut-upsuser@lists.alioth.debian.org Subject: Re: [Nut-upsuser] NUT v2.6.4 with HP AF401A won't start 2012/10/31 Pratt Chris chris.pr...@comptel.commailto:chris.pr...@comptel.com Hi Arnaud. Hi Chris, I think you’ve cracked it. The following terminal output shows the package and also shows that when I start it from /usr/local/ups/bin it doesn’t crash. nice, I've committed the patch to the trunk (NUT development version), r3769: http://trac.networkupstools.org/projects/nut/changeset/3769 [root@ups-monitor bin]# rpm -q nut nut-2.6.4-1.el6.x86_64 [root@ups-monitor bin]# which upsdrvctl /sbin/upsdrvctl [root@ups-monitor bin]# pwd /usr/local/ups/bin [root@ups-monitor bin]# ./upsdrvctl start Network UPS Tools - UPS driver controller 2.6.5 Network UPS Tools - Generic SNMP UPS driver 0.68 (2.6.5) Detected HP R12000/3UPS on host 192.168.0.89 (mib: cpqpower 1.5) [UPS-HP01] snmp_ups_walk: data stale for ups.L1.realpower [UPS-HP01] snmp_ups_walk: data stale for ups.L2.realpower [UPS-HP01] snmp_ups_walk: data stale for ups.L3.realpower [root@ups-monitor bin]# I’ve uninstalled the package and re-run make install just to be sure and it starts up fine with upsdrvctl start, with the following message in /var/log/messages. Oct 30 09:20:25 ups-monitor snmp-ups[32252]: Startup successful Now it’s on to finishing the configuration and setting up the clients. beware of 1 thing: the main difference with a source install, as you did lastly, and a native package (RPM) is the system/shutdown integration. the init.d / systemd script will look for binaries (upsd, drivers, ...), in the known path, not /usr/local/ups/{bin,sbin}... so you may want to keep your original rpm and overwrite snmp-ups with the new one. thus, uninstall first the current install and reconfigure using the following: ./configure --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-all --with-nss --with-libltdl --without-hal --with-cgi --datadir=/usr/share/nut --with-user=nut --with-group=dialout --with-statepath=/var/run/nut --with-pidpath=/var/run/nut --with-altpidpath=/var/run/nut --sysconfdir=/etc/ups --with-cgipath=/var/www/nut-cgi-bin --with-drvpath=/sbin --with-systemdsystemunitdir=/usr/lib/systemd/system --disable-static --with-udev-dir=/lib/udev the above is a trimmed version of the one provided by Michal Hlavinka. but you may want or need to trim it a bit more... cheers, Arnaud -- Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org Debian Developer - http://www.debian.org Free Software Developer - http://arnaud.quette.fr Disclaimer: This message and any attachments thereto are intended solely for the addressed recipient(s) and may contain confidential information. If you are not the intended recipient, please notify the sender by reply e-mail and delete the e-mail (including any attachments thereto) without producing, distributing or retaining any copies thereof. Any review, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. Thank you. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] NUT v2.6.4 with HP AF401A won't start
Hi Arnaud. I think you’ve cracked it. The following terminal output shows the package and also shows that when I start it from /usr/local/ups/bin it doesn’t crash. [root@ups-monitor bin]# rpm -q nut nut-2.6.4-1.el6.x86_64 [root@ups-monitor bin]# which upsdrvctl /sbin/upsdrvctl [root@ups-monitor bin]# pwd /usr/local/ups/bin [root@ups-monitor bin]# ./upsdrvctl start Network UPS Tools - UPS driver controller 2.6.5 Network UPS Tools - Generic SNMP UPS driver 0.68 (2.6.5) Detected HP R12000/3UPS on host 192.168.0.89 (mib: cpqpower 1.5) [UPS-HP01] snmp_ups_walk: data stale for ups.L1.realpower [UPS-HP01] snmp_ups_walk: data stale for ups.L2.realpower [UPS-HP01] snmp_ups_walk: data stale for ups.L3.realpower [root@ups-monitor bin]# I’ve uninstalled the package and re-run make install just to be sure and it starts up fine with upsdrvctl start, with the following message in /var/log/messages. Oct 30 09:20:25 ups-monitor snmp-ups[32252]: Startup successful Now it’s on to finishing the configuration and setting up the clients. Many thanks for your help. Regards, Chris. Chris Pratt Development Infrastructure Manager T: +44 118 929 4176 | M: +44 7979 854 307 | F: +44 118 929 4001 Disclaimer: This message and any attachments thereto are intended solely for the addressed recipient(s) and may contain confidential information. If you are not the intended recipient, please notify the sender by reply e-mail and delete the e-mail (including any attachments thereto) without producing, distributing or retaining any copies thereof. Any review, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. Thank you. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] NUT v2.6.4 with HP AF401A won't start
Hi Arnaud. I think you’ve cracked it. The following terminal output shows the package and also shows that when I start it from /usr/local/ups/bin it doesn’t crash. [root@ups-monitor bin]# rpm -q nut nut-2.6.4-1.el6.x86_64 [root@ups-monitor bin]# which upsdrvctl /sbin/upsdrvctl [root@ups-monitor bin]# pwd /usr/local/ups/bin [root@ups-monitor bin]# ls apcsmart clone liebert-esp2 powerpanel upscode2 apcsmart-old clone-outlet masterguard rhinoupsdrvctl bcmxcpdummy-ups metasys safenet upslog belkinetapromge-shut skel upsrw belkinunv everups mge-utalk snmp-ups upssched-cmd bestfcom gamatronicmicrodowell solisvictronups bestfortress genericupsoldmge-shut tripplite bestuferrups isbmexoneac tripplitesu bestups ivtscdoptiups upsc blazer_serliebert powercom upscmd [root@ups-monitor bin]# ./upsdrvctl start Network UPS Tools - UPS driver controller 2.6.5 Network UPS Tools - Generic SNMP UPS driver 0.68 (2.6.5) Detected HP R12000/3UPS on host 192.168.0.89 (mib: cpqpower 1.5) [UPS-HP01] snmp_ups_walk: data stale for ups.L1.realpower [UPS-HP01] snmp_ups_walk: data stale for ups.L2.realpower [UPS-HP01] snmp_ups_walk: data stale for ups.L3.realpower [root@ups-monitor bin]# I’ve uninstalled the package and re-run make install just to be sure and it starts up fine with upsdrvctl start, with the following message in /var/log/messages. Oct 30 09:20:25 ups-monitor snmp-ups[32252]: Startup successful Now it’s on to finishing the configuration and setting up the clients. Many thanks for your help. Regards, Chris. Chris Pratt Development Infrastructure Manager T: +44 118 929 4176 | M: +44 7979 854 307 | F: +44 118 929 4001 From: Arnaud Quette [mailto:aquette@gmail.com] Sent: 29 October 2012 20:26 To: Pratt Chris Cc: nut-upsuser@lists.alioth.debian.org Subject: Re: [Nut-upsuser] NUT v2.6.4 with HP AF401A won't start 2012/10/29 Pratt Chris chris.pr...@comptel.commailto:chris.pr...@comptel.com Hi Arnaud. Hi Chris, I’ve run the commands you suggested but it actually didn’t crash. I let it run for about 10 minutes and it was obviously repeating the same messages so I broke it with Ctrl-C. I’ve attached the terminal output (shortened to meet the file size limit) and at the end it shows the message from trying to start it with upsdrvctl and the message in /var/log/messages. just to be sure to understand since the end of the traces seems to be melted: - the driver doesn't crash when using /usr/local/ups/bin/snmp-ups -D ... - the driver crashes when using upsdrvctl start is upsdrvctl also located in /usr/local/bin or do you have another one installed (RPM)? could you please check using rpm -q nut? cheers, Arnaud -- Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org Debian Developer - http://www.debian.org Free Software Developer - http://arnaud.quette.fr Disclaimer: This message and any attachments thereto are intended solely for the addressed recipient(s) and may contain confidential information. If you are not the intended recipient, please notify the sender by reply e-mail and delete the e-mail (including any attachments thereto) without producing, distributing or retaining any copies thereof. Any review, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. Thank you. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] NUT v2.6.4 with HP AF401A won't start
Hi Arnaud. I’ve run the commands you suggested but it actually didn’t crash. I let it run for about 10 minutes and it was obviously repeating the same messages so I broke it with Ctrl-C. I’ve attached the terminal output (shortened to meet the file size limit) and at the end it shows the message from trying to start it with upsdrvctl and the message in /var/log/messages. Regards, Chris. Chris Pratt Development Infrastructure Manager T: +44 118 929 4176 | M: +44 7979 854 307 | F: +44 118 929 4001 From: Arnaud Quette [mailto:aquette@gmail.com] Sent: 24 October 2012 22:23 To: Pratt Chris Cc: nut-upsuser@lists.alioth.debian.org Subject: Re: [Nut-upsuser] NUT v2.6.4 with HP AF401A won't start 2012/10/22 Pratt Chris chris.pr...@comptel.commailto:chris.pr...@comptel.com Hi Arnaud. Hi Chris I’ve applied the patch but it still crashes. I started from scratch and did the following: strange! at least, it runs (a few seconds) longer... hem. this seems related to another issue here. I would need a gdb backtrace to shed some light. can you install gdb, if needed, and run as root: $ gdb /path/to/snmp-ups then enter snmp-ups params: (gdb) run -D -a UPS-HP01 once snmp-ups crashes, type bt in gdb, i.e: (gdb) bt and send me back the output. cheers, Arnaud -- Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org Debian Developer - http://www.debian.org Free Software Developer - http://arnaud.quette.fr Disclaimer: This message and any attachments thereto are intended solely for the addressed recipient(s) and may contain confidential information. If you are not the intended recipient, please notify the sender by reply e-mail and delete the e-mail (including any attachments thereto) without producing, distributing or retaining any copies thereof. Any review, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. Thank you. gbd_output.txt.gz Description: gbd_output.txt.gz ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] NUT v2.6.4 with HP AF401A won't start
Hi Arnaud. I’ve applied the patch but it still crashes. I started from scratch and did the following: As user ‘nut’: Unpack the v2.6.5 tarball Apply the patch Run ./configure –with-user=nut –with-group=nut –with-snmp Run make As user ‘root’: Run make install mkdir –p /var/state/ups chmod 0770 /var/state/ups chown root:nut /var/state/ups As user ‘nut’; Run the debug command. The debug output is attached. Chris. Chris Pratt Development Infrastructure Manager T: +44 118 929 4176 | M: +44 7979 854 307 | F: +44 118 929 4001 From: Arnaud Quette [mailto:aquette@gmail.com] Sent: 18 October 2012 20:46 To: Pratt Chris Cc: NUT Users Subject: Re: [Nut-upsuser] NUT v2.6.4 with HP AF401A won't start 2012/10/17 Pratt Chris chris.pr...@comptel.commailto:chris.pr...@comptel.com Hi Arnaud. Hi Chris, first, please keep the traffic on the list, since other people may be interested in the topic. Unfortunately I'm not primarily a developer (I manage a room full of servers) so I don't have the normal array of development tools. I built NUT from the downloaded tarball following the instructions in the Installation Guide so If patching means simply amending files I can do that and then rebuild and test it, if you let me know what changes need to be made. it's exactly that, not harder. the patch is attached. please beware that if I've not committed it to the NUT code repository, it's because of a lack of testing! so even if my confidence level is good, not all my green lights are lit. to apply the patch, go into the NUT source directory and use: $ patch -p0 /path/to/snmp-ups-0outlet.diff note that it applies fine on 2.6.5. then just make make install as previously I'm interested in a driver debug trace, using: $ /path/to/snmp-ups -D -a UPS-HP01 If the driver doesn't crash, just Ctrl+C after a couple of minutes. in all cases, send back the trace in compressed form please. cheers, Arnaud -- Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org Debian Developer - http://www.debian.org Free Software Developer - http://arnaud.quette.fr Disclaimer: This message and any attachments thereto are intended solely for the addressed recipient(s) and may contain confidential information. If you are not the intended recipient, please notify the sender by reply e-mail and delete the e-mail (including any attachments thereto) without producing, distributing or retaining any copies thereof. Any review, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. Thank you. debug.txt.gz Description: debug.txt.gz ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
[Nut-upsuser] NUT v2.6.4 with HP AF401A won't start
Hi. I'm trying to configure NUT to manage a HP R12000/3 3-phase UPS fitted with an AF401A management module but it immediately crashes with a segmentation fault. O/S is CentOS 6.3 64-bit NUT built from tarball AF401A Firmware version 2.1.3 Extract from /etc/ups/ups.conf [UPS-HP01] driver = snmp-ups port = 192.168.0.89 desc = HP R12000/3 UPS Output from starting the driver [root@ups-monitor log]# upsdrvctl start Network UPS Tools - UPS driver controller 2.6.4 Network UPS Tools - Generic SNMP UPS driver 0.66 (2.6.4) kill: No such process Detected HP R12000/3UPS on host 192.168.0.89 (mib: cpqpower 1.5) Driver exited abnormally [root@ups-monitor log]# Extract from /var/log/messages Oct 15 15:02:32 ups-monitor kernel: snmp-ups[16840]: segfault at 0 ip 00354707a98c sp 7fff11f2a8b8 error 4 in libc-2.12.sohttp://libc-2.12.so[354700+189000] Debug output attached. I've downloaded the latest mib file (v1.64) from HP's website but I can't find any way to add it to the source files. I've seen references to the mib2nut mapping but, again, no help on how to achieve this. Thanks, Chris Pratt Development Infrastructure Manager Comptel Corporation 69 Suttons Business Park, Sutton Park Avenue, Reading, RG6 1AZ, UK T: +44 118 929 4176 | M: +44 7979 854 307 | F: +44 118 929 4001 chris.pr...@comptel.commailto:chris.pr...@comptel.com www.comptel.comhttp://www.comptel.com/ Disclaimer: This message and any attachments thereto are intended solely for the addressed recipient(s) and may contain confidential information. If you are not the intended recipient, please notify the sender by reply e-mail and delete the e-mail (including any attachments thereto) without producing, distributing or retaining any copies thereof. Any review, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. Thank you. nut.txt.gz Description: nut.txt.gz ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser