why broker reloading config every day?

Asked by adam dong

i am new in mosquitto.
The mosquitto broker is running in ubuntu,config as ssl,listen in port 1883 and 1888,we found that the broker will reload config every day. Can we setup the broker not to reload config every day?

Question information

Language:
English Edit question
Status:
Solved
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Solved by:
Roger Light
Solved:
Last query:
Last reply:
Revision history for this message
Roger Light (roger.light) said :
#1

This shouldn't happen. What version of mosquitto are you running?

Revision history for this message
adam dong (adongxyz) said :
#2

Thanks for your response.

The version is 1.3.1

and my logging config like that :
log_dest file /var/log/mosquitto/mosquitto.log
log_dest topic
log_type error
log_type warning
log_type notice
log_type information
log_type all
connection_messages true
log_timestamp true

The following is a log message:
in mosquitto.log.1 is end of: "1402352707: Reloading config."
in mosquitto.log.2 is end of: "1402266307: Reloading config."
in mosquitto.log.3 is end of: "1402179907: Reloading config."
in mosquitto.log.4 is end of: "1402093507: Reloading config."
...

Revision history for this message
Roger Light (roger.light) said :
#3

Ah right, yes of course. Logrotate sends SIGHUP to mosquitto every day
so that it closes and reopens the log file. This also triggers
reloading of the config file.

On Fri, Jun 13, 2014 at 5:16 AM, adam dong
<email address hidden> wrote:
> Question #250141 on mosquitto changed:
> https://answers.launchpad.net/mosquitto/+question/250141
>
> Status: Needs information => Open
>
> adam dong gave more information on the question:
> Thanks for your response.
>
> The version is 1.3.1
>
> and my logging config like that :
> log_dest file /var/log/mosquitto/mosquitto.log
> log_dest topic
> log_type error
> log_type warning
> log_type notice
> log_type information
> log_type all
> connection_messages true
> log_timestamp true
>
>
> The following is a log message:
> in mosquitto.log.1 is end of: "1402352707: Reloading config."
> in mosquitto.log.2 is end of: "1402266307: Reloading config."
> in mosquitto.log.3 is end of: "1402179907: Reloading config."
> in mosquitto.log.4 is end of: "1402093507: Reloading config."
> ...
>
> --
> You received this question notification because you are a member of
> Mosquitto PPA, which is an answer contact for mosquitto.

Revision history for this message
adam dong (adongxyz) said :
#4

Roger Light, Thank you very much.
In that case, If i change the config to don't write log file, and it will not be reload config every day, is it?

Revision history for this message
Best Roger Light (roger.light) said :
#5

You will also need to remove the logrotate configuration from
/etc/logrotate.d/mosquitto

On Mon, Jun 16, 2014 at 2:48 AM, adam dong
<email address hidden> wrote:
> Question #250141 on mosquitto changed:
> https://answers.launchpad.net/mosquitto/+question/250141
>
> adam dong posted a new comment:
> Roger Light, Thank you very much.
> In that case, If i change the config to don't write log file, and it will not be reload config every day, is it?
>
> --
> You received this question notification because you are a member of
> Mosquitto PPA, which is an answer contact for mosquitto.

Revision history for this message
adam dong (adongxyz) said :
#6

Thanks Roger Light, that solved my question.