← Back to team overview

mosquitto-users team mailing list archive

Existing connections are getting lost on config file reload (signal SIGHUP)

 

Hi Roger,

Mosquitto documentation says:
password_file *file path*Reloaded on reload signal. The currently loaded
username and password data will be freed and reloaded. *Clients that are
already connected will not be affected.*

But as soon as i send sighup signal to mosquitto process to reload
configuration files, existing connections hangs up.

Below are the steps i followed (no password file in use):
1) Start a broker on default port 1883.
2) Subscribe on the broker with any topic (mosquitto_sub -h localhost -p
1883 -t abc -i user1)
3) Send reload (SIGHUP) signal to mosquitto process (kill -1
mosquittoProcessId)

Result:
As soon as i send the signal, the client subscribed in step 2 hangs up.

Same is the case when i configure password file to authenticate clients.I
have tested on versions 1.1.3 and 1.1.1 .

Please let me know how to avoid this? I want to add and remove passwords in
password file dynamically and don't want existing connections to get
affected due to reload.

With Regards,
Saurabh Patil.

Follow ups