[Nut-upsuser] Old thread on belkin

Gene Heskett gene.heskett at gmail.com
Mon Dec 28 15:23:31 UTC 2009


On Monday 28 December 2009, Arjen de Korte wrote:
>Citeren Gene Heskett <gene.heskett at gmail.com>:
>> Just starting it with the fedora service command gets this:
>> [root at coyote rules.d]# service ups start
>> /etc/sysconfig/ups: line 4: UPSD_OPTIONS: command not found
>> Starting UPS driver controller:                            [FAILED]
>> Starting upsd:                                             [FAILED]
>> Starting UPS monitor (master):                             [FAILED]
>>
>> UPSD_OPTIONS is empty in /etc/sysconfig/ups
>
>We've have issues with the Fedora (and RedHat) scripts before. NUT
>doesn't use /etc/sysconfig/ups, this is something that your distro
>added. Chances are that this was written for an earlier version of NUT
>and since never changed. It's not needed either, since all information
>needed to startup the drivers, server and clients is in the NUT
>configuration files already. Could you try if running
>
>     /path/to/upsdrvctl start
>     /path/to/upsd
>     /path/to/upsmon
>
>improves the situation?
>
>For debugging purposes you shouldn't use the startup scripts from
>*any* distribution, because they will invariably direct the startup
>messages to /dev/null (it might already tell you what's wrong now).
>
>> And the log shows:
>> Dec 27 18:16:56 coyote upsd[21863]: listening on 127.0.0.1 port 3493
>> Dec 27 18:16:56 coyote upsd[21863]: Can't chdir to /var/run/nut:
>> Permission denied
>
>This is the STATEPATH directory (which is compiled in) and should be
>writeable by the user 'upsd' is running as. It almost certainly isn't.
>
>Best regards, Arjen
>
Ok, the strace output: wordwrap off

[root at coyote ups]# strace  upsdrvctl start         
execve("/sbin/upsdrvctl", ["upsdrvctl", "start"], [/* 56 vars */]) = 0
brk(0)                                  = 0x8073000                   
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3                                    
fstat64(3, {st_mode=S_IFREG|0644, st_size=177483, ...}) = 0
mmap2(NULL, 177483, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb78cf000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\310#E4\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1809672, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78ce000
mmap2(0x45226000, 1521232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x45226000
mmap2(0x45394000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16e) = 0x45394000
mmap2(0x45397000, 9808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x45397000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78cd000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb78cd6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) 
= 0
mprotect(0x45394000, 8192, PROT_READ)   = 0
mprotect(0x45222000, 4096, PROT_READ)   = 0
munmap(0xb78cf000, 177483)              = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78fa000
write(1, "Network UPS Tools - UPS driver c"..., 48Network UPS Tools - UPS driver controller 2.2.2
) = 48
brk(0)                                  = 0x8073000
brk(0x8094000)                          = 0x8094000
open("/etc/ups/ups.conf", O_RDONLY)     = 3
fstat64(3, {st_mode=S_IFREG|0640, st_size=3659, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78f9000
read(3, "# Network UPS Tools: example ups"..., 4096) = 3659
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb78f9000, 4096)                = 0
stat64("/sbin/usbhid-ups", {st_mode=S_IFREG|0755, st_size=114220, ...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb78cd708) = 25669
rt_sigaction(SIGALRM, {0x8049100, [], 0}, NULL, 8) = 0
alarm(45)                               = 0
waitpid(25669, Network UPS Tools: 0.29 USB communication driver - core 0.33 (2.2.2)

Using subdriver: Belkin HID 0.11
Can't initialize data from HID UPS
[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0) = 25669
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigaction(SIGALRM, {SIG_IGN, [ALRM], SA_RESTART}, {0x8049100, [], 0}, 8) = 0
alarm(0)                                = 44
write(2, "Driver failed to start (exit sta"..., 39Driver failed to start (exit status=1)
) = 39
exit_group(1)                           = ?
[root at coyote ups]#

Looks like we lose the strace function for the subdriver, Belkin. The data 
is flowing though, or is it, ttyUSB0 and ttyUSB1 are in use here, and the 
hiddev0 and hidraw0 devices have been nuked till the next time I unplug
and replug the cable.

Is this a situation where I'll have to crawl under the desk and do a 
momentary disconnect for every time I try to run this?  Where its at, and 
my 75 year old bones don't really want to do that too many times. I get
enough exercise just pushing my luck & some woodworking these days.

If this is a redhat-ism, then I can build the tarball if that would help, but 
the lack of specifics in the error messages sucks.  Just who the hell 
needs to own this /var/run/nut directory anyway?

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)

What good is a ticket to the good life, if you can't find the entrance?



More information about the Nut-upsuser mailing list