Log.labels.unavailable

WB6.6 обновлен до текущей версии wb-2310

root@wirenboard-AHDPBCQU:~# wb-release
Wirenboard release wb-2310 (as stable), target wb6/bullseye

Хотя в Вебинтерфейсе отображается как 2207 по-прежнему
image

Вопрос в том, какой сервис проверить, чтобы возобновить работу Системного журнала в WebUI?

root@wirenboard-AHDPBCQU:~# systemctl status wb-diag-collect
● wb-diag-collect.service - one-click diagnostic data collector for Wiren Board, generating archive with data
     Loaded: loaded (/lib/systemd/system/wb-diag-collect.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-12-11 22:05:54 MSK; 15h ago
   Main PID: 2139 (wb-diag-collect)
      Tasks: 2 (limit: 1146)
     Memory: 7.2M
        CPU: 32.573s
     CGroup: /system.slice/wb-diag-collect.service
             └─2139 /usr/bin/python3 /usr/bin/wb-diag-collect -s diag_archive

Dec 11 22:05:54 wirenboard-AHDPBCQU systemd[1]: Started one-click diagnostic data collector for Wiren Board, generating archive with data.

С сервисом сканирования похожая ситуация.
Возможно это связанные вещи?

Добрый день.
Покажите пожалуйста статус mosquitto.
Ну и выгрузите диагностический архив командой wb-diag-collect wb_diag

root@wirenboard-AHDPBCQU:~# systemctl status mosquitto
● mosquitto.service - Mosquitto MQTT Broker
     Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-12-12 13:49:09 MSK; 2h 5min ago
       Docs: man:mosquitto.conf(5)
             man:mosquitto(8)
    Process: 27940 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
    Process: 27941 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exited, status=0/SUCCESS)
    Process: 27942 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited, status=0/SUCCESS)
    Process: 27943 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited, status=0/SUCCESS)
   Main PID: 27944 (mosquitto)
      Tasks: 1 (limit: 1146)
     Memory: 3.7M
        CPU: 5min 15.022s
     CGroup: /system.slice/mosquitto.service
             └─27944 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Dec 12 15:19:12 wirenboard-AHDPBCQU mosquitto[27944]: 1702383551: Error: Permission denied.
Dec 12 15:32:15 wirenboard-AHDPBCQU mosquitto[27944]: 1702384335: Client wb-mqtt-homeui-pmPt9Yn2VL closed its connection.
Dec 12 15:33:08 wirenboard-AHDPBCQU mosquitto[27944]: 1702384388: Client wb-mqtt-homeui-YwtSHG2QwV closed its connection.
Dec 12 15:34:14 wirenboard-AHDPBCQU mosquitto[27944]: 1702384454: Client wb-mqtt-homeui-QzMRJBLudn closed its connection.
Dec 12 15:46:13 wirenboard-AHDPBCQU mosquitto[27944]: 1702385173: New client connected from ::ffff:10.8.1.98:64616 as wb-mqtt-homeui-YwtSHG2QwV (p2, c1, k60, u'root').
Dec 12 15:49:12 wirenboard-AHDPBCQU mosquitto[27944]: 1702385352: Saving in-memory database to /var/lib/mosquitto//mosquitto.db.
Dec 12 15:49:12 wirenboard-AHDPBCQU mosquitto[27944]: 1702385352: Error saving in-memory database, unable to open /var/lib/mosquitto//mosquitto.db.new for writing.
Dec 12 15:49:12 wirenboard-AHDPBCQU mosquitto[27944]: 1702385352: Error: Permission denied.
Dec 12 15:50:57 wirenboard-AHDPBCQU mosquitto[27944]: 1702385457: Client wb-mqtt-homeui-YwtSHG2QwV closed its connection.
Dec 12 15:52:20 wirenboard-AHDPBCQU mosquitto[27944]: 1702385540: New client connected from ::ffff:10.8.1.98:64764 as wb-mqtt-homeui-YwtSHG2QwV (p2, c1, k60, u'root').
lines 3-26/26 (END)
root@wirenboard-AHDPBCQU:~# wb-diag-collect wb_diag
Start data collecting
2023-12-12 15:56:08,245 [WARNING] No files for wildcard /var/log/z-way-server.log
2023-12-12 15:56:08,296 [WARNING] No files for wildcard /var/log/mosquitto/mosquitto.log
2023-12-12 15:56:08,668 [WARNING] No files for wildcard /mnt/data/.wb-restore/wb-console.log
2023-12-12 15:56:16,367 [WARNING] Command systemctl list-unit-files --all --output=json didn't finish in 5s
2023-12-12 15:56:27,949 [WARNING] Command emmcparm -I /dev/mmcblk0 didn't finish in 5s
2023-12-12 15:56:33,358 [WARNING] Command wb-gen-serial -s didn't finish in 5s
2023-12-12 15:56:38,443 [WARNING] Command mqtt-get-dump "\$SYS/#" didn't finish in 5s
Data was collected successfully

Не пойму, ничего не собрал что-ли?

В том же каталоге, файл, архив с именем wb_diag_XXXXXXX_2023-12-12-15.05.52.zip
где XXXXX - номер контроллера, ну и дата создания архива.

приложен диагностический архив, доступен только сотрудникам поддержки
(222,5 КБ)

Все ж я вижу:

Dec 11 22:11:04 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: WARNING: [mqtt] connection lost
Dec 11 22:11:05 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] connection estabilished with code "0" <success>
Dec 11 22:11:05 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] subscription succeeded (message id 7)
Dec 11 22:11:05 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] subscription succeeded (message id 8)
Dec 11 22:11:06 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] subscription succeeded (message id 9)
Dec 11 22:16:41 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: WARNING: [mqtt] connection lost
Dec 11 22:16:42 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] connection estabilished with code "0" <success>
Dec 11 22:16:42 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] subscription succeeded (message id 10)
Dec 11 22:16:42 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] subscription succeeded (message id 11)
Dec 11 22:16:42 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] subscription succeeded (message id 12)
Dec 12 13:49:08 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: WARNING: [mqtt] connection lost
Dec 12 13:49:09 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] connection estabilished with code "0" <success>
Dec 12 13:49:09 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] subscription succeeded (message id 13)
Dec 12 13:49:09 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] subscription succeeded (message id 14)
Dec 12 13:49:09 wirenboard-AHDPBCQU wb-mqtt-logs[2178]: INFO: [mqtt] subscription succeeded (message id 15

Выключите пожалуйста persistence в конфиге mosquitto.

persistence false установлен
mosquitto перезагружен

root@wirenboard-AHDPBCQU:~# systemctl status mosquitto
● mosquitto.service - Mosquitto MQTT Broker
     Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2023-12-13 07:53:04 MSK; 1min 40s ago
       Docs: man:mosquitto.conf(5)
             man:mosquitto(8)
    Process: 30674 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
    Process: 30675 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exited, status=0/SUCCESS)
    Process: 30676 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited, status=0/SUCCESS)
    Process: 30677 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited, status=0/SUCCESS)
   Main PID: 30678 (mosquitto)
      Tasks: 1 (limit: 1146)
     Memory: 1.6M
        CPU: 4.328s
     CGroup: /system.slice/mosquitto.service
             └─30678 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Dec 13 07:53:04 wirenboard-AHDPBCQU mosquitto[30678]: 1702443184: New client connected from /var/run/mosquitto/mosquitto.sock:0 as wb-modbus (p2, c0, k60).
Dec 13 07:53:04 wirenboard-AHDPBCQU mosquitto[30678]: 1702443184: New connection from /var/run/mosquitto/mosquitto.sock:0 on port 0.
Dec 13 07:53:04 wirenboard-AHDPBCQU mosquitto[30678]: 1702443184: New connection from /var/run/mosquitto/mosquitto.sock:0 on port 0.
Dec 13 07:53:04 wirenboard-AHDPBCQU mosquitto[30678]: 1702443184: New client connected from /var/run/mosquitto/mosquitto.sock:0 as rules-wirenboard-AHDPBCQU-2231 (p2, c1, k30).
Dec 13 07:53:04 wirenboard-AHDPBCQU mosquitto[30678]: 1702443184: New client connected from /var/run/mosquitto/mosquitto.sock:0 as confed-wirenboard-AHDPBCQU-2148 (p2, c1, k30).
Dec 13 07:53:04 wirenboard-AHDPBCQU mosquitto[30678]: 1702443184: New connection from /var/run/mosquitto/mosquitto.sock:0 on port 0.
Dec 13 07:53:04 wirenboard-AHDPBCQU mosquitto[30678]: 1702443184: New client connected from /var/run/mosquitto/mosquitto.sock:0 as wb-rules-engine-wirenboard-AHDPBCQU-2231 (p2, c1, k30).
Dec 13 07:53:04 wirenboard-AHDPBCQU mosquitto[30678]: 1702443184: New client connected from ::ffff:10.8.1.98:50156 as wb-mqtt-homeui-MopRVbJlPw (p2, c1, k60, u’root’).
Dec 13 07:53:08 wirenboard-AHDPBCQU mosquitto[30678]: 1702443188: New client connected from ::ffff:10.8.1.98:50158 as wb-mqtt-homeui-QzMRJBLudn (p2, c1, k60, u’root’).
Dec 13 07:54:07 wirenboard-AHDPBCQU mosquitto[30678]: 1702443247: New client connected from ::ffff:10.8.1.98:50165 as wb-mqtt-homeui-pUKk5K849j (p2, c1, k60, u’root’).
lines 3-26/26 (END)

