eclipse / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
8.61k stars 2.33k forks source link

2.0.5+ doesn't work, 2.0.4- does. #3029

Closed MilorES closed 2 months ago

MilorES commented 2 months ago

RUN

services:
  mqtt:
    container_name: mosquitto
    image: eclipse-mosquitto:2.0.4
    ports:
      - "1883:1883"
      - "9001:9001"
    volumes:
      - ./config:/mosquitto/config
      - ./logs:/mosquitto/log
      - ./data:/mosquitto/data
    restart: always
    environment:
      - TZ=Europe/Madrid
mosquitto  | 1712062032: mosquitto version 2.0.4 starting
mosquitto  | 1712062032: Config loaded from /mosquitto/config/mosquitto.conf.
mosquitto  | 1712062032: Opening ipv4 listen socket on port 1883.
mosquitto  | 1712062032: Binding listener to interface "eth0".
mosquitto  | 1712062032: Opening ipv6 listen socket on port 1883.
mosquitto  | 1712062032: Binding listener to interface "eth0".
mosquitto  | 1712062032: mosquitto version 2.0.4 running
mosquitto  | 1712062032: New connection from xxx.xxx.xxx.xxx:59079 on port 1883.
mosquitto  | 1712062032: New client connected from xxx.xxx.xxx.xxx59079 as mqtt-explorer-1d62a80b (p2, c1, k60, u'user').

NOT RUN

services:
  mqtt:
    container_name: mosquitto
    image: eclipse-mosquitto:2.0.5
    ports:
      - "1883:1883"
      - "9001:9001"
    volumes:
      - ./config:/mosquitto/config
      - ./logs:/mosquitto/log
      - ./data:/mosquitto/data
    restart: always
    environment:
      - TZ=Europe/Madrid
mosquitto  | 1712061947: mosquitto version 2.0.5 starting
mosquitto  | 1712061947: Config loaded from /mosquitto/config/mosquitto.conf.
mosquitto  | 1712061947: Opening ipv4 listen socket on port 1883.
mosquitto  | 1712061947: Opening ipv6 listen socket on port 1883.
mosquitto  | 1712061947: Error: Invalid argument
Daedaluz commented 2 months ago

would be good to see the configuration file. Also, i'm guessing the only difference in the docker-compose file is the mosquitto version. (They both use the 2.0.4 image in your post)

MilorES commented 2 months ago

Oh, thanks, I forgot to edit the label, thanks for noticing, I've attached the configuration, I'll take the opportunity to look on the web, any break changes.

mosquitto.conf

persistence true
persistence_location /mosquitto/data/
listener 1883
bind_interface eth0
allow_anonymous false
password_file /mosquitto/config/password_file
Daedaluz commented 2 months ago

Why do you have the bind_interface option here?

MilorES commented 2 months ago

Deleted, fixed password_file permissions issue and now without any errors, thanks

Note: I don't remember where I got that data from, honestly!