mosquitto-users team mailing list archive
-
mosquitto-users team
-
Mailing list archive
-
Message #00211
Re: Existing connections are getting lost on config file reload (signal SIGHUP)
Thanks Roger,
Cheers,
Prashant
On Thu, Apr 11, 2013 at 8:49 PM, Roger Light <roger@xxxxxxxxxx> wrote:
> Hi Saurabh,
>
> I reproduced Prashant's issue, but have not yet been able to reproduce
> yours. I've pushed a fix for Prashant's issue to the 1.2 branch.
>
> Cheers,
>
> Roger
>
>
>
> On Thu, Apr 11, 2013 at 7:40 AM, saurabh patil <saurabhpatil786@xxxxxxxxx>wrote:
>
>> Hi Roger,
>> Any updates on the issue,have you reproduce it in your environment.
>>
>> With Regards,
>> Saurabh Patil.
>>
>>
>> On Wed, Apr 10, 2013 at 2:38 AM, Prashant Kedia <
>> prashantkedia22@xxxxxxxxx> wrote:
>>
>>> Hi Roger/Saurabh,
>>>
>>> I could reproduce the issue too. Below are my observations:
>>>
>>> 1) The issue reproduces only when we are using password file and there
>>> are some entries in password file during reload.
>>>
>>> 2) If there are no entries in password during reload then it does not
>>> affect the existing client connections. But the users previously loaded by
>>> broker from the password file are still valid even after reload. Still able
>>> to publish and subscribe with deleted username-password.
>>>
>>> 3) Reload does not affect the clients which gets connected without any
>>> username-password (allow_anonymous true).
>>>
>>> 4) Tried with multiple client connection. It affects all clients
>>> connected with username-password.
>>>
>>> Here are the contents of my config file:
>>> allow_anonymous false
>>> bind_address localhost
>>> port 1883
>>> password_file /home/prashant/temp/pwfile.txt
>>>
>>> 5) I could not reproduce the issue with no password file for
>>> authentication.
>>>
>>> Test Environment:
>>> mosquitto version: 1.0.5 (build date 2012-11-03 12:29:20+0000)
>>> Platform: Linux 3.5.0-17-generic #28-Ubuntu GNU/Linux
>>>
>>> Thanks and Regards,
>>> Prashant
>>>
>>>
>>>
>>> On Tue, Apr 9, 2013 at 4:29 PM, Roger Light <roger@xxxxxxxxxx> wrote:
>>>
>>>> Hi Saurabh,
>>>>
>>>> I'm afraid I don't see this behaviour. Could you tell me what OS you
>>>> are running on? Could you also repeat it with two clients connected and
>>>> check whether they are both affected?
>>>>
>>>> Cheers,
>>>>
>>>> Roger
>>>>
>>>>
>>>>
>>>> On Tue, Apr 9, 2013 at 11:34 AM, saurabh patil <
>>>> saurabhpatil786@xxxxxxxxx> wrote:
>>>>
>>>>> 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.
>>>>>
>>>>
>>>>
>>>> --
>>>> Mailing list: https://launchpad.net/~mosquitto-users
>>>> Post to : mosquitto-users@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~mosquitto-users
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>
>>
>> --
>> With Regards,
>> Saurabh Patil.
>>
>
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References