Init ssl without certificate database error unknown ups

всем доброе время суток, раньше все настраивал и все работало, но после перестановки ОС выдает ошибку: Init SSL without certificate database Error: Unknown UPS Настройки nano /etc/default/nut вот с такими настройками раньше все работало прошу помощи у самого уже глаза на мылены

всем доброе время суток, раньше все настраивал и все работало, но после перестановки ОС выдает ошибку:
Init SSL without certificate database
Error: Unknown UPS

Настройки
nano /etc/default/nut

START_UPSD   =yes
START_UPSMON =yes

nano /etc/nut/nut.conf

MODE=standalone
nano /etc/nut/ups.conf

[powercom]
        driver = usbhid-ups (experimental)
        port = auto
        default.battery.voltage.high    = 20
        default.battery.voltage.low     = 15
        default.battery.voltage.nominal = 48
        ondelay  = 1
        offdelay = 120
        desc = "Local UPS"

nano /etc/nut/upsd.conf

LISTEN 127.0.0.1 3493
LISTEN 192.168.0.60 3493

nano /etc/nut/upsd.users

[powercom]
        password = password
        powercom master

nano  /etc/nut/upsmon.conf

RUN_AS_USER nut

MONITOR powercom@localhost 1 powercom password master

MINSUPPLIES 1

SHUTDOWNCMD "/sbin/shutdown -Ph +0"
NOTIFYCMD /etc/nut/nutnotify

POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15

NOTIFYMSG ONLINE "UPS %s on line power"
NOTIFYMSG ONBATT "UPS %s on battery"
NOTIFYMSG LOWBATT "UPS %s battery is low"
NOTIFYMSG FSD "UPS %s: forced shutdown in progress"
NOTIFYMSG COMMOK "Communications with UPS %s established"
NOTIFYMSG COMMBAD "Communications with UPS %s lost"
NOTIFYMSG SHUTDOWN "Auto logout and shutdown proceeding"
NOTIFYMSG REPLBATT "UPS %s battery needs to be replaced"
NOTIFYMSG NOCOMM "UPS %s is unavailable"
NOTIFYMSG NOPARENT "upsmon parent process died - shutdown impossible"

NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC
NOTIFYFLAG FSD SYSLOG+WALL+EXEC
NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC
NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC
NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC
NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC
NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC
NOTIFYFLAG NOPARENT SYSLOG+WALL+EXEC

RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5


nano /etc/nut/upssched.conf

CMDSCRIPT /etc/nut/cmd.sh
PIPEFN /tmp/upspipe
LOCKFN /tmp/upslock
AT COMMBAD * EXECUTE commbad
AT COMMOK * EXECUTE commok
AT NOCOMM * EXECUTE nocomm
AT ONBATT * EXECUTE powerout
AT ONBATT * START-TIMER shutdownnow 90
AT LOWBATT * EXECUTE shutdowncritical
AT ONLINE * CANCEL-TIMER shutdownnow
AT ONLINE * EXECUTE powerup

nano /etc/nut/nutnotify.sh

#!/bin/sh

echo "$@" | mail -s "NUT Notice" support@ciberbox.ru


nano /etc/nut/cmd.sh

#!/bin/sh

case $1 in
    powerout)
      logger "UPS on battery. Shutdown in 90 seconds...."
      echo -e "Subject: UPS monitor. On battery.nThe UPS has been on battery for awhile"
        | sendmail  support@ciberbox.ru
      ;;
    powerup)
      logger "UPS on line. Shutdown aborted."
      echo -e "Subject: UPS monitor. On line.nUPS on line. Shutdown aborted."
        | sendmail support@ciberbox.ru
      ;;
    shutdownnow)
      logger "UPS has been on battery for 90 seconds. Starting orderly shutdown"
      /usr/bin/sudo /sbin/shutdown -h +0
      ;;
    shutdowncritical)
      logger "UPS battery level CRITICAL. Shutting down NOW!!!!"
      /usr/bin/sudo /sbin/shutdown -h +0
      ;;
    *)
      logger "Unrecognized command: $1"
      ;;
esac


вот с такими настройками раньше все работало

прошу помощи у самого уже глаза на мылены

Содержание

  1. debian jessie + ippon 600
  2. Error: Driver not connected #1601
  3. Comments
  4. UPS Logicpower UL850VA (USB) not supported #640
  5. Comments
  6. Network UPS Tools — не прикручивается UPS ION

debian jessie + ippon 600

Доброе утро. В общем почитал отзывы о по winpower. Решил поставить через nut.

3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt9-3

deb8u1 (2015-04-24) i686 GNU/Linux

# dpkg -s nut | grep Version Version: 2.7.2-4

