#3742·mosquitto

Windows 11: mosquitto_signal config-reload returns success but config is not reloaded when broker runs as a service

Author: mpeterekCreated Sep 18, 2026Updated Sep 18, 2026
LabelsStatus: Available

##Title

Windows 11: mosquitto_signal config-reload returns success but configuration is not reloaded when broker runs as a service

Environment

  • OS: Windows 11 Pro

  • Mosquitto version: 2.1.2

  • Broker executable: mosquitto_Test.exe

  • Configuration file: C:\Program Files\mosquitto_Test\mosquitto.conf

  • mosquitto_signal.exe from the same Mosquitto 2.1.2 installation

  • Tested with:

    • native Mosquitto Windows service
    • NSSM service wrapper
    • normal/manual process start

Summary

mosquitto_signal.exe -p <PID> config-reload works correctly when Mosquitto is started as a normal process, but does not appear to reload the configuration when Mosquitto is running as a Windows service.

The command still returns exit code 0.

Working case

Start Mosquitto manually:

"C:\Program Files\mosquitto_Test\mosquitto_Test.exe" -c "C:\Program Files\mosquitto_Test\mosquitto.conf"

Then get the broker PID and run:

mosquitto_signal.exe -p <PID> config-reload

Result:

  • exit code is 0
  • configuration changes are applied correctly

I verified this by changing a reloadable option such as:

log_timestamp_format %Y-%m-%d %H:%M:%S

to:

log_timestamp_format RELOADTEST-%Y-%m-%d %H:%M:%S

After config-reload, new log entries use the changed format.

Failing case – native Windows service

The service is installed with:

"C:\Program Files\mosquitto_Test\mosquitto_Test.exe" install

and runs as:

"C:\Program Files\mosquitto_Test\mosquitto_Test.exe" run

The correct Mosquitto PID is identified and the following command is sent:

mosquitto_signal.exe -p <actual Mosquitto PID> config-reload

Result:

  • exit code is 0
  • configuration changes are not applied

Failing case – NSSM

I also tested the broker through NSSM with the same command line that works manually:

"C:\Program Files\mosquitto_Test\mosquitto_Test.exe" -c "C:\Program Files\mosquitto_Test\mosquitto.conf"

NSSM configuration:

Application:
C:\Program Files\mosquitto_Test\mosquitto_Test.exe

Arguments:
-c "C:\Program Files\mosquitto_Test\mosquitto.conf"

Startup directory:
C:\Program Files\mosquitto_Test

The actual child process mosquitto_Test.exe is identified, not the NSSM PID.

Then:

mosquitto_signal.exe -p <actual Mosquitto PID> config-reload

Result:

  • exit code is 0
  • configuration changes are not applied

Additional checks performed

I verified all of the following:

  • The correct mosquitto_Test.exe PID is used.
  • The config file path is correct.
  • The config file is valid:
mosquitto_Test.exe -c "C:\Program Files\mosquitto_Test\mosquitto.conf" --test-config

returns:

Configuration file is OK.

and exit code 0.

  • The service and reload script were also tested under Administrator privileges.
  • The reload was also tested from Session 0.
  • mosquitto_signal.exe still returned exit code 0.
  • The same executable and the same config file work correctly when started as a normal process outside the service environment.

Original use case

I originally discovered the problem while trying to rotate log files without restarting the broker.

For example, changing:

log_dest file C:\Program Files\mosquitto_Test\log1\mosquitto-2026-09-17.log

to:

log_dest file C:\Program Files\mosquitto_Test\log1\mosquitto-2026-09-18.log

and then sending:

mosquitto_signal.exe -p <PID> config-reload

does not switch the broker to the new log file when it is running as a Windows service.

After a full broker restart, the new log file is used correctly.

Expected behavior

When mosquitto_signal.exe -p <PID> config-reload returns success, reloadable configuration options should be re-read and applied, regardless of whether the broker is running interactively or as a Windows service.

Actual behavior

Source: eclipse-mosquitto/mosquitto