jllopis / docker-mosquitto Goto Github PK
View Code? Open in Web Editor NEWMosquitto MQTT Broker on Docker Image
Mosquitto MQTT Broker on Docker Image
Hello,
I added the mongoDB backend on my fork: https://github.com/natcl/docker-mosquitto-mongo-auth
Was wondering if you'd be interested in a PR that adds the mongoc driver, or perhaps it's better in another fork ?
Hi, I'm using the image with the auth-plugin.
Using a MQTT client, the container is contacted on its MQTT over TLS/SSL port (8883) and the authentication is performed using HTTP (custom HTTP API).
Suddendly just after the container is contacted it crashes. The log contains the following:
1499077320: |-- *** auth-plug: startup
1499077320: |-- ** Configured order: http
Segmentation fault (core dumped)
Note: we used the version 1.4.10 with the same worflow (MQTT over TLS/SSL and custom HTTP API) without issues for months. The 1.4.12 instead always crashes.
How to create multiple users in Redis back-end after the docker container is up ?
Hi I'm getting this issue while connection to the server with websocket protocol
1497462055: Socket error on client abcd, disconnecting.
I'm using java client to connect to the server
I am using the PostgreSQL backend for plugin and it hardly has 12 user entries. Still the docker container for docker-mosquitto
is of 4.6 GB in size which is extra. Is there any way to reduce the size.
Move to the recently released mosquitto v2.0.4.
Some behaviour changes has been introduced.
Hi Can you please explain your ssl patch? I do not follow what is going on there and would appreciate some clarification as to what the patch is doing.
Thanks
I can't seem to get websockets to work at all, any special thing to do ?
I get this in the log:
1495739241: Opening websockets listen socket on port 9883.
But my clients seem to timeout.
1548058729: Opening websockets listen socket on port 9883.
Alpine websockets broken again?
I have connectivity issues. Check it please.
v1.5.5
upd:
This works well with libwebsockets v2.4.2
thank
I notice that the /org.eclipse.mosquitto source directory is present in your image at about 12 M in size.
It may be that the "rm -rf" commands in the Dockerfile aren't working as expected: there's no "-${MOSQ_VERSION}" on the end of the source directory, and the "mosquitto-auth-plug" directory isn't at the root level, it's inside the source directory.
Move from archived jpmens' mosquitto-auth-plug to iegomez's mosquitto-go-auth.
Could not compile with websockets as the repo was not found
https://libwebsockets.org/repo/libwebsockets
I replaced it with the new repo:
https://github.com/warmcat/libwebsockets
I successfully compiled but am I doing the right thing?
Running the container in Win10 and trying to make MQTT visible to my python client by
docker run -ti ^
-v %cd%/mosquitto/etc/mosquitto.d:/etc/mosquitto.d ^
-v %cd%/mosquitto/var/lib/mosquitto:/var/lib/mosquitto ^
-v %cd%/mosquitto/auth-plug.conf:/etc/mosquitto.d/auth-plugin.conf ^
-p 127.0.0.1:1883:1883 ^
-p 127.0.0.1:9883:9883 ^
--link redis_1:mosquitto.redis.link ^
--name mqtt ^
docker-mosquitto_mosquitto
it could pub/sub via container CLI but, when connecting via python, it shows Socket error:
1607308722: Socket error on client auto-XXXXXXXXXXXXXXX, disconnecting.
i suspect my python doesn't have tls.
any idea how I can disable tls in the image or how to obtain the CA cert from it?
also, i afraid i am unable to edit mosquitto.conf (i am bypassing it) due to another error:
docker run -ti ^
-v /tmp/mosquitto/etc/mosquitto:/etc/mosquitto ^
-v /tmp/mosquitto/etc/mosquitto.d:/etc/mosquitto.d ^
-v /tmp/mosquitto/var/lib/mosquitto:/var/lib/mosquitto ^
-v /tmp/mosquitto/auth-plug.conf:/etc/mosquitto.d/auth-plugin.conf ^
-p 1883:1883 ^
-p 9883:9883 ^
--name mqtt ^
docker-mosquitto_mosquitto
Error:
1607309303: Error: Unable to open config file /etc/mosquitto/mosquitto.conf.
any idea or further info requires from my side, please let me knows.
Hi,
I'm having some problem with setting up docker-mosquitto. I've successfully cloned the repository and build the docker images using docker-compose up
. However, every time I try to connect to the docker-mosquitto container with a username and a wrong password it closes the container unexpectedly. This is the python code I'm using to publish to a specific channel:
import paho.mqtt.client as mqtt
client = mqtt.Client()
client.connect("127.0.0.1", 1883, 60)
client.username_pw_set("admin", "wrong_password")
client.publish("test","HI")
And this is the log output from docker-compose
1:C 20 Feb 2019 13:31:01.396 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-mosq | 1:C 20 Feb 2019 13:31:01.396 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=1, just started
redis-mosq | 1:C 20 Feb 2019 13:31:01.396 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-mosq | 1:M 20 Feb 2019 13:31:01.397 * Running mode=standalone, port=6379.
redis-mosq | 1:M 20 Feb 2019 13:31:01.398 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis-mosq | 1:M 20 Feb 2019 13:31:01.398 # Server initialized
redis-mosq | 1:M 20 Feb 2019 13:31:01.398 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
mosquitto_1 | 1550669462: mosquitto version 1.5.5 starting
mosquitto_1 | 1550669462: Config loaded from /etc/mosquitto/mosquitto.conf.
mosquitto_1 | 1550669462: |-- *** auth-plug: startup
mosquitto_1 | 1550669462: |-- ** Configured order: redis,http
mosquitto_1 |
mosquitto_1 | 1550669462: |-- }}}} Redis
redis-mosq | 1:M 20 Feb 2019 13:31:01.400 * DB loaded from disk: 0.002 seconds
redis-mosq | 1:M 20 Feb 2019 13:31:01.400 * Ready to accept connections
mosquitto_1 | 1550669462: |-- with_tls=false
mosquitto_1 | 1550669462: |-- getuser_uri=/auth
mosquitto_1 | 1550669462: |-- superuser_uri=/superuser
mosquitto_1 | 1550669462: |-- aclcheck_uri=/acl
mosquitto_1 | 1550669462: |-- getuser_params=domain=DOMAIN,port=PORT
mosquitto_1 | 1550669462: |-- superuser_params=domain=DOMAIN,port=PORT
mosquitto_1 | 1550669462: |-- aclcheck_params=domain=DOMAIN,port=PORT
mosquitto_1 | 1550669462: |-- retry_count=3
mosquitto_1 | 1550669462: Opening ipv4 listen socket on port 1883.
mosquitto_1 | 1550669462: Opening ipv6 listen socket on port 1883.
mosquitto_1 | 1550669462: Opening websockets listen socket on port 9883.
mosquitto_1 | 1550669522: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
mosquitto_1 | 1550669578: New connection from 172.21.0.1 on port 1883.
mosquitto_1 | 1550669578: |-- mosquitto_auth_unpwd_check(admin)
mosquitto_1 | 1550669578: |-- ** checking backend redis
mosquitto_1 | 1550669578: |-- ** checking backend http
docker-mosquitto_mosquitto_1 exited with code 139
I've even tried going into the container and running mosquitto_pub -h localhost -t test -m "HI" -u admin -p wrong_password
and the result occurs. Any ideas of why this is occurring?
Running the standard setup this morning,
git init
git pull https://github.com/jllopis/docker-mosquitto
docker-compose up
repeatedly produced the following error during the main RUN:
ERROR: unsatisfiable constraints: openssl-dev-1.1.1a-r0: conflicts: libressl-dev-2.7.4-r2[pc:libcrypto=1.1.1a] libressl-dev-2.7.4-r2[pc:libssl=1.1.1a] libressl-dev-2.7.4-r2[pc:openssl=1.1.1a] satisfies: postgresql-dev-11.1-r0[openssl-dev] curl-dev-7.62.0-r2[openssl-dev] libssh2-dev-1.8.0-r4[pc:libcrypto] libssh2-dev-1.8.0-r4[pc:libssl] libressl-dev-2.7.4-r2: conflicts: openssl-dev-1.1.1a-r0[pc:libcrypto=2.7.4] openssl-dev-1.1.1a-r0[pc:libssl=2.7.4] openssl-dev-1.1.1a-r0[pc:openssl=2.7.4] satisfies: world[libressl-dev] libssh2-dev-1.8.0-r4[pc:libcrypto] libssh2-dev-1.8.0-r4[pc:libssl]
So, conflicting SSL libraries. Since the Dockerfile does not mention openssl, I figured it might be a change in Alpine, since the version is unpinned. Changing it to FROM alpine:3.8
allowed Docker to get through the dependency installation. It appears that Alpine has indeed been switching between openssl and libressl, though I am not clear how Edge would have this problem relative to 3.8, when the switch appears to be towards libre and this project is using libre. For your consideration.
You need to chmod the run.sh otherwise it fails with a permissions error.
Other than that, loverrrly project :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.