########BOOT LOG################### systemd[1]: nut-driver.service: control process exited, code=exited status=1 systemd[1]: Failed to start Network UPS Tools — power device driver controller. systemd[1]: Dependency failed for Network UPS Tools — power devices information server. systemd[1]: Unit nut-driver.service entered failed state. upsmon[736]: fopen /var/run/nut/upsmon.pid: No such file or directory upsmon[736]: UPS: ippon-600@127.0.0.1 (master) (power value 1) upsmon[736]: Using power down flag file /etc/killpower upsmon[958]: Startup successful systemd[1]: nut-monitor.service: Supervising process 959 which is not our child. We’ll most likely not notice when it exit upsmon[959]: Init SSL without certificate database upsmon[959]: UPS [ippon-600@127.0.0.1]: connect failed: Connection failure: Connection refused upsmon[959]: Communications with UPS ippon-600@127.0.0.1 lost ###########################################

# upsd Network UPS Tools upsd 2.7.2 fopen /var/run/nut/upsd.pid: No such file or directory listening on 127.0.0.1 port 3493 Can’t connect to UPS [ippon-600] (blazer_usb-ippon-600): No such file or directory

# ls -l /var/run/nut/ итого 8 -rw-r—r— 1 nut nut 5 май 31 08:12 upsd.pid -rw-r—r— 1 root root 4 май 31 07:49 upsmon.pid

# upsdrvctl start Network UPS Tools — UPS driver controller 2.7.2 Network UPS Tools — Megatec/Q1 protocol USB driver 0.11 (2.7.2) Shutdown delay ‘6’ out of range [12..600] Driver failed to start (exit status=1)

# /lib/nut/blazer_usb -a ippon-600 -u root -DDD Network UPS Tools — Megatec/Q1 protocol USB driver 0.11 (2.7.2) 0.000000 debug level is ‘3’ 0.153115 Checking device (0A12/0001) (003/005) 0.166693 — VendorID: 0a12 0.166717 — ProductID: 0001 0.166723 — Manufacturer: unknown 0.166727 — Product: CSR8510 A10 0.166732 — Serial Number: unknown 0.166736 — Bus: 003 0.166740 Trying to match device 0.166746 Device does not match — skipping 0.166764 Checking device (0665/5161) (003/004) 0.171810 — VendorID: 0665 0.171829 — ProductID: 5161 0.171835 — Manufacturer: INNO TECH 0.171840 — Product: USB to Serial 0.171845 — Serial Number: 20100826 0.171849 — Bus: 003 0.171853 Trying to match device 0.171859 Device matches 0.172309 Shutdown delay ‘6’ out of range [12..600]

#upsc ippon-600@localhost Init SSL without certificate database Error: Driver not connected

Благо гайдов полно. Конфиги стандартные. Но вот честно не пойму что не так. Видел кучу баг-репортов. Но вроде версия стабильная. Права менял, пользователь создан. Что можно еще попробовать? Дрова указаны blazer_usb. В ступор зашел.

Источник

Error: Driver not connected #1601

Hi, I have a problem running nut on Ubuntu20:

I am running out of idead how to run it, what else can I do?

The text was updated successfully, but these errors were encountered:

I don’t see VP700ECD and CPS strings in lsusb output; can you try commenting them away in ups.conf so it would only try to match by numeric vendorid and productid ?

A higher debug verbosity level (more -D options) can show more details into what it is probing and what did not match. Current codebase may be more informative about this (release 2.7.4 is rather aged, even if until recently it was the latest), so you might see better detail with a custom build from git.

Just in case, note that per #1512 there may be a regression for CPS support in 2.8.0/master codebase that we are trying to make sense of.

Okay, so I changed ups.conf :

Tried now $ sudo /lib/nut/usbhid-ups -a ups -u root -DDD and now device matches, but still unable to get HID descriptor

Tried to build nut from source, now have some permissions error with libusb

That looks like you had not configure ‘d the user account to be same as in packaging. For a quick test, you can set the root option in ups.conf so driver won’t drop privileges if started as root.

Added user = root and tried to run drivers/upsdrvctl start as root, or with sudo but still libusb1 ha insufficient permissions

For the later tests, are you sure earlier drivers are not running and holding the device?

Also check if your udev.rules (or hwdb) got applied and mention this vid/pid pair so the OS does not hold it as a HOD device.

Also, adding some more -D flags to driver startup should expose more details (which devices it saw and why it rejected them).

Im pretty sure, I uninstalled all other drivers, but maybe I will just try on fresh VM.

This is output of sudo drivers/usbhid-ups -a ups -u root -DDDDD

I added this to top of my /lib/udev/rules.d/62-nut-usbups.rules and applied them

VM? Does the host also not grab the device then, for its USB stack? Is cabling OK?

Otherwise, system issues like I/O errors and unavailable resources are a bit outside of NUT proper. But maybe someone else would add bright ideas.

Yes, host is getting info ok — it is unRaid and I’m using build-in ups support. I was trying to deploy vm with Ubuntu20. UPS is recognized inside vm, but I just cannot run nut. Probably it just won’t work with host and vm at the same time.

Источник

UPS Logicpower UL850VA (USB) not supported #640

I’ve recently installed the driver richcomm_usb for UPS Logicpower UL850VA.
Other drivers I tried didn’t work except this one.

The main problem is , that the status of the battery is shown as ups.status: OB LB but UPS is on power and battery charge level is 100%. So, when I run upsmon — it shutdown the system.

Below are outputs of the commands:

UPS is recognised by lsusb as Lakeview Research:

Please let me know what can be done to fix the ups battery status issue.

The text was updated successfully, but these errors were encountered:

Do the bits for ups.status change when you unplug the input power? If not, it might just be coincidence that the driver was able to attach to the UPS.

0925:1234 is an example USB ID from Jan Axelson’s «USB Complete» book, so it is no more descriptive than the 0001:0000 IDs that pop up from time to time.

What does lsusb -vvv -d:0925 return? You will need to run it as root.

While deeper investigation, I found that the status is cnanging from time to time from «OB LB» to «OB».
It does not matter is UPS plugged-in or unplugged. The statuses are always the same and changing from time to time every several seconds.

lsusb command gives nothing:

but I ran lsusb -vvv and took the strings related to Lakeview Research only:

My mistake, I meant lsusb -vvv -d0925: — but what you have is fine.

What software does the vendor recommend using? Maybe we can match that up with another UPS/driver combination in NUT.

Maybe try the nutdrv_qx driver? (@zykh, do you remember if we ever got this USB adapter working in non-contact closure mode? I saw a few threads from

10 years ago but no resolution.)

The drivers for the UPS are older than mammoth (2005 year).
The drivers/documentation links I found match the drivers that were provided with UPS:

I tried them, but the drivers even could not start (I have Ubuntu 14.04)

Tried nutdrv_qx driver, but it is not working.

Output of the command (just to have all info ) is below:

For future reference, it looks like the vendor software package is called PowerManagerII , and the *nix variants are called upsmanager1G.0v and upsmanager1.0v .

(I changed the issue title because I use the keyword «HCL» to indicate compatible hardware that we need to add to the compatibility lists.)

If you want to try to get the vendor software working (in order to trace the USB comms), you can try the solution here: https://askubuntu.com/questions/454253/how-to-run-32-bit-app-in-ubuntu-64-bit#454254

@clepple: no. but the Quary_F , Quary_I and Quary_Q1 routines in that software are somewhat revelatory.
@pavloivanets: what’s the output of the richcomm_usb driver when launched with a debug level of 3 (i.e. /path/to/richcomm_usb -a logicpower -DDD )?

@zykh Here is the output of the driver:

After further inspection, I came to this..
Apparently there are (at least) 3 protocols used by devices using those richcomm serial/usb things (all should identify themselves as 0925:1234 ):

  • USB devices supported by PowerManagerLite:
    • those are only contact closure devices — the protocol is the one currently implemented in richcomm_usb driver. (they should only support the 1 and 2 ‘commands’, and probably the 30 in 01 00 00 30 should not be needed),
  • USB devices supported by PowerManagerII:
    • Q1 devices ( Q1 , I , F , S commands should be supported, possibly others), with commands simply sent to the device as they are (split in 4 byte packets, with the first byte used to store the length of the bytes to follow, i.e. max 3),
    • other devices with a protocol somewhat similar to the dry-contact one, with ‘commands’ at least from 1 to 17 (the meaning is not the same of the dry-contact protocol, though, so 1 != status flag and 2 != shutdown).

Now, @pavloivanets, at first glance, the output you posted doesn’t look like the dry-contact one.
I’ll try to implement the other two (starting from the Q1 one), and come back here when ready.

So, @pavloivanets. here I am, a (no longer) young man, a crashing computer program.

I amended the richcomm_usb driver to also try the other -ahem- ‘commands’ (excluding 2 and 17 , which should be the shutdowns in the two protocols), in order to gather some data to work with. so (best scenario) the driver will still behave as before.
While in nutdrv_qx , I added a new USB subdriver that could (could) actually work, if your device is of the right type, and my assumptions are right.

Please, post the output of:

  • nutdrv_qx , launched with a debug level of 5 and using protocol ‘megatec’ ( /path/to/nutdrv_qx -a -DDDDD -x protocol=megatec ),
  • richcomm_usb , launched with a debug level of 3 (let it run for a couple of minutes or so).

I’d try them with only a dummy load on the UPS, in case it’s actually of the contact closure type and/or the things the drivers do mean something unexpectedly wrong for it.
Also, your computer may explode.

Same issue with LogicPower U650VA-P and richcomm_usb:

device.mfr: Richcomm dry-contact to USB solution
device.model: UPS USB MON V1.4
device.serial: unknown
device.type: ups
driver.name: richcomm_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.internal: 0.04
ups.mfr: Richcomm dry-contact to USB solution
ups.model: UPS USB MON V1.4
ups.productid: 1234
ups.serial: unknown
ups.status: OB
ups.vendorid: 0925

ups.status changes between «OB» and «OB LB» randomly and nothing indicates if UPS works on battery.

Same for me. Should you be aware of any fix for this please kindly reply (this issue is 2 years old. I can’t believe that a custom driver isn’t available. 🙁 )

Источник

Все новые темы

Автор
underground
Участник форума

Зарегистрирован: 30.12.2008
Пользователь #: 74,942
Сообщения: 384

Добавлено: Сб 23 Янв, 2016 11:57 Заголовок сообщения: Network UPS Tools — не прикручивается UPS ION
_________________
С уважением
Илья
Вернуться к началу

Зарегистрируйтесь и реклама исчезнет!

ADMINDM
guru

Зарегистрирован: 04.11.2007
Пользователь #: 63,218
Сообщения: 7207


Голоса: 230

Добавлено: Вс 24 Янв, 2016 22:36 Заголовок сообщения:
_________________
Если помог мой ответ — щёлкните по ссылке :
http://sysadmins.ru/reputation.php?a=add&u=63218&p=13191050&c=ac4064c1
«Знание некоторых принципов легко возмещает незнание некоторых фактов»
Вернуться к началу

underground
Участник форума

Зарегистрирован: 30.12.2008
Пользователь #: 74,942
Сообщения: 384

Добавлено: Пн 25 Янв, 2016 15:32 Заголовок сообщения:
_________________
С уважением
Илья
Вернуться к началу

underground
Участник форума

Зарегистрирован: 30.12.2008
Пользователь #: 74,942
Сообщения: 384

Добавлено: Пн 25 Янв, 2016 16:06 Заголовок сообщения:
_________________
С уважением
Илья
Вернуться к началу

ADMINDM
guru

Зарегистрирован: 04.11.2007
Пользователь #: 63,218
Сообщения: 7207


Голоса: 230

Добавлено: Пн 25 Янв, 2016 19:41 Заголовок сообщения:
_________________
Если помог мой ответ — щёлкните по ссылке :
http://sysadmins.ru/reputation.php?a=add&u=63218&p=13191050&c=ac4064c1
«Знание некоторых принципов легко возмещает незнание некоторых фактов»
Вернуться к началу

underground
Участник форума

Зарегистрирован: 30.12.2008
Пользователь #: 74,942
Сообщения: 384

Источник

Adblock
detector

Изображение пользователя DarkneSS.

Данный текст полностью взят отсюда. Мне пришлось частично переработать инструкцию, но я не уверен, что дело не в том, что у мен не *бунту. Так что милости просим замечания, если они обнаружатся.

Для начала пред подключением ИБП к компьютеру по средствам USB даем команду:
lsusb
потом подключаем ИБП и снова повторяем команду, чтобы выявить идентификаторы устройства. Например из строки «Bus 002 Device 005: ID 0665:5161 Cypress Semiconductor USB to Serial» можно узнать, что VendorID = 0665 ProductID = 5161 для моего ИБП.

1. Установка

Далее установим NUT:
sudo apt-get install nut

2. Настройка правил UDEV

После этого создаем файл (в случае USB подключения ИБП) в /lib/udev/rules.d/52-nut-usbips.rules со следующим содержанием:
# Ippon Back Power Pro 800
ATTR{idVendor}==»Ваш_VendorID», ATTR{idProduct}==»Ваш_ProductID», MODE=»664″, GROUP=»nut»

Если ваш ИБП использует для подключения RS232 (аля COM-порт), то создаем файл /lib/udev/rules.d/52_nut-serialups.rules содержащий:
# Ippon Back Power Pro 800
KERNEL==»ttyS0″, GROUP=»nut»

где ttyS0 — номер COM-порта к которому подключен ИБП (в данном случае COM1)

Далее для USB достаточно вынуть разъем из порта и снова воткнуть. А для COM-порта выполнить следующие команды или перезагрузить систему:
sudo udevadm control --reload_rules
sudo udevadm control trigger

3. Настройка NUT

NUT может управлять множеством ИБП в сети, но мы будем использовать простую конфигурацию для 1 компьютера. Для этого в файле /etc/nut/nut.conf выставим соответствующий режим:
MODE=standalone
В файле /etc/nut/ups.conf укажем параметры подключения к нашему ИБП:

Развернуть/свернуть скрытый текст.

[ippon-800]
driver = blazer_usb
port = auto
desc = «Ippon Back Power Pro 800»
default.battery.voltage.high = 13.60
default.battery.voltage.low = 10.60
offdelay = 6
ondelay = 7

где

  • [ippon-800] — имя нашего ИБП в системе NUT, оно может быть любым;
  • driver — имя драйвера для подключения к ИБП, смотрим его тут, для моего ИБП это blazer_usb и blazer_serial в зависимости от порта подключения;
  • port — имя файла порта, для USB можно просто «auto», для COM1-порта «/dev/ttyS0»
  • desc — комментарий;
  • default.battery.voltage.high — максимальное напряжение батареи при полном заряде, необходимо для расчета остаточного заряда батареи;
  • default.battery.voltage.low — минимальное напряжение батареи при полном разряде;
  • offdelay — команда ИБП перейти в режим ожидания через 6 минут

Далее в файле /etc/nut/upsd.conf мы пропишем контроль доступа:

Развернуть/свернуть скрытый текст.

ACL all 0.0.0.0/0
ACL localnet 192.168.1.0/24
ACL localhost 127.0.0.1/32
ACCEPT localhost localnet
REJECT all

Здесь мы разрешили подключение к службе для локального компьютера и локальной сети, и отвергли всех остальных. Кстати по умолчанию NUT слушает все интерфейсы по 3493 порту.

Далее заводим пользователей, которые могут контролировать ИБП в файле /etc/upsd.users:

Развернуть/свернуть скрытый текст.

[имя_пользователя]
password = пароль_пользователя
allowfrom = localnet
upsmon master
actions = SET
instcmds = ALL

где

  • allowfrom — параметр определяющий источник подключения;
  • upsmon master — параметр дающий права на управление ИБП.

И последнее, осталось настроить службу мониторинга в файле /etc/nut/upsmon.conf пишем:

Развернуть/свернуть скрытый текст.

RUN_AS_USER nut
MONITOR имя_ибп@localhost 1 имя_пользователя пароль_пользователя master
MINSUPPLIES 1
POWERDOWNFLAG /etc/killpower
SHUTDOWNCMD «sbin/shutdown -Ph +0»
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

где

  • SHUTDOWNCMD «sbin/shutdown -Ph +0» — команда на завершение работы компьютера.

Все. Теперь включив систему NUT командой:
sudo service nut start
можно запросить статус ИБП командой:
upsc имя_ибп
в ответ вам система выдать примерно следующее:

Развернуть/свернуть скрытый текст.

battery.charge: 100
battery.voltage: 13.60
battery.voltage.high: 13.60
battery.voltage.low: 10.60
battery.voltage.nominal: 12.0
beeper.status: enabled
device.type: ups
driver.name: blazer_usb
driver.parameter.offdelay: 6
driver.parameter.ondelay: 7
driver.parameter.pollinterval: 2
driver.parameter.port: auto
input.current.nominal: 3.0
input.frequency: 49.9
input.frequency.nominal: 50
input.voltage: 246.0
input.voltage.fault: 246.0
input.voltage.nominal: 220
output.voltage: 209.5
ups.delay.shutdown: 6
ups.delay.start: 420
ups.load: 41
ups.productid: 5161
ups.status: OL TRIM
ups.temperature: 25.0
ups.type: offline / line interactive

Далее если хочется смотреть в графике можно установить knutclient:
sudo apt-get install knutclient
После установки knutclient надо сконфигурировать Setting->Configure KNutClient->UPS->Add. Здесь пишем Имя — понятное вам имя ИБП; UPS адрес — имя машины с ИБП (в данном случае localhost); UPS имя — название ИБП в системе NUT; Имя пользователя — пользователь в системе NUT; Пароль — его пароль. Далее выбираем необходимые вам переменные или их все (те что ИБП не поддерживает, просто не будут отображаться) и нажимаем ОК.

И немного отсебятины.

  • Парсинг температуры в терминале: upsc ippon-bpp-800 | grep temperature | awk '{print $2}'
  • Парсинг уровня зарядки: upsc ippon-bpp-800 | grep charge | awk '{print $2}'
  • Строка конфига conky: Ippon Back Power Pro 800 заряжен на ${exec upsc ippon-bpp-800 | grep charge | awk ‘{print $2}’}% T=${exec upsc ippon-bpp-800 | grep temperature | awk ‘{print $2}’}

Quick steps to configure UPS on Debian 8 (jessie).

