8
8
Q: I just upgraded, and ...
10
10
A: You have read UPGRADING in the base directory of the distribution,
11
right? If not, go read it now, then come back to this file.
11
right? If not, go read it now, then come back to this file if your
12
question wasn't answered in there.
13
14
-----------------------------------------------------------------------------
15
16
Q: upsstats says "Error: can't open template file (upsstats.html)".
18
A: Go into your CONFPATH and copy the sample template files over to
19
A: Go into your configuration path (/usr/local/ups/etc by default) and
20
copy the sample template files over to their real names. The sample
21
template files are installed with 'make install-cgi-conf' and can
22
also be found inside the source distribution in the conf directory.
21
24
-----------------------------------------------------------------------------
27
30
-----------------------------------------------------------------------------
32
Q: My 1.4 CGI programs won't talk to my 2.0 upsd. What should I do?
34
A: Upgrade the CGI programs to 2.0. While 1.4 was intended as a
35
compatibility tree that used the new protocol by default, the CGI
36
programs were not upgraded at the same time. The 1.4 versions
37
still use the old REQ protocol, and your 2.0 upsd expects GET.
39
-----------------------------------------------------------------------------
29
41
Q: I just upgraded from 1.2 and upsmon now fails to start, saying
30
42
"Fatal error: insufficient power configured!". Why?
41
53
Q: My UPS driver now says it's "broken", and won't start. What now?
43
A: Several drivers were purposely disabled during the 1.3 development
44
process since they did not perform adequate checking on the status
45
data from the hardware. A few others were also disabled for other
48
The driver needs to be fixed before it can be used reliably. In
49
many cases, a simple check of the incoming status data will suffice.
50
One or two drivers may require a lot of work.
52
This may also mean that a driver did not receive any attention
53
from the original author during the 1.3 cycle. In that case,
54
consider adopting it and keep it running through future development
57
These drivers are being maintained in the tree in the hopes that the
58
wider distribution of the stable 1.4 tree will encourage someone to
59
fix them. Those which are still broken will be removed before the
62
These drivers currently will not work as a result:
64
bcmxcp, hp, microdowell, oneac, sec
66
-----------------------------------------------------------------------------
68
Q: My favorite UPS driver disappeared after 0.45.5. What happened?
70
A: The actively maintained drivers were converted to use things like
71
upsdrvctl and ups.conf between March 2001 and March 2002. Your
72
driver was probably removed because nobody converted it in all that
55
Q: My favorite UPS driver disappeared after an upgrade. What now?
57
A: Drivers are occasionally removed from the tree if they are no longer
58
receiving maintenance. There have been several architectural
59
changes to the driver code in recent times, and drivers which were
60
not converted by someone are eventually dropped.
75
62
This is called progress. We do this in order to avoid a situation
76
63
where someone believes that a driver is being maintained when it is
77
64
actually rotting slowly in the tree. It also keeps the tree free of
78
old compatability hacks for code that nobody actually uses anyway.
65
old compatibility hacks for code that nobody actually uses anyway.
80
67
To get a driver back into current releases, you need to convert it
81
68
yourself or get someone to do it for you. This is not difficult.
82
69
The hardest part of any driver is decoding the protocol, and that's
83
70
already been done in the old version.
85
The old code can be found in nut-0.45.5.tar.gz in the models
86
directory. If you can't find that online easily, try Google.
88
These drivers were removed after 0.45.5 (released March 27, 2002)
89
and have not been fixed since then:
91
aeg, bestfort, engetron, ipt-anzen, mustekups, optiups, toshiba1500
93
72
-----------------------------------------------------------------------------
95
Q: I just upgraded and now it won't talk to any of my systems that are
96
still running an older version before 0.50.0.
74
Q: I just upgraded and now I can't talk to older versions.
98
A: Older versions of the software used port 3305, which was conflicting
99
with an assignment for odette-ftp. NUT now uses its official IANA
100
port number - 3493. Until you get the other systems upgraded, put a
101
:3305 on the host name to use the old port.
76
A: Version 2.0 can't communicate with anything before 1.4 due to the
77
protocol changes. Version 1.4 can communicate with both 2.0 and
78
most older versions since it was a transitional release and has
79
compatibility code for both protocols.
103
81
-----------------------------------------------------------------------------
129
107
drivers nor upsd ever need root powers, and that answer tells you
130
108
how to make it work.
132
A: You can also use -u <user> when calling upsdrvctl to make the drivers
133
switch to another user. This is usually much easier than recompiling.
110
A: You can also specify a user with "user=" in the global part of
111
ups.conf. Just define it before any of your [sections]:
135
119
-----------------------------------------------------------------------------
137
Q: upsc, upsstats, and the other clients give me "access denied". The
138
serial port permissions are fine, so what gives?
121
Q: upsc, upsstats, and the other clients say "access denied". The
122
serial port permissions are fine, so what gives?
140
124
A: In this case, "access denied" means the access to upsd, not the
141
125
serial port. You're being denied since the system has not been
142
126
permission to speak to upsd according to the access controls.
144
The fix is to edit the upsd.conf to allow those hosts to do what they
145
need. Clients like upsc, upsmon, and the CGI programs need "monitor"
146
level access to work. upsmon also needs a user defined in upsd.users.
148
If you are getting this error from the programs that request a login
149
name or password (upsrw, upscmd, upsset.cgi), then make sure your
150
account is properly defined in upsd.users.
128
The fix is to edit the upsd.conf to allow those hosts to do what
129
they need. Create ACL lines to match the hosts or networks, then
130
use those ACL names on ACCEPT lines.
132
ACL mybox 10.2.1.3/32
135
If upsmon is complaining, make sure you have defined a user for it
136
in upsd.users. This needs to be the same user name and password
137
which is on the MONITOR line in upsmon.conf.
142
upsmon master # or upsmon slave
144
If the program asks for a username and password (upsrw, upscmd,
145
upsset.cgi) and gives this error, then make sure your account is
146
properly defined in upsd.users.
152
152
After editing the upsd config files, you can do 'upsd -c reload'
153
153
or kill -HUP <pid of upsd> to make it reload the configuration
190
188
http://random.networkupstools.org/cables/940-0024C.jpg
192
That should give you a workable clone of APC's 940-0024C cable.
190
There is also a text version of that diagram in the docs/cables
191
directory of the NUT source distribution. Either one should allow
192
you to build a good clone of APC's 940-0024C cable.
193
194
There are simpler solutions involving 3 wires that work just fine
194
195
too, but Powerchute won't find the loopback DTR-DCD and RTS-CTS and
195
196
will be annoyed. If you don't ever plan to use Powerchute, 3 wires
196
197
(RxD, TxD, GND) are sufficient.
198
It should also be noted that the genericups driver has no way to detect
199
the UPS, so it will fire up quite happily if it can open the serial
200
port. Merely having it start up is not necessarily an indication
201
of success. You should start it and then check the status with upsc
202
or similar to be sure that it's reading the hardware properly.
199
It should also be noted that the genericups driver has no way to
200
detect the UPS, so it will fire up quite happily if it can open the
201
serial port. Merely having it start up is not necessarily an
202
indication of success. You should start it and then check the
203
status with upsc or similar to be sure that it's reading the
204
206
-----------------------------------------------------------------------------
206
Q: Why isn't configure finding gd?
208
A: The process of finding gd was recently replaced since it was failing
209
in too many situations. The new one allows you to specify all of
210
the compiler flags that may be necessary to make it work.
212
NOTE: gd 2.0.5 through 2.0.7 have a gdlib-config script that isn't
213
usable. If you upgrade to at least gd 2.0.8, configure will use
214
it to find the right flags to make it compile and link properly.
208
Q: Why does configure fail to find gd?
210
A: Recent versions of gd should be detected automatically through the
211
gdlib-config script. Note that gd 2.0.5 through 2.0.7 have an
212
unusable script, so upgrade to the newest version if you have one
216
215
If you're stuck with an older version of gd, you can use it if you
217
216
specify the flags manually. Look in gd's Makefile for "LIBS=",
300
301
-----------------------------------------------------------------------------
302
Q: Why won't bestfortress talk to my Best Fortress UPS?
304
303
Q: Why won't bestups talk to my Best Fortress UPS?
306
305
A: There are at least two different protocols being used for hardware
307
306
with very similar names. The bestups driver tends to support the
308
units built around the newer "PhoenixTec" protocol. The
309
bestfortress driver handles the equipment that is much older.
307
units built around the newer "PhoenixTec" protocol.
311
When in doubt, try both.
309
Previous releases of this software included a driver called
310
bestfortress which supported the older Best hardware. See the
311
earlier entries about updating old drivers which have been removed
313
314
-----------------------------------------------------------------------------
332
333
directly affects how long you run on battery without knowing
333
334
what's going on with the UPS.
335
-----------------------------------------------------------------------------
337
Q: Why do upsc (or any of the client programs) say "no such variable"
338
when I try to run them?
340
A: Usually this means that upsd has no data available for that UPS.
341
Check your ups.conf and make sure that you have defined entries
342
that make sense for the driver(s) that you are running.
336
Note: some drivers occasionally need more time to update than the
337
default value of MAXAGE (in upsd.conf) allows. As a result, they
338
are temporarily marked stale even though everything is fine. This
339
can happen with MGE Ellipse equipment - see the mge-shut man page.
340
In such cases, you can raise the value of MAXAGE to avoid these
341
warnings; try a value like 25 or 30.
344
343
-----------------------------------------------------------------------------
353
352
Check your syslog. upsd will complain regularly if it can't
354
353
connect to a driver, and it should say why it can't connect.
355
Note: if you jumped in with both feet and didn't follow the INSTALL
356
document, you probably started upsd by itself. You have to run
357
'upsdrvctl start' to start the drivers after configuring ups.conf.
356
359
-----------------------------------------------------------------------------
358
Q: Everything works perfectly during the shutdown, but then my system
359
never powers back on. What happened?
361
Q: Everything works perfectly during the shutdown, and the UPS comes
362
back on, but my system stays off. What's happening?
361
364
A: Assuming you don't have the problem in the next question, then you
362
365
probably have an ATX motherboard, have APM or ACPI enabled in your
452
455
Mac OS to frob the "file server" panel is not an acceptable
458
A: If you're on OS X, this is relatively simple to fix. Go to system
459
preferences, click on energy saver, click on the options tab, check
460
"Restart automatically after a power failure".
462
If you're on some other OS, hope they've figured out how to duplicate
463
the above in a non-simian manner.
455
465
-----------------------------------------------------------------------------
457
467
Q: I want to keep the drivers and upsd in their own security domains.
493
503
Note that /var/state/ups is group writable since upsd will
494
504
place the upsd.pid file here.
496
You may have to change the owner of upsd.conf and upsd.users to
497
nutsrv if you haven't already. Once the config files are ready,
506
You may have to change the groups of upsd.conf and upsd.users to
507
make them readable. These files should not be owned by nutsrv,
508
since someone could compromise the daemon and change the config
509
files. Instead, put nutsrv in a group ("nut" in this example), then
510
make the files owned by root.nut, with mode 0640.
512
Once the config files are ready, start upsd:
500
514
# /usr/local/ups/sbin/upsd -u nutsrv
515
529
to that one user account. Direct access to the serial device is
516
530
not possible, since that is owned by another user.
518
It also has the nice side effect that the drivers and upsd *never*
519
have root permissions, even when started at boot-time. Since they
520
don't need it, there is no reason to let them have it, even
523
532
There is also the possibility of running the drivers and upsd in a
524
533
chroot jail. See the chroot.txt provided in the source
525
534
distribution for an example implementation.
574
583
A: Those programs need to see a host in your hosts.conf before they
575
584
will attempt communications. This keeps people from feeding it
576
random data to the programs and annoying others via your system.
585
random "host=" settings, which would annoy others with outgoing
586
connection attempts from your system.
578
588
If your hosts.conf turns out to be configured correctly with
579
589
MONITOR entries and all that, check the permissions. Your web
580
590
server may be running the CGI programs as a user that can't read
593
If you run your web server in a chroot jail, make sure the programs
594
can still read hosts.conf. You may have to copy it into the jail
595
for this to work. If you do that, make sure it's not writable by
596
any of the user accounts which run inside the jail.
583
598
-----------------------------------------------------------------------------
585
600
Q: upsd is running, so why can't I connect to it?
587
A: Assuming you haven't changed the port on the command line or at
588
compile-time, then you probably have some sort of firewall blocking
602
A: Assuming you haven't changed the TCP port number on the command line
603
or at compile-time, then you probably have some sort of firewall
604
blocking the connection.
591
When securing port 3493, remember that upsd runs both TCP and UDP
606
upsd listens on TCP port 3493 by default.
594
608
-----------------------------------------------------------------------------
620
634
series, should also have it available.
622
636
First you need to point configure at your hiddev.h file. If it
623
happens to be in /usr/src/linux/include/linux/hiddev.h, then you
624
don't need to do anything. Otherwise, use --with-linux-hiddev=PATH
637
happens to be /usr/include/linux/include/linux/hiddev.h, then you
638
don't need to do anything. Otherwise, use --with-linux-hiddev
639
and provide the full path to the right file.
627
641
hidups is not built by default, so call configure with
628
642
"--with-drivers=hidups" or go into your drivers directory and do
885
903
-----------------------------------------------------------------------------
905
Q: I found some information about another kind of UPS protocol you
906
don't support yet, but I don't know what to do with it. Can you
909
A: If you're not a programmer, you can still help others by making
910
that protocol available. You might host the document somewhere and
911
send the URL to one of the mailing lists.
913
-----------------------------------------------------------------------------
887
915
Q: How can you answer questions to situations that nobody's encountered
888
916
yet? Isn't this a frequently asked questions file?