Системный журнал пока не загружается

приложен диагностический архив, доступен только сотрудникам поддержки
(224,0 КБ)

Опять вижу что сервис wb-mqtt-logs пробует запуститься - но, похоже что есть гонка в процессе запуска.
Выполните

systemctl restart wb-mqtt-logs

И проверьте - запустился ли он.
Ну и если запущен - то работает ли из web-интерфейса. Если да - скорее всего моя гипотеза верна.
И выложите файл /lib/systemd/system/wb-mqtt-logs.service пожалуйста.

root@wirenboard-AHDPBCQU:~# systemctl restart wb-mqtt-logs
root@wirenboard-AHDPBCQU
root@wirenboard-AHDPBCQU:~# systemctl status wb-mqtt-logs
● wb-mqtt-logs.service - Wiren Board journald to MQTT gateway
     Loaded: loaded (/lib/systemd/system/wb-mqtt-logs.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2023-12-13 11:26:33 MSK; 19s ago
   Main PID: 10945 (wb-logs main)
      Tasks: 5 (limit: 1146)
     Memory: 1.9M
        CPU: 151ms
     CGroup: /system.slice/wb-mqtt-logs.service
             └─10945 /usr/bin/wb-mqtt-logs

Dec 13 11:26:33 wirenboard-AHDPBCQU systemd[1]: Started Wiren Board journald to MQTT gateway.
Dec 13 11:26:33 wirenboard-AHDPBCQU wb-mqtt-logs[10945]: MQTT broker localhost:1883
Dec 13 11:26:33 wirenboard-AHDPBCQU wb-mqtt-logs[10945]: INFO: [mqtt] Default host and port detected, checking if UNIX socket exists on /var/run/mosquitto/mosquitto.sock
Dec 13 11:26:33 wirenboard-AHDPBCQU wb-mqtt-logs[10945]: INFO: [mqtt] UNIX socket exists, using it for connection
Dec 13 11:26:34 wirenboard-AHDPBCQU wb-mqtt-logs[10945]: INFO: [mqtt] connection estabilished with code "0" <success>
Dec 13 11:26:34 wirenboard-AHDPBCQU wb-mqtt-logs[10945]: INFO: [mqtt] subscription succeeded (message id 1)
Dec 13 11:26:34 wirenboard-AHDPBCQU wb-mqtt-logs[10945]: INFO: [mqtt] subscription succeeded (message id 2)
Dec 13 11:26:34 wirenboard-AHDPBCQU wb-mqtt-logs[10945]: INFO: [mqtt] subscription succeeded (message id 3)

Запустился


wb-mqtt-logs.service (225 байтов)

RestartSec=1

Замените на

RestartSec=15

и проверьте перезапуском.

Отлично! Спасибо огромное - буду анализировать теперь что мы делали

В таком виде Системный журнал после reboot тоже работает
И Сканирование запустилось!

Можно ли установить persistence true?
Без него важные данные от Иридиума теряются…

Да, но проверьте права на каталог и на сам файл - похоже они при обновлении изменились.

И мы воспроизведем поведение и, скорей всего исправления добавим.

Файл mosquitto.db:
image

Папка /var/lib/mosquitto/
image

Или про этот файл?
mosquitto.conf
image
Папка
etc/mosquitto/
image

Я про каталог БД persistence.
И права должны стоять такие, рекурсивно:

ls -l /var/lib/mosquitto 
lrwxrwxrwx 1 root 1000 27 Jan  1  2020 /var/lib/mosquitto -> /mnt/data/var/lib/mosquitto

Проверил остальные сервисы, тоже все пришло в норму.
После восстановления persistence топики Иридиума тоже вернулись!
Было опасение, что потерял их совсем, а там штук 30 json’ов с расписаниями.
Хороший опыт, того что нужно еще в PersistentStorage писать, а не на Mosquitto полагаться.

Сейчас аналогично

lrwxrwxrwx 1 root 1000 27 Dec 11 14:17 /var/lib/mosquitto → /mnt/data/var/lib/mosquitto

1 Like