Connect UPS to Server⌗

  1. Recommended shutdown server and disable power before connect if it’s RS-232(COM port);
  2. Check correct device path from “dmesg” output;

Install⌗

  1. Required to install nut-client, nut-server
  2. For collecting data into RRD database we also need to install Collectd with NUT plugin;
sudo -i
aptitude update; aptitude install nut-client nut-server collectd
dpkg -l | egrep "nut-|collectd" | awk '{ if ($1=="ii"); print $3"t"$2}' 
5.4.1-6+deb8u1	collectd
5.4.1-6+deb8u1	collectd-core
5.4.1-6+deb8u1	collectd-utils
5.4.1-6+deb8u1	libcollectdclient1
2.7.2-4	nut-client
2.7.2-4	nut-server

Configure⌗

Configure NUT server — first.
If it will not work anything else — is not important :)
Check your serial port path and replace /dev/ttyS0 if it’s different.

cat >> /etc/nut/ups.conf << EOF
[ups]

        driver = blazer_ser
        port = /dev/ttyS0
        desc = "my server1 ups"
EOF

If you are using USB connection than change “driver” variable also with path.

Testing⌗

Testing NUT-server by starting plugin binary manually:

root@server:~# /lib/nut/blazer_ser -a ups 
Network UPS Tools - Megatec/Q1 protocol serial driver 1.56 (2.7.2)
Duplicate driver instance detected! Terminating other driver!
Supported UPS detected with megatec protocol
Vendor information unavailable
No values provided for battery high/low voltages in ups.conf

Using 'guestimation' (low: 10.400000, high: 13.000000)!
Battery runtime will not be calculated (runtimecal not set)

Data returned OK.
If you see error with connection — check file /dev/ttyS0 permissions.

ls -lah /dev/ttyS0 
crw-rw---- 1 root nut 4, 64 Nov 16 14:43 /dev/ttyS0

If after all you still see error — try different port.

Configure UPSD with minimal options:

echo "LISTEN 127.0.0.1 3493" >> /etc/nut/upsd.conf
service ups-monitor restart

Check UPSD is listening local interface only and is up:

$ netstat -tnlp | grep ups
tcp        0      0 127.0.0.1:3493          0.0.0.0:*               LISTEN      4585/upsd

Configure NUT client:

echo "MODE=standalone" >>  /etc/nut/nut.conf 

Testing⌗

Testing NUT-client connection to NUT-server

root@server:~# upsc ups
Init SSL without certificate database
battery.charge: 100
battery.voltage: 13.40
battery.voltage.high: 13.00
battery.voltage.low: 10.40
battery.voltage.nominal: 12.0
device.type: ups
driver.name: blazer_ser
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0
driver.version: 2.7.2
driver.version.internal: 1.56
input.current.nominal: 2.0
input.frequency: 49.9
input.frequency.nominal: 50
input.voltage: 222.3
input.voltage.fault: 221.8
input.voltage.nominal: 220
output.voltage: 222.3
ups.beeper.status: enabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 22
ups.status: OL
ups.temperature: 25.0
ups.type: offline / line interactive

Configure RRD database⌗

Let’s configure NUT plugin for collectd

cat >> /etc/collectd/collectd.conf.d/nut.conf << EOF
LoadPlugin nut
<Plugin nut>
        UPS "ups@localhost:3493"
</Plugin>
service collectd restart

Check new files created with RRD database data:

root@server:~# ls -1 /var/lib/collectd/rrd/server/nut-ups/
frequency-input.rrd
percent-charge.rrd
percent-load.rrd
temperature-ups.rrd
voltage-battery.rrd
voltage-input.rrd
voltage-output.rrd

Options about UPS actions can be checked here:

egrep -v "^#|^$" /etc/nut/upsmon.conf 
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

Now we can open this database using GUI or via web-collectd Frontend:

Additional Links⌗

  • Archwiki UPS APC
  • NUT official site
  • nut.conf details
  • ups.conf details
  • upsmon.conf details
  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • Hardware
  • [server] Connecting UPS Ippon Back Power Pro 500 USB to Ubuntu server 16.04

  1. Connecting UPS Ippon Back Power Pro 500 USB to Ubuntu server 16.04

    Hallo. I have a problem with UPS to Ubuntu server connection. Did by google answers. Installed a nut. Config files contents:nuf.conf
    MODE=standaloneupsd.conf
    LISTEN 127.0.0.1 3493upsd.users
    password = password
    actions = SET
    instcmds = ALL
    upsmon masterupsmon.conf
    RUN_AS_USER nut
    MONITOR ippon@localhost 1 user password master
    MINSUPPLIES 1
    NOTIFYCMD /sbin/upssched
    POLLFREQ 5
    POLLFREQALERT 5
    HOSTSYNC 15
    DEADTIME 15type and get:#lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 003: ID 4242:0008 USB Design by Example
    Bus 003 Device 004: ID 0665:5161 Cypress Semiconductor USB to Serial
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub#upsc ippon@localhost
    Init SSL without certificate database
    Error: Driver not connected#service nut-server status
    ● nut-server.service — LSB: Network UPS Tools initscript
    Loaded: loaded (/etc/init.d/nut-server; bad; vendor preset: enabled)
    Active: active (running) since Пн 2016-11-14 09:18:20 +07; 25min ago
    Docs: man:systemd-sysv-generator(
    Process: 12519 ExecStop=/etc/init.d/nut-server stop (code=exited, status=0/SUC
    Process: 12528 ExecStart=/etc/init.d/nut-server start (code=exited, status=0/S
    Tasks: 1
    Memory: 436.0K
    CPU: 90ms
    CGroup: /system.slice/nut-server.service
    └─12539 /lib/nut/upsdноя 14 09:18:20 shubuntuServer upsd[12538]: Can’t connect to UPS [ippon] (blazer
    ноя 14 09:18:20 shubuntuServer upsd[12539]: Startup successful
    ноя 14 09:18:20 shubuntuServer nut-server[12528]: …done.
    ноя 14 09:18:20 shubuntuServer systemd[1]: Started LSB: Network UPS Tools initsc
    ноя 14 09:18:26 shubuntuServer upsd[12539]: User user@127.0.0.1logged into UPS [ippon]
    ноя 14 09:23:20 shubuntuServer upsd[12539]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    ноя 14 09:28:20 shubuntuServer upsd[12539]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    ноя 14 09:33:20 shubuntuServer upsd[12539]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    ноя 14 09:38:21 shubuntuServer upsd[12539]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    ноя 14 09:43:21 shubuntuServer upsd[12539]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    lines 1-22/22 (END)
    ● nut-server.service — LSB: Network UPS Tools initscript
    Loaded: loaded (/etc/init.d/nut-server; bad; vendor preset: enabled)
    Active: active (running) since Пн 2016-11-14 09:18:20 +07; 25min ago
    Docs: man:systemd-sysv-generator(
    Process: 12519 ExecStop=/etc/init.d/nut-server stop (code=exited, status=0/SUCCESS)
    Process: 12528 ExecStart=/etc/init.d/nut-server start (code=exited, status=0/SUCCESS)
    Tasks: 1
    Memory: 436.0K
    CPU: 90ms
    CGroup: /system.slice/nut-server.service
    └─12539 /lib/nut/upsdноя 14 09:18:20 shubuntuServer upsd[12538]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    ноя 14 09:18:20 shubuntuServer upsd[12539]: Startup successful
    ноя 14 09:18:20 shubuntuServer nut-server[12528]: …done.
    ноя 14 09:18:20 shubuntuServer systemd[1]: Started LSB: Network UPS Tools initscript.
    ноя 14 09:18:26 shubuntuServer upsd[12539]: User user@127.0.0.1 logged into UPS [ippon]
    ноя 14 09:23:20 shubuntuServer upsd[12539]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    ноя 14 09:28:20 shubuntuServer upsd[12539]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    ноя 14 09:33:20 shubuntuServer upsd[12539]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    ноя 14 09:38:21 shubuntuServer upsd[12539]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    ноя 14 09:43:21 shubuntuServer upsd[12539]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory

    # service nut-server restart
    # service nut-server status
    ● nut-server.service — LSB: Network UPS Tools initscript
    Loaded: loaded (/etc/init.d/nut-server; bad; vendor preset: enabled)
    Active: active (running) since Пн 2016-11-14 09:44:31 +07; 3s ago
    Docs: man:systemd-sysv-generator(
    Process: 13407 ExecStop=/etc/init.d/nut-server stop (code=exited, status=0/SUCCESS)
    Process: 13416 ExecStart=/etc/init.d/nut-server start (code=exited, status=0/SUCCESS)
    Tasks: 1
    Memory: 440.0K
    CPU: 24ms
    CGroup: /system.slice/nut-server.service
    └─13426 /lib/nut/upsdноя 14 09:44:31 shubuntuServer systemd[1]: Starting LSB: Network UPS Tools initscript…
    ноя 14 09:44:31 shubuntuServer nut-server[13416]: * Starting NUT — power devices information server and drivers
    ноя 14 09:44:31 shubuntuServer upsd[13425]: listening on 127.0.0.1 port 3493
    ноя 14 09:44:31 shubuntuServer upsd[13425]: Can’t connect to UPS [ippon] (blazer_usb-ippon): No such file or directory
    ноя 14 09:44:31 shubuntuServer upsd[13426]: Startup successful
    ноя 14 09:44:31 shubuntuServer nut-server[13416]: …done.
    ноя 14 09:44:31 shubuntuServer systemd[1]: Started LSB: Network UPS Tools initscript./lib/nut/blazer_usb file presents. Sometimes get a message : Broadcast from nut@shubuntuServer (UPS ippon@localhost is unavailableI tried to do the same with another UPS different model, but with the same connection chip, and got same results.
    What i do wrong?
    What means user@127.0.0.1?
    One user registered in system.
    What is a blazer_usb-ippon file, and where i can find it?
    In system Thank you in advance.

    Last edited by shindax; November 16th, 2016 at 10:25 AM.


Bookmarks

Bookmarks


Posting Permissions


    • #1

    How do I know my PowerWalker VI 650 UPS is working (monitoring and shutting down) without taking the mains power off?

    Output of upsdrvctrl start:


    Zitat

    root@openmediavault:~# upsdrvctl start
    Network UPS Tools — UPS driver controller 2.7.2
    Network UPS Tools — Generic HID driver 0.38 (2.7.2)
    USB communication driver 0.32
    Duplicate driver instance detected! Terminating other driver!
    Using subdriver: Liebert HID 0.3

    Alles anzeigen

    Driver:


    Zitat

    [Powerwalker]
    driver = usbhid-ups
    port = auto
    pollinterval = 10
    desc = «Powerwalker UPS»

    output of upsmon.conf


    Zitat

    MONITOR ups@localhost 1 monmaster 4204abeb4098fd935d745459006f1fbe master
    MINSUPPLIES 1
    SHUTDOWNCMD «/sbin/shutdown -h +0»
    NOTIFYCMD «/sbin/upssched»
    POLLFREQ 5
    POLLFREQALERT 5
    HOSTSYNC 15
    DEADTIME 15
    POWERDOWNFLAG /etc/killpower
    NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
    NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
    NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC
    NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC
    NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC
    NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC
    NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC
    NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC
    NOTIFYFLAG FSD SYSLOG+WALL+EXEC
    RBWARNTIME 43200

    Alles anzeigen

    Output of upsc ups


    Zitat

    Init SSL without certificate database
    Error: Unknown UPS

    In the web interface SYSLOG it shows:


    Zitat

    upsmon [16993]: Poll UPS [ups@localhost]failed — [ups] does not exist on server localhost

    This is happening on each poll, which makes me uncertain the UPS is being monitored correctly…

    • #2

    Okay update 23/11/2017:

    finally tested the UPS, removed mains and it kept both servers up and running. However it did not start shutting the attached OMV NAS down as it should have done..

    Any ideas anyone?

    • #3

    Could you please post your nut-plugin settings here? It is possible to configure the shutdown

    • … by a fixed amount of time e.g 10 min = 600s
    • … dependent of the charging level of the battery.

    Which one do you have choosen?

    I have tested my UPS by disconnecting the power line of the UPS, while the mains of the NAS was not connected to the UPS but to the normal outlet. Therefore there is no danger for the NAS while playing with the UPS settings. Nevertheless the shutdown procedure can be tested even so.

    • #4

    How do I know my PowerWalker VI 650 UPS is working (monitoring and shutting down) without taking the mains power off?

    Impossible. You need to test this. Especially if you’ve not already collected some experiences with these things and know how ‘funny’ they can behave.

    finally tested the UPS, removed mains and it kept both servers up and running. However it did not start shutting the attached OMV NAS down as it should have done..

    That means you have to redo the test again and this time also try out what happens if you connect your UPS to mains again (I’ve seen UPS then stopping to provide power to the connected devices not just once). And of course you need to figure out how to establish monitoring and test through this also a few times.

    Looking back at the last 25 years of dealing with servers the ‘UPS was the problem’ vs. ‘without UPS we would’ve run into a problem’ ratio is 4:1 or even 5:1 (but in this area/city we have a blackout only every few years).

    Personal learnings:

    • if it’s about uninterrupted operation dual PSUs are mandatory (one connected to mains, the other to the UPS). Dual PSUs with own sensors are to be preferred (since then the server monitors what’s happening — ipmitool and friends — and can act on accordingly even if the UPS decided to cut power while still sending nothing suspicious via USB or serial)
    • Use of filesystems that can cope with interruptions (CoW) whenever possible (that’s ZFS in almost all installations now)

Понравилась статья? Поделить с друзьями:
  • Indesit iwsb 5105 ошибка h20
  • Indesit iwsb 5105 ошибка f01
  • Indesit iwsb 5105 коды ошибок
  • Init failed mux thread как исправить
  • Indesit iwsb 5085 ошибка f01