Docker mosquitto – Error unable to load auth plugin

  docker, mosquitto, plugins

I really need your help !
I’m encountering a problem with the loading of a plugin in a docker mosquitto.
I tried to load it on a local version of mosquitto and it worked well.

The error return in the docker console is:

dev_instance_mosquitto_1 exited with code 13

The errors return in the log file of mosquitto are:

1626352342: Loading plugin: /mosquitto/config/mosquitto_message_timestamp.so
1626352342: Error: Unable to load auth plugin "/mosquitto/config/mosquitto_message_timestamp.so".
1626352342: Load error: Error relocating /mosquitto/config/mosquitto_message_timestamp.so: __sprintf_chk: symbol not found

Here is a tree output of the project:

mosquitto/
├── Dockerfile
├── config
│   ├── acl
│   ├── ca_certificates
│   │   ├── README
│   │   ├── broker_CA.crt
│   │   ├── mqtt.test.perax.com.p12
│   │   ├── private_key.key
│   │   └── server_ca.crt
│   ├── certs
│   │   ├── CA_broker_mqtt.crt
│   │   ├── README
│   │   ├── serveur_broker.crt
│   │   └── serveur_broker.key
│   ├── conf.d
│   │   └── default.conf
│   ├── mosquitto.conf
│   ├── mosquitto_message_timestamp.so
│   └── pwfile
├── data
│   └── mosquitto.db
└── log
└── mosquitto.log

Here is the Dockerfile:

FROM eclipse-mosquitto
COPY config/ /mosquitto/config
COPY config/mosquitto_message_timestamp.so /usr/lib/mosquitto_message_timestamp.so
RUN install /usr/lib/mosquitto_message_timestamp.so /mosquitto/config/

here is the docker-compose.yml:

mosquitto:
    restart: always
    build: ./mosquitto/
    image: "eclipse-mosquitto/latests"
    ports:
      - "1883:1883"
      - "9001:9001"
    volumes:
      - ./mosquitto/config/:/mosquitto/config/
      - ./mosquitto/data/:/mosquitto/data/
      - ./mosquitto/log/mosquitto.log:/mosquitto/log/mosquitto.log
    user: 1883:1883
    environment:
      - PUID=1883
      - PGID=1883

Here is the mosquitto.conf:

persistence true
persistence_location /mosquitto/data

log_dest file /mosquitto/log/mosquitto.log

include_dir /mosquitto/config/conf.d

plugin /mosquitto/config/mosquitto_message_timestamp.so

I’m using mosquitto 2.0.10 on a ubuntu serveur with the version 18.04.5 LTS.

In thanking you for your help.

Source: Docker Questions

LEAVE A COMMENT