Веб интерфейс не может подключиться к MQTT

Добрый день!
Возможно есть очевидное решение, но к сожалению опыт работы с WB небольшой.
В веб интерфейсе статус “Отключено
До этого установил пароль по инструкции из вики. В настройках установил порт: 80
В настройках 10listeners.conf:

# This file should be used to define external mosquitto listeners
# (which are not used by internal services).


# Default MQTT port listener.
#
# It allows anonymous listeners by default to be compatible with
# old Wiren Board mosquitto configuration.
#
# It is recommended to add password authentication and TLS for security.
listener 1883
allow_anonymous true
acl_file /etc/mosquitto/acl/default.conf
password_file /etc/mosquitto/passwd/default.conf


# Default Websockets listener.
#
# It is used by Wiren Board Web interface.
#
# It allows anonymous listeners by default to be compatible with
# old Wiren Board mosquitto configuration.
#
# It is recommended to add password authentication for security.
listener 18883
protocol websockets
allow_anonymous true
acl_file /etc/mosquitto/acl/default.conf
password_file /etc/mosquitto/passwd/default.conf

Для проверки выполните на компьютере:

telnet 10.0.0.78 18883
Trying 10.0.0.78...
Connected to 10.0.0.78.
Escape character is '^]'.
fwerf
HTTP/1.0 403 Forbidden
content-type: text/html
content-length: 173

<html><head><meta charset=utf-8 http-equiv="Content-Language" content="en"/><link rel="stylesheet" type="text/css" href="/error.css"/></head><body><h1>403</h1></body></html>Connection closed by foreign host.

сменив адрес на свой.
Цель - проверить соединяется ли на указанный в listner порт.
Ну , собственно, как настроен порт mqtt в веб-интерфейсе?

В веб интерфейсе пробовал порты 18883 и 80, без результата. Telnet на порту 18883 не подключается. В другой теме видел команду: netstat -nvl |grep 883

