[Nut-upsuser] i am stuck with setup :)

Arnaud Quette aquette.dev at gmail.com
Wed May 23 11:41:05 UTC 2012


2012/5/22 Vladimir Micovic <vladimir at micovic.com>:
> Somebody forget me? :)

no, we're simply busy with other things (such as 2.6.4 release).
so if you want us to help you, help us by reading / answering everything.

As a first note, CentOS is RPM based, and all the issues you're facing
have already been addressed by packagers.
So it would be wise to use an existing RPM (possibly rebuilt) and
eventually fix the remaining issue (udev rules not complete...).

EPEL repository should be a good candidate to avoid rebuilding:
http://mirrors.nl.eu.kernel.org/fedora-epel/6/x86_64/

A few more notes if you decide to go the difficult way:

- the driver permission issue is addressed through udev.
I'm not sure for CentOS 6, but udev rules are now probably stored in
/lib/udev/rules.d
You should have a file called "52-nut-usbups.rules", otherwise use the
one in the source directory nut/scripts/udev/
There is a line with:
ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="ups"

GROUP="nut" is to be replaced by the value you used for "--with-group"
during compilation (defaults to "nogroup" otherwise).
You MUST be sure that this group has RW access on the state directory
(/var/state/ups by default).

- if you start 1 component as root (such as drivers), you also need to
start the others (at least upsd) as root too.
otherwise, you end up with upsd not being able to get data from the
driver, with a msg "Can't connect to UPS...: Permission denied"


cheers,
Arno
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
--
Conseiller Municipal - Saint Bernard du Touvet

> -----Original Message-----
> From: Vladimir Micovic [mailto:vladimir at micovic.com]
> Sent: Saturday, May 19, 2012 7:45 PM
> To: 'Charles Lepple'
> Cc: 'NUT Users'
> Subject: RE: [Nut-upsuser] i am stuck with setup :)
>
> Sorry for spam, just to paste conf. file again:
>
> [root at optimus etc]#  cat ups.conf
> [local_mon]
>        driver = blazer_usb
>        port = /dev/ttyS0
>        desc = "Galaxy.UPS"
> [root at optimus etc]# cat upsd.conf
> [root at optimus etc]# cat upsd.users
> [local_mon]
> password = qwerty321
> upsmon master
> [root at optimus etc]# cat upsmon.conf
> MONITOR local_mon at localhost 1 local_mon qwerty321 master POWERDOWNFLAG
> /etc/killpower # SHUTDOWNCMD "/sbin/shutdown -h now"
> [root at optimus etc]# cat upssched.conf
> CMDSCRIPT /usr/local/ups/bin/upssched-cmd
>
> -----Original Message-----
> From: nut-upsuser-bounces+vladimir=micovic.com at lists.alioth.debian.org
> [mailto:nut-upsuser-bounces+vladimir=micovic.com at lists.alioth.debian.org] On
> Behalf Of Vladimir Micovic
> Sent: Saturday, May 19, 2012 7:10 PM
> To: 'Charles Lepple'
> Cc: 'NUT Users'
> Subject: Re: [Nut-upsuser] i am stuck with setup :)
>
> Update:
>
> I resolve prob. Which was with permissions in /var/state And now when I try
> to start upsdrvctl I got:
> # bin/upsdrvctl  start local_mon
> Network UPS Tools - UPS driver controller 2.6.3 Network UPS Tools -
> Megatec/Q1 protocol USB driver 0.04 (2.6.3) Can't claim USB device
> [0665:5161]: could not detach kernel driver from interface 0: Operation not
> permitted Driver failed to start (exit status=1)
>
> -----Original Message-----
> From: Charles Lepple [mailto:clepple at gmail.com]
> Sent: Saturday, May 19, 2012 5:52 PM
> To: Vladimir Micovic
> Cc: 'Arnaud Quette'; 'NUT Users'
> Subject: Re: [Nut-upsuser] i am stuck with setup :)
>
> On May 18, 2012, at 7:29 PM, Vladimir Micovic wrote:
>
>> How do you mean how I start?
>> If you think on user, I put ups.conf "user = root"
>
> I don't think I remember seeing which OS you are using, so I don't know what
> scripts start programs like upsd or upsmon.
>
> I tend not to run with "user = root", so I am not sure what the implications
> are. I prefer to run NUT unprivileged, with udev rules to set the proper
> permissions on the /dev node for the UPS. If upsd and the driver both run
> under the same user ID, you shouldn't get the "Permission denied" message
> you listed below.
>
>> -----Original Message-----
>> From: Charles Lepple [mailto:clepple at gmail.com]
>> Sent: Friday, May 18, 2012 3:33 AM
>> To: Vladimir Micovic
>> Cc: 'Arnaud Quette'; 'NUT Users'
>> Subject: Re: [Nut-upsuser] i am stuck with setup :)
>>
>> On May 17, 2012, at 3:44 PM, Vladimir Micovic wrote:
>>
>>> Anyway, upsd say next: http://pastebin.com/n1SGBZXL
>>
>> If it's less than 10 lines, pastebin is pretty silly... our attachment
>> size limit is 40KB, not 40 bytes :-)
>>
>>> Network UPS Tools upsd 2.6.3
>>> /usr/local/ups/etc/upsd.conf is world readable listening on
>>> 192.168.1.40 port 3493 Can't connect to UPS [local_mon]
>>> (blazer_usb-local_mon): Permission denied
>>> /usr/local/ups/etc/upsd.users is world readable
>>
>> How did you start the driver and upsd?
>>
>> (upsmon depends on upsd, so we need to fix upsd first)
>
> --
> Charles Lepple
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on usenet and in e-mail?
>
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
>
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser



-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
--
Conseiller Municipal - Saint Bernard du Touvet



More information about the Nut-upsuser mailing list