-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example with mosquitto has Error: Connection refused #87
Comments
can you show the content of |
Note in particular:
|
I think you are right in that the example doesn't work. This is what I've done to seemingly make it work: $ mkdir config
$ cat | tee config/mosquitto.conf <<EOF
listener 1883
allow_anonymous true
EOF Note the changed mounts in the docker compose file ( services:
otrecorder:
image: owntracks/recorder
ports:
- 8083:8083
volumes:
- config:/config
- store:/store
restart: unless-stopped
environment:
OTR_HOST: mosquitto
mosquitto:
image: eclipse-mosquitto
ports:
- 1883:1883
- 8883:8883
volumes:
- ./config:/mosquitto/config/:rw
- ./data:/mosquitto/data:rw
- ./log:/mosquitto/log:rw
restart: unless-stopped
volumes:
store:
config: $ docker compose -f docker-compose-mqtt.yml up
Attaching to mosquitto-1, otrecorder-1
mosquitto-1 | 1730723136: mosquitto version 2.0.20 starting
mosquitto-1 | 1730723136: Config loaded from /mosquitto/config/mosquitto.conf.
mosquitto-1 | 1730723136: Opening ipv4 listen socket on port 1883.
mosquitto-1 | 1730723136: Opening ipv6 listen socket on port 1883.
mosquitto-1 | 1730723136: mosquitto version 2.0.20 running
otrecorder-1 | + version 0.9.9 starting with STORAGEDIR=/store
otrecorder-1 | + connecting to MQTT on mosquitto:1883 as clientID ot-recorder-8db6593673cb-8 without TLS
mosquitto-1 | 1730723136: New connection from 172.22.0.2:60896 on port 1883.
mosquitto-1 | 1730723136: New client connected from 172.22.0.2:60896 as ot-recorder-8db6593673cb-8 (p2, c0, k60).
otrecorder-1 | + HTTP listener started on 0.0.0.0:8083, without browser-apikey
otrecorder-1 | + HTTP prefix is unset
otrecorder-1 | + Using storage at /store with precision 7
otrecorder-1 | + Configured with revgeo=true and geokey: nil
otrecorder-1 | + TZDATADB is at /config/timezone16.bin: R_OK
otrecorder-1 | + Subscribing to owntracks/# (qos=2) This definitely needs checking by somebody who knows what they're doing with docker. |
With your changes it worked for me. Ideally the mosquitto configuration should be able to be configured in |
The path to the file can. Its content cannot, I think.
|
Docker version 27.3.1, build v27.3.1
My
docker-compose.yml
:Then I ran
docker compose up
as root and this happens:and it keeps repeating the last 3 lines over and over.
Does the Docker with MQTT example need to be updated?
The text was updated successfully, but these errors were encountered: