Hi, I want to know that every role that I assign is restarting the broker. so will there any problem of delay(broker restart) increase if the subscribing and publishing client will be more.
also, I want to know about its SSL connection. How can I configure SSL configuration on the broker side? does it by default support OpenSSL… can I use it with another certification?
The management center should not be restarting the broker. I imagine what is happening is that the broker is kicking off the management center client.
When you make changes to a client, group, or role, any devices that are connected that are affected by those changes will be disconnected from the broker - when they reconnect they will have the correct authorisations applied.
For example, if you add a new ACL to a role, all of the clients using that role, either directly or through a group, will be kicked. If you add/remove a role from a client or group, add/remove a client from a group, or add/remove a role from a client or group the same is true.
I would recommend keeping a client/group specifically for administering the management centre clients, then you won’t be disturbed by your client being disconnected when you are making unrelated changes.
For configuring SSL you have to do that at the broker directly, it’s not yet possible through the management center. You should use a listener section like this:
listener 8883
certfile <path to your PEM encoded x509 certificate with intermediates>
keyfile <path to your PEM encoded private key>
Only the root user has access to certificates in /etc/letsencrypt, they need to be placed somewhere that the mosquitto user can access them. We have an example letsencrypt post renewal hook that does this for you: mosquitto/mosquitto-copy.sh at master · eclipse/mosquitto · GitHub
Use that script to copy the certificates, update your configuration file to match, and then you should be back up and running.
Sorry, I wasn’t clear at all there. This is a script that is used by the letsencrypt certbot client after it renews a certificate, you don’t run it yourself. To get it to trigger you’ll likely have to force a renewal with certbot --force-renewal.
can you please correct me if I’m wrong here to provide input to this file
if [ ${RENEWED_DOMAINS} = "mydomain.com" ]; then
# Copy new certificate to Mosquitto directory
cp ${RENEWED_LINEAGE}/fullchain.pem /etc/myfolder/certs/fullchain.pem
cp ${RENEWED_LINEAGE}/privkey.pem /etc/myfolder/certs/privkey.pem
# Set ownership to Mosquitto
chown mosquitto: /etc/myfolder/certs/privkey.pem /etc/myfolder/certs/fullchain.pem
> **what about this chown mosquitto?? Do I need to change?**
# Ensure permissions are restrictive
chmod 0600 /etc/myfolder/certs/fullchain.pem /etc/myfolder/certs/privkey.pem
# Tell Mosquitto to reload certificates and configuration
pkill -HUP -x mosquitto
fi
The chown line needs to point to the same path as the rest of the paths used. If you’re using the docker container, then wherever you have mounted as volume for /mosquitto/data or /mosquitto/config would make sense.
I believe you also need to tell certbot which domain you want to renew. You should renew it in exactly the same way as you would do normally, but with --force-renewal included. This only needs to happen once, so do not change the normal way you would renew.
I’ve also updated the script so it doesn’t give an error in the case you try to renew without giving a domain.
As per renewing Now with certbot. It has limit set. I’ve already renew many time. so now on it is not updating. can i use another way today?? to get it to right place?
Ok, so when you start everything up, the files in ~/cedalo_platform/mosquitto/config will appear in the docker instance on the path /mosquitto/config. The files in #/cedalo_platform/mosquitto/data will appear at /mosquitto/data.
I would suggest that you put your certificates at ~/cedalo_platform/mosquitto/config/certificates. The listener part of your config file would then be: