nurikk / zigbee2mqtt-frontend

Zigbee2MQTT frontend
https://www.zigbee2mqtt.io/
GNU General Public License v3.0
251 stars 181 forks source link

[Bug]: no frontend reachable #1547

Closed konus1 closed 1 year ago

konus1 commented 2 years ago

What happened?

I use zigbee2mgtt in a docker container. The docker container is running with portainer in an lxc container in Proxmox. After Starting up, I am not able to access the frontend.

configuration.yaml

permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://192.168.178.203:1883
serial:
  port: /dev/ttyACM0
  adapter: zstack
frontend:
  port: 8080
advanced:
  network_key:
    - xxxxx
  homeassistant_legacy_entity_attributes: false
  legacy_api: false
  legacy_availability_payload: false
  log_level: debug
device_options:
  legacy: false
devices:
  '0xd0cf5efffe1f9850':
    friendly_name: '0xd0cf5efffe1f9850'
  '0xec1bbdfffea95c60':
    friendly_name: '0xec1bbdfffea95c60'

my docker compose file

services:
  zigbee2mqtt:
    container_name: zigbee2mqtt
    restart: always
    image: koenkk/zigbee2mqtt
    volumes:
      - /dockerdata/data/zigbee2mqtt:/app/data
      - /run/udev:/run/udev:ro
    devices:
      - /dev/ttyACM0:/dev/ttyACM0
    ports:
      - "8080:8080"
    environment:
      - TZ=Europe/Vienna
  mosquitto:
    image: eclipse-mosquitto
    container_name: mqtt
    restart: always
    volumes:
      - /dockerdata/data/mosquitto/config:/mosquitto/config
      - /dockerdata/data/mosquitto/data:/mosquitto/data
      - /dockerdata/data/mosquitto/log:/mosquitto/log
    ports:
      - "1883:1883"
      - "9001:9001"

the log output

Zigbee2MQTT:debug 2022-09-16 17:40:59: Loaded state from file /app/data/state.json
Zigbee2MQTT:info  2022-09-16 17:40:59: Logging to console and directory: '/app/data/log/2022-09-16.17-40-58' filename: log.txt
Zigbee2MQTT:debug 2022-09-16 17:40:59: Removing old log directory '/app/data/log/2022-09-16.14-57-57'
Zigbee2MQTT:info  2022-09-16 17:40:59: Starting Zigbee2MQTT version 1.27.2 (commit #7dc48fb)
Zigbee2MQTT:info  2022-09-16 17:40:59: Starting zigbee-herdsman (0.14.53)
Zigbee2MQTT:debug 2022-09-16 17:40:59: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/app/data/coordinator_backup.json","databaseBackupPath":"/app/data/database.db.backup","databasePath":"/app/data/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"adapter":"zstack","path":"/dev/ttyACM0"}}'
Zigbee2MQTT:info  2022-09-16 17:41:10: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-09-16 17:41:10: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20220219,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:debug 2022-09-16 17:41:10: Zigbee network parameters: {"channel":11,"extendedPanID":"0x00124b0025900c05","panID":6754}
Zigbee2MQTT:info  2022-09-16 17:41:10: Currently 2 devices are joined:
Zigbee2MQTT:info  2022-09-16 17:41:10: 0xd0cf5efffe1f9850 (0xd0cf5efffe1f9850): L1529 - IKEA FLOALT LED light panel, dimmable, white spectrum (60x60 cm) (Router)
Zigbee2MQTT:info  2022-09-16 17:41:10: 0xec1bbdfffea95c60 (0xec1bbdfffea95c60): L1527 - IKEA FLOALT LED light panel, dimmable, white spectrum (30x30 cm) (Router)
Zigbee2MQTT:warn  2022-09-16 17:41:10: `permit_join` set to  `true` in configuration.yaml.
Zigbee2MQTT:warn  2022-09-16 17:41:10: Allowing new devices to join.
Zigbee2MQTT:warn  2022-09-16 17:41:10: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info  2022-09-16 17:41:10: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-09-16 17:41:10: Connecting to MQTT server at mqtt://192.168.178.203:1883
Zigbee2MQTT:debug 2022-09-16 17:41:10: Using MQTT anonymous login
Zigbee2MQTT:debug 2022-09-16 17:45:59: Saving state to file /app/data/state.json

I wonder if there should be a logline like this? (But is not) "Zigbee2MQTT:info 2022-04-29 09:36:17: Started frontend on port 0.0.0.0:8080"

Doing telnet on the dockerhost is successful, but the connection is closed immediately

Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

Curl does not get a connection from the dockerhost

curl: (56) Recv failure: Connection reset by peer

This is my zigbee device

usb-1a86_USB_Serial-if00-port0
Bus 002 Device 003: ID 1a86:7523 QinHeng Electronics CH340 serial converter

What else can I try? Since I am a newbee to using docker, I am not totally sure about networking, but also tried bridge mode with no success. Thank you for your help!

What browsers are you seeing the problem on?

Chrome

Relevant stacktrace

for logs see above

Did you download state.json.zip?

I will not attach state.json.zip

konus1 commented 1 year ago

Yes is it necessary to see "Started frontend on port 0.0.0.0:8080" or similar in the log. In my case it was a not working configuration of mqtt