Re: [Mosquitto-users] Sending reload signals from java

2012-12-04 Thread saurabh patil
I am adding and removing some user credentials in password file at run
time. I want mosquitto to reload the configuration file after adding a
particular number of users to the password file. If I understand correctly
reloading mosquitto configuration file will also reload password file.
Please correct me if I am wrong.

I do have PID for the mosquitto but the problem is, on Linux I can use kill
command to send SIGHUP signal to mosquitto but I am not getting any way to
make it on Windows. I want to do this on Windows without restarting
mosquitto.

Thanks,
Saurabh

On Tue, Dec 4, 2012 at 1:10 PM, andypipe...@gmail.com  wrote:

> I'm not sure I understand - why would you need to do this? Restarting the
> broker should probably be an administrative task rather than a programmatic
> one?
>
> At a high level I guess it should be as simple as: find PID of mosquitto;
> send SIGHUP. But I really would like to understand the use case. Do you
> have a problem with mosquitto that leads you to periodically reload the
> broker?
>
>
>
> On Tue, Dec 4, 2012 at 7:59 AM, saurabh patil 
> wrote:
>
>>
>> Hi All,
>>
>> Kindly provide solution for both Windows and Linux platform.
>>
>> With regards,
>> Saurabh
>>
>>
>>
>> On Tue, Dec 4, 2012 at 12:23 PM, saurabh patil > > wrote:
>>
>>> Hi All,
>>> Have any one tried sending reload signal to mosquitto process from
>>> java.if yes kindly share it. thanks in advance.
>>>
>>> With regards,
>>> saurabh
>>>
>>
>>
>>
>> --
>> saurabh
>>
>> --
>> Mailing list: https://launchpad.net/~mosquitto-users
>> Post to : mosquitto-users@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~mosquitto-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Andy Piper | Farnborough, Hampshire (UK)
> blog: http://andypiper.co.uk   |   skype: andypiperuk
> twitter: @andypiper  |  images: http://www.flickr.com/photos/andypiper
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to : mosquitto-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
saurabh
-- 
Mailing list: https://launchpad.net/~mosquitto-users
Post to : mosquitto-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mosquitto-users
More help   : https://help.launchpad.net/ListHelp


Re: [Mosquitto-users] Sending reload signals from java

2012-12-04 Thread Sharon Ben Asher
Hi Saurabh,

I am interested in the same request (for the same purpose - reload the 
configuration and ACL file)
However, I am only interested in Linux so I guess my job is pretty 
straightforward - invoke kill command from Java.
I think there is a real problem on Windows (regardless of mosquitto), since the 
OS itself does not recognize the notion of signals...

Sharon.

From: mosquitto-users-bounces+sharon.ben-asher=avg@lists.launchpad.net 
[mailto:mosquitto-users-bounces+sharon.ben-asher=avg@lists.launchpad.net] 
On Behalf Of saurabh patil
Sent: Tuesday, December 04, 2012 8:53 AM
To: mosquitto-users@lists.launchpad.net
Subject: [Mosquitto-users] Sending reload signals from java

Hi All,
Have any one tried sending reload signal to mosquitto process from java.if yes 
kindly share it. thanks in advance.

With regards,
saurabh
-- 
Mailing list: https://launchpad.net/~mosquitto-users
Post to : mosquitto-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mosquitto-users
More help   : https://help.launchpad.net/ListHelp


Re: [Mosquitto-users] Sending reload signals from java

2012-12-04 Thread Josh Hawley
Wouldn't the proper way to fix this be to create a way to
programmatically manage users without reloading? 

 

Josh Hawley

Hawley Hosting

jhaw...@hawleyhosting.com

 

From:
mosquitto-users-bounces+jhawley=hawleyhosting@lists.launchpad.net
[mailto:mosquitto-users-bounces+jhawley=hawleyhosting.com@lists.launchpa
d.net] On Behalf Of saurabh patil
Sent: Tuesday, December 04, 2012 12:00 AM
To: andypipe...@gmail.com
Cc: mosquitto-users
Subject: Re: [Mosquitto-users] Sending reload signals from java

 

I am adding and removing some user credentials in password file at run
time. I want mosquitto to reload the configuration file after adding a
particular number of users to the password file. If I understand
correctly reloading mosquitto configuration file will also reload
password file. Please correct me if I am wrong.

I do have PID for the mosquitto but the problem is, on Linux I can use
kill command to send SIGHUP signal to mosquitto but I am not getting any
way to make it on Windows. I want to do this on Windows without
restarting mosquitto.

Thanks,
Saurabh

On Tue, Dec 4, 2012 at 1:10 PM, andypipe...@gmail.com
 wrote:

I'm not sure I understand - why would you need to do this? Restarting
the broker should probably be an administrative task rather than a
programmatic one?

 

At a high level I guess it should be as simple as: find PID of
mosquitto; send SIGHUP. But I really would like to understand the use
case. Do you have a problem with mosquitto that leads you to
periodically reload the broker?

 

 

On Tue, Dec 4, 2012 at 7:59 AM, saurabh patil
 wrote:


Hi All,

Kindly provide solution for both Windows and Linux platform.

With regards,
Saurabh





On Tue, Dec 4, 2012 at 12:23 PM, saurabh patil
 wrote:

Hi All,
Have any one tried sending reload signal to mosquitto process
from java.if yes kindly share it. thanks in advance.

With regards,
saurabh





-- 
saurabh

--
Mailing list: https://launchpad.net/~mosquitto-users
 
Post to : mosquitto-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mosquitto-users
 
More help   : https://help.launchpad.net/ListHelp





 

-- 
Andy Piper | Farnborough, Hampshire (UK)
blog: http://andypiper.co.uk   |   skype: andypiperuk
twitter: @andypiper  |  images: http://www.flickr.com/photos/andypiper


--
Mailing list: https://launchpad.net/~mosquitto-users
 
Post to : mosquitto-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mosquitto-users
 
More help   : https://help.launchpad.net/ListHelp




-- 
saurabh

-- 
Mailing list: https://launchpad.net/~mosquitto-users
Post to : mosquitto-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mosquitto-users
More help   : https://help.launchpad.net/ListHelp


Re: [Mosquitto-users] Sending reload signals from java

2012-12-04 Thread Roger Light
Hi,

On Tue, Dec 4, 2012 at 8:00 AM, saurabh patil  wrote:

> I do have PID for the mosquitto but the problem is, on Linux I can use kill
> command to send SIGHUP signal to mosquitto but I am not getting any way to
> make it on Windows. I want to do this on Windows without restarting
> mosquitto.

As you've noted this isn't currently possible on Windows. I've done
some searching but haven't yet found an accepted way of dealing with
the problem.

As Josh points out, this is really best handled without reloading. One
of the possible plans for the future is to have a broker interface to
make this easy to do, even with the simple password/acl files. It is
currently possible to write your own password/acl handler so this may
be the best approach for you. Take a look at the
src/mosquitto_plugin.h file for details of what functions you need to
write. This allows you to integrate the broker with whatever your
preferred method of holding user data is, such as a SQL database.

Cheers,

Roger

-- 
Mailing list: https://launchpad.net/~mosquitto-users
Post to : mosquitto-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mosquitto-users
More help   : https://help.launchpad.net/ListHelp