root@wirenboard-AETEOKJB:~# netstat -nvl |grep 883
netstat: no support for `AF INET (sctp)' on this system.
netstat: no support for `AF INET (sctp)' on this system.
netstat: no support for `AF IPX' on this system.
netstat: no support for `AF AX25' on this system.
netstat: no support for `AF X25' on this system.
netstat: no support for `AF NETROM' on this system.
netstat: no support for `AF ROSE' on this system.
tcp        0      0 0.0.0.0:1883            0.0.0.0:*               LISTEN     
tcp6       0      0 :::1883                 :::*                    LISTEN 

ws порт явно не слушается, снова проверьте конфиг mosquitto - и налие в его логе “Opening websockets listen socket on port 18883” при запуске.

Нашел файл /etc/mosquitto/mosquitto.conf
Там был указан порт 1883, добавил еще 18883

# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

#Turn on port listening
listener 1883
listener 18883
#Disable anonomous login:
allow_anonymous true
#Password file:
password_file /etc/mosquitto/mosquitto.pwd

После чего netstat -nvl |grep 883 показал:

root@wirenboard-AETEOKJB:~# netstat -nvl |grep 883
netstat: no support for `AF INET (sctp)' on this system.
netstat: no support for `AF INET (sctp)' on this system.
tcp        0      0 0.0.0.0:1883            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:18883           0.0.0.0:*               LISTEN     
tcp6       0      0 :::1883                 :::*                    LISTEN     
tcp6       0      0 :::18883                :::*                    LISTEN  

Но в веб интерфейсе по прежнему отключено.
Лог можно посмотреть через Debug порт при старте ?

Но это websocket ведь.

Нет, проще всего перезапустить брокер и в /var/log/mosquitto/mosquitto.log посмотреть.

Нет, в актуальных (2304, 2307) релизах все listner перечислены в /etc/mosquitto/conf.d/10listeners.conf

Вернул к первоначальным значениям mosquitto.conf
Значение файла 10listeners.conf сейчас такие:

Файл 10listeners.conf
# This file should be used to define external mosquitto listeners
# (which are not used by internal services).


# Default MQTT port listener.
#
# It allows anonymous listeners by default to be compatible with
# old Wiren Board mosquitto configuration.
#
# It is recommended to add password authentication and TLS for security.
listener 1883
allow_anonymous true
acl_file /etc/mosquitto/acl/default.conf
password_file /etc/mosquitto/passwd/default.conf


# Default Websockets listener.
#
# It is used by Wiren Board Web interface.
#
# It allows anonymous listeners by default to be compatible with
# old Wiren Board mosquitto configuration.
#
# It is recommended to add password authentication for security.
listener 18883
protocol websockets
allow_anonymous true
acl_file /etc/mosquitto/acl/default.conf
password_file /etc/mosquitto/passwd/default.conf

Лог после запуска скопировал на PasteBin

А что в этом логе отновится к брокеру?
Работает (отвечает) ли сейчас websocket порт 18883?

Лог после старта брокера:

Лог Mosquitto
Oct 04 14:04:37 wirenboard-AETEOKJB systemd[1]: Starting Mosquitto MQTT Broker...
Oct 04 14:04:37 wirenboard-AETEOKJB mosquitto[10031]: 1696417477: mosquitto version 2.0.11 starting
Oct 04 14:04:37 wirenboard-AETEOKJB mosquitto[10031]: 1696417477: Config loaded from /etc/mosquitto/mosquitto.conf.
Oct 04 14:04:37 wirenboard-AETEOKJB mosquitto[10031]: 1696417477: Opening ipv4 listen socket on port 1883.
Oct 04 14:04:37 wirenboard-AETEOKJB mosquitto[10031]: 1696417477: Opening ipv6 listen socket on port 1883.
Oct 04 14:04:37 wirenboard-AETEOKJB mosquitto[10031]: 1696417477: Opening ipv4 listen socket on port 18883.
Oct 04 14:04:37 wirenboard-AETEOKJB mosquitto[10031]: 1696417477: Opening ipv6 listen socket on port 18883.
Oct 04 14:04:37 wirenboard-AETEOKJB mosquitto[10031]: 1696417477: mosquitto version 2.0.11 running
Oct 04 14:04:37 wirenboard-AETEOKJB systemd[1]: Started Mosquitto MQTT Broker.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New connection from 127.0.0.1:41428 on port 1883.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New connection from 127.0.0.1:41430 on port 1883.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New connection from 127.0.0.1:41426 on port 1883.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New connection from 127.0.0.1:41438 on port 1883.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New connection from 127.0.0.1:41440 on port 1883.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New connection from 127.0.0.1:41442 on port 1883.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New connection from 127.0.0.1:41444 on port 1883.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New client connected from 127.0.0.1:41428 as wb-mqtt-opcua (p2, c0, k60).
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New client connected from 127.0.0.1:41430 as wb-mqtt-db (p2, c0, k60).
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New client connected from 127.0.0.1:41426 as wb-modbus (p2, c0, k60).
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New client connected from 127.0.0.1:41438 as wb-mqtt-logs (p2, c0, k60).
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New client connected from 127.0.0.1:41440 as wb-mqtt-knx (p2, c0, k60).
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New client connected from 127.0.0.1:41442 as wb-w1 (p2, c0, k60).
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New client connected from 127.0.0.1:41444 as wb-adc (p2, c0, k60).
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New connection from 127.0.0.1:41448 on port 1883.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New client connected from 127.0.0.1:41448 as wb-gpio (p2, c0, k60).
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New connection from 192.168.0.38:53608 on port 18883.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New connection from 192.168.0.16:43908 on port 1883.
Oct 04 14:04:38 wirenboard-AETEOKJB mosquitto[10031]: 1696417478: New client connected from 192.168.0.16:43908 as netty-mqtt/PwlTxhaZ (p1, c1, >
Oct 04 14:04:41 wirenboard-AETEOKJB mosquitto[10031]: 1696417481: New connection from 192.168.0.38:53617 on port 18883.
Oct 04 14:04:41 wirenboard-AETEOKJB mosquitto[10031]: 1696417481: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:42 wirenboard-AETEOKJB mosquitto[10031]: 1696417482: New connection from 192.168.0.38:53621 on port 18883.
Oct 04 14:04:42 wirenboard-AETEOKJB mosquitto[10031]: 1696417482: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:41 wirenboard-AETEOKJB mosquitto[10031]: 1696417481: New connection from 192.168.0.38:53617 on port 18883.
Oct 04 14:04:41 wirenboard-AETEOKJB mosquitto[10031]: 1696417481: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:42 wirenboard-AETEOKJB mosquitto[10031]: 1696417482: New connection from 192.168.0.38:53621 on port 18883.
Oct 04 14:04:42 wirenboard-AETEOKJB mosquitto[10031]: 1696417482: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:44 wirenboard-AETEOKJB mosquitto[10031]: 1696417484: New connection from ::1:52516 on port 18883.
Oct 04 14:04:44 wirenboard-AETEOKJB mosquitto[10031]: 1696417484: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:44 wirenboard-AETEOKJB mosquitto[10031]: 1696417484: New connection from 127.0.0.1:50592 on port 18883.
Oct 04 14:04:44 wirenboard-AETEOKJB mosquitto[10031]: 1696417484: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:45 wirenboard-AETEOKJB mosquitto[10031]: 1696417485: New connection from 192.168.0.38:53626 on port 18883.
Oct 04 14:04:45 wirenboard-AETEOKJB mosquitto[10031]: 1696417485: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:47 wirenboard-AETEOKJB mosquitto[10031]: 1696417487: New connection from 192.168.0.38:53639 on port 18883.
Oct 04 14:04:47 wirenboard-AETEOKJB mosquitto[10031]: 1696417487: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:49 wirenboard-AETEOKJB mosquitto[10031]: 1696417489: New connection from ::1:42878 on port 1883.
Oct 04 14:04:49 wirenboard-AETEOKJB mosquitto[10031]: 1696417489: New client connected from ::1:42878 as confed-wirenboard-AETEOKJB-3667 (p2, c>Oct 04 14:04:49 wirenboard-AETEOKJB mosquitto[10031]: 1696417489: New connection from ::1:42880 on port 1883.
Oct 04 14:04:49 wirenboard-AETEOKJB mosquitto[10031]: 1696417489: New connection from ::1:42882 on port 1883.
Oct 04 14:04:49 wirenboard-AETEOKJB mosquitto[10031]: 1696417489: New client connected from ::1:42880 as rules-wirenboard-AETEOKJB-3718 (p2, c1>Oct 04 14:04:49 wirenboard-AETEOKJB mosquitto[10031]: 1696417489: New client connected from ::1:42882 as wb-rules-engine-wirenboard-AETEOKJB-37>Oct 04 14:04:49 wirenboard-AETEOKJB mosquitto[10031]: 1696417489: New connection from 192.168.0.38:53641 on port 18883.
Oct 04 14:04:49 wirenboard-AETEOKJB mosquitto[10031]: 1696417489: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:52 wirenboard-AETEOKJB mosquitto[10031]: 1696417492: New connection from 192.168.0.38:53647 on port 18883.
Oct 04 14:04:52 wirenboard-AETEOKJB mosquitto[10031]: 1696417492: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:54 wirenboard-AETEOKJB mosquitto[10031]: 1696417494: New connection from 192.168.0.38:53655 on port 18883.
Oct 04 14:04:54 wirenboard-AETEOKJB mosquitto[10031]: 1696417494: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:54 wirenboard-AETEOKJB mosquitto[10031]: 1696417494: New connection from 192.168.0.38:53657 on port 18883.
Oct 04 14:04:54 wirenboard-AETEOKJB mosquitto[10031]: 1696417494: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:54 wirenboard-AETEOKJB mosquitto[10031]: 1696417494: New connection from 192.168.0.38:53658 on port 18883.
Oct 04 14:04:54 wirenboard-AETEOKJB mosquitto[10031]: 1696417494: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:56 wirenboard-AETEOKJB mosquitto[10031]: 1696417496: New connection from 192.168.0.38:53663 on port 18883.
Oct 04 14:04:56 wirenboard-AETEOKJB mosquitto[10031]: 1696417496: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:56 wirenboard-AETEOKJB mosquitto[10031]: 1696417496: New connection from 192.168.0.38:53665 on port 18883.
Oct 04 14:04:56 wirenboard-AETEOKJB mosquitto[10031]: 1696417496: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:58 wirenboard-AETEOKJB mosquitto[10031]: 1696417498: New connection from 192.168.0.38:53668 on port 18883.
Oct 04 14:04:58 wirenboard-AETEOKJB mosquitto[10031]: 1696417498: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:58 wirenboard-AETEOKJB mosquitto[10031]: 1696417498: New connection from 192.168.0.38:53670 on port 18883.
Oct 04 14:04:58 wirenboard-AETEOKJB mosquitto[10031]: 1696417498: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:58 wirenboard-AETEOKJB mosquitto[10031]: 1696417498: New connection from ::1:52538 on port 18883.
Oct 04 14:04:58 wirenboard-AETEOKJB mosquitto[10031]: 1696417498: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:58 wirenboard-AETEOKJB mosquitto[10031]: 1696417498: New connection from 127.0.0.1:50614 on port 18883.
Oct 04 14:04:58 wirenboard-AETEOKJB mosquitto[10031]: 1696417498: Client <unknown> disconnected due to protocol error.
Oct 04 14:04:59 wirenboard-AETEOKJB mosquitto[10031]: 1696417499: New connection from 192.168.0.38:53672 on port 18883.
Oct 04 14:04:59 wirenboard-AETEOKJB mosquitto[10031]: 1696417499: Client <unknown> disconnected due to protocol error.
Oct 04 14:05:00 wirenboard-AETEOKJB mosquitto[10031]: 1696417500: New connection from 192.168.0.38:53680 on port 18883.
Oct 04 14:05:00 wirenboard-AETEOKJB mosquitto[10031]: 1696417500: Client <unknown> disconnected due to protocol error.
Oct 04 14:05:00 wirenboard-AETEOKJB mosquitto[10031]: 1696417500: New connection from 192.168.0.38:53681 on port 18883.
Oct 04 14:05:00 wirenboard-AETEOKJB mosquitto[10031]: 1696417500: Client <unknown> disconnected due to protocol error.

Скриншот браузера:

Удалил по инструкции пароль на веб интерфейс, поэтому порт на скриншоте 18883, по 80 так же не хочет подключаться.

Обратите внимание:

Oct 04 11:44:53 wirenboard-AWI3MCGC systemd[1]: Starting Mosquitto MQTT Broker...
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: Loading config file /etc/mosquitto/conf.d/00default_listener.conf
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: Loading config file /etc/mosquitto/conf.d/10listeners.conf
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: Loading config file /etc/mosquitto/conf.d/20bridges.conf
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: Loading config file /etc/mosquitto/conf.d/30limits.conf
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: mosquitto version 2.0.11 starting
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: Config loaded from /etc/mosquitto/mosquitto.conf.
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: Opening unix listen socket on path /var/run/mosquitto/mosquitto.sock.
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: Opening ipv4 listen socket on port 1883.
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: Opening ipv6 listen socket on port 1883.
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: Opening websockets listen socket on port 18883.
Oct 04 11:44:53 wirenboard-AWI3MCGC mosquitto[4182]: 1696419893: mosquitto version 2.0.11 running

А именно открывается именно websocket. У вас в логе - обычный.
Есть ли где-то еще в конфигах описание порта 18883?

Забыл убрать из файла mosquitto.conf listener 18883. Сейчас убрал, но в логах по прежнему не стартует 18883

Oct 04 17:21:16 wirenboard-AETEOKJB systemd[1]: Starting Mosquitto MQTT Broker...
Oct 04 17:21:16 wirenboard-AETEOKJB mosquitto[15265]: 1696429276: mosquitto version 2.0.11 starting
Oct 04 17:21:16 wirenboard-AETEOKJB mosquitto[15265]: 1696429276: Config loaded from /etc/mosquitto/mosquitto.conf.
Oct 04 17:21:16 wirenboard-AETEOKJB mosquitto[15265]: 1696429276: Opening ipv4 listen socket on port 1883.
Oct 04 17:21:16 wirenboard-AETEOKJB mosquitto[15265]: 1696429276: Opening ipv6 listen socket on port 1883.
Oct 04 17:21:16 wirenboard-AETEOKJB mosquitto[15265]: 1696429276: mosquitto version 2.0.11 running
Oct 04 17:21:16 wirenboard-AETEOKJB systemd[1]: Started Mosquitto MQTT Broker.

Другие файлы конфигурации вроде бы не трогал.
Какие файлы отвечают за конфигурацию ?
В папке /mnt/data/etc/mosquitto/conf.d ?

WinSCP

Все в общем.

Проверьте содержимое /mnt/data/etc/mosquitto.conf
В нем есть инклюд каталога конфигов, описываемый как:

include_dir /etc/mosquitto/conf.d

если его нет - то соответственно и каталог .conf.d включаться не будет.

В указанном файле пусто. Можете написать пример содержания файла ?

Вот структура папок брокера:

# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

pid_file /run/mosquitto/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest syslog

include_dir /etc/mosquitto/conf.d

Прописал в файл, websocket по прежнему не стартует.
Могу я как то привести конфигурацию брокера в исходное состояние, не сбрасывая контроллер на заводские настройки?
Так же я могу открыть доступ по ssh если есть возможность посмотреть удаленно.

Давайте ssh - гляну. Могу и привести к заводским сразу.

Эта тема была автоматически закрыта через 7 дней после последнего ответа. В ней больше нельзя отвечать.