You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christoph Prybila <ch...@gmail.com> on 2015/04/16 15:59:42 UTC

Add member to static memebership cluster during runtime

Tomcat:     7.0.59
OS:         Win7 Professional SP1
Java:       1.7.0_67

I want to create a cluster and I need to use static membership.
But the number of nodes in my cluster is not static.

Is it possible to add members to such a static membership cluster 
without restarting the other already running tomcat instances?

I figured that in order to add a new member I would need to specify it 
in the StaticMembershipInterceptor of all the other nodes.
But editing the server.xml of a running tomcat instance had no effect.

best regards,
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Add member to static memebership cluster during runtime

Posted by Christoph Prybila <ch...@gmail.com>.

Am 17.04.2015 um 14:45 schrieb Christopher Schultz:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Chris,
>
> On 4/17/15 5:33 AM, Christoph Prybila wrote:
>>
>> Am 17.04.2015 um 07:45 schrieb Christopher Schultz: Chris,
>>
>> On 4/16/15 9:59 AM, Christoph Prybila wrote:
>>>>> Tomcat:     7.0.59 OS:         Win7 Professional SP1 Java:
>>>>> 1.7.0_67
>>>>>
>>>>> I want to create a cluster and I need to use static
>>>>> membership. But the number of nodes in my cluster is not
>>>>> static.
>>>>>
>>>>> Is it possible to add members to such a static membership
>>>>> cluster without restarting the other already running tomcat
>>>>> instances?
>>>>>
>>>>> I figured that in order to add a new member I would need to
>>>>> specify it in the StaticMembershipInterceptor of all the
>>>>> other nodes. But editing the server.xml of a running tomcat
>>>>> instance had no effect.
>> Tomcat will not auto-reload server.xml; there are just too many
>> moving parts to reload it quickly, so you have to bounce the whole
>> server.
>>
>> Oddly enough, I was just talking to someone yesterday about how
>> static membership ought to be updatable via at least JMX. I'm not
>> sure, but it's possible that static membership is /already
>> updatable via JMX.
>>
>> Are you comfortable connecting to a local Tomcat using jconsole or
>> VisualVM and browsing around the "Catalina" tree? I don't have a
>> clustered setup handy to inspect myself to see if it's already
>> possible.
>>
>> If it's /not/ currently possible, it really should be.
>>
>> -chris
>>> ---------------------------------------------------------------------
>>>
>>>
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>> I already tried to configure the cluster via jmx.
>>
>> After connecting to a tomcat instance, there was indeed a
>> "Cluster" object in the tree but I was not able to add/remove
>> existing members there.
>>
>> This cluster object contains a group called "Member" where all
>> members of the cluster are listed. Therefore I was able to query
>> information about the members. Unfortunately the member objects do
>> not offer any operations at all. I do not have much experience with
>> jmx but I think that means that the member-entries are read-only
>> and it is currently not possible to configure the membership via
>> jmx.
>>
>> The cluster object itself offers the operations "start", "stop",
>> "setProperty" and "send" which as far as I understood also do not
>> give any possibility to add new members.
> Agreed. Could you file an enhancement request in Bugzilla?
>
> Thanks!
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJVMQBsAAoJEBzwKT+lPKRYPYgP/A0wrm3zsAt3F9ZAb9+49L0d
> OELtNDCNfn0iy1uXSEdmke0amOSUKF8FrO7QFdf2BhFtU9IQDxQBX/a/+1oeMMCA
> 7SMtsNP99yGcl0IropbPpHIrDTP+VJ8dhzva+MEBerPO2glcyns6FvrqW595w/7u
> 67TdJ+NDrfKj6J9yg1A2xCX96T7ugMgQM1sLxbevXL2CcXQENaLzaZ3WXbKX2cJ1
> R03iHq2+zaBjp9fX6sSLlF7khAZ+XMWpgkTRDQiGXb150XKgwmjFkdMsgFz97RPX
> BQi2tGt6kpagBMsT7J7cpIk8wgJsgnQlZQhIkdwXis4r2QDm1O0UEcjDNzoUFL73
> GIDK1K9tcxhMm23bo793KXk5u+qWMKlvmrnJ5K1vL/tMskQ+kAqaD/v6n2vVCAd9
> AJCMEY0CoADcVx3v1nSVqH4w+8e0b3wtDehx9wTwgSICWfTkAmu1s41eVB8NELDZ
> kuokk8Y0t4H3vowCHpnEO7GpXhssBNWNBG+AkM1/i0caOE6ckFH0L8A0nXdxIErM
> IZ4iyrJVQooHaNmaCoU6ZurOnVb66uEYmPJnCBZcWRtaqfMdvEc4VJAK6sTcnVIA
> 8t7U9q54cITEXu8MuRCtkrubLjDbueBzMmocsWbE2wsg/ocEbqkaOqgV8Ozk4qZx
> Npb+77NpR7HtUujPorfC
> =kD2C
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
Done. Thanks for the feedback.

https://bz.apache.org/bugzilla/show_bug.cgi?id=57827

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Add member to static memebership cluster during runtime

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chris,

On 4/17/15 5:33 AM, Christoph Prybila wrote:
> 
> 
> Am 17.04.2015 um 07:45 schrieb Christopher Schultz: Chris,
> 
> On 4/16/15 9:59 AM, Christoph Prybila wrote:
>>>> Tomcat:     7.0.59 OS:         Win7 Professional SP1 Java: 
>>>> 1.7.0_67
>>>> 
>>>> I want to create a cluster and I need to use static
>>>> membership. But the number of nodes in my cluster is not
>>>> static.
>>>> 
>>>> Is it possible to add members to such a static membership
>>>> cluster without restarting the other already running tomcat
>>>> instances?
>>>> 
>>>> I figured that in order to add a new member I would need to
>>>> specify it in the StaticMembershipInterceptor of all the
>>>> other nodes. But editing the server.xml of a running tomcat
>>>> instance had no effect.
> Tomcat will not auto-reload server.xml; there are just too many
> moving parts to reload it quickly, so you have to bounce the whole
> server.
> 
> Oddly enough, I was just talking to someone yesterday about how
> static membership ought to be updatable via at least JMX. I'm not
> sure, but it's possible that static membership is /already
> updatable via JMX.
> 
> Are you comfortable connecting to a local Tomcat using jconsole or 
> VisualVM and browsing around the "Catalina" tree? I don't have a 
> clustered setup handy to inspect myself to see if it's already
> possible.
> 
> If it's /not/ currently possible, it really should be.
> 
> -chris
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
> I already tried to configure the cluster via jmx.
> 
> After connecting to a tomcat instance, there was indeed a
> "Cluster" object in the tree but I was not able to add/remove
> existing members there.
> 
> This cluster object contains a group called "Member" where all
> members of the cluster are listed. Therefore I was able to query
> information about the members. Unfortunately the member objects do
> not offer any operations at all. I do not have much experience with
> jmx but I think that means that the member-entries are read-only
> and it is currently not possible to configure the membership via
> jmx.
> 
> The cluster object itself offers the operations "start", "stop", 
> "setProperty" and "send" which as far as I understood also do not
> give any possibility to add new members.

Agreed. Could you file an enhancement request in Bugzilla?

Thanks!

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVMQBsAAoJEBzwKT+lPKRYPYgP/A0wrm3zsAt3F9ZAb9+49L0d
OELtNDCNfn0iy1uXSEdmke0amOSUKF8FrO7QFdf2BhFtU9IQDxQBX/a/+1oeMMCA
7SMtsNP99yGcl0IropbPpHIrDTP+VJ8dhzva+MEBerPO2glcyns6FvrqW595w/7u
67TdJ+NDrfKj6J9yg1A2xCX96T7ugMgQM1sLxbevXL2CcXQENaLzaZ3WXbKX2cJ1
R03iHq2+zaBjp9fX6sSLlF7khAZ+XMWpgkTRDQiGXb150XKgwmjFkdMsgFz97RPX
BQi2tGt6kpagBMsT7J7cpIk8wgJsgnQlZQhIkdwXis4r2QDm1O0UEcjDNzoUFL73
GIDK1K9tcxhMm23bo793KXk5u+qWMKlvmrnJ5K1vL/tMskQ+kAqaD/v6n2vVCAd9
AJCMEY0CoADcVx3v1nSVqH4w+8e0b3wtDehx9wTwgSICWfTkAmu1s41eVB8NELDZ
kuokk8Y0t4H3vowCHpnEO7GpXhssBNWNBG+AkM1/i0caOE6ckFH0L8A0nXdxIErM
IZ4iyrJVQooHaNmaCoU6ZurOnVb66uEYmPJnCBZcWRtaqfMdvEc4VJAK6sTcnVIA
8t7U9q54cITEXu8MuRCtkrubLjDbueBzMmocsWbE2wsg/ocEbqkaOqgV8Ozk4qZx
Npb+77NpR7HtUujPorfC
=kD2C
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Add member to static memebership cluster during runtime

Posted by Christoph Prybila <ch...@gmail.com>.

Am 17.04.2015 um 07:45 schrieb Christopher Schultz:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Chris,
>
> On 4/16/15 9:59 AM, Christoph Prybila wrote:
>> Tomcat:     7.0.59 OS:         Win7 Professional SP1 Java:
>> 1.7.0_67
>>
>> I want to create a cluster and I need to use static membership. But
>> the number of nodes in my cluster is not static.
>>
>> Is it possible to add members to such a static membership cluster
>> without restarting the other already running tomcat instances?
>>
>> I figured that in order to add a new member I would need to specify
>> it in the StaticMembershipInterceptor of all the other nodes. But
>> editing the server.xml of a running tomcat instance had no effect.
> Tomcat will not auto-reload server.xml; there are just too many moving
> parts to reload it quickly, so you have to bounce the whole server.
>
> Oddly enough, I was just talking to someone yesterday about how static
> membership ought to be updatable via at least JMX. I'm not sure, but
> it's possible that static membership is /already updatable via JMX.
>
> Are you comfortable connecting to a local Tomcat using jconsole or
> VisualVM and browsing around the "Catalina" tree? I don't have a
> clustered setup handy to inspect myself to see if it's already possible.
>
> If it's /not/ currently possible, it really should be.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJVMJ3yAAoJEBzwKT+lPKRYroIQAKh86Eh4GeE3tR/sG8kKeGLg
> +5nmMqBD5I/uRacUN8llzOjxN2kZA2f5uwxYgiSTmZE8oQVP/a+M6PT0F4pCZMkZ
> 8/kQDzc/QgcMLWdRC3ApO8GJRX09nes3hbgyTcKUdzqXHOcc5SfZSaESC/euCyZz
> xSj/G3052FadK0zSKDDnD6JXJ5U55fGyPUew/7x+ERR0ZY/CG7SH0d2PVhm+iDKO
> vaeCpSFKCakZ87XGp5PchvjXQeFnfqV0K60RCJ8N8EmbINdS9xxn2OcBX9jRaetb
> Ptp+fUIKXrB5Jdz8riA+jU5vlVB6WtKC333GyNzGHD6/aTSxAOhpV3uuA/oSq7QI
> B+7HzHWa51AI7GIkKIU5E2zSI0+Y75rIMW6KEyhqiUAatxcAHiC3jAGVG+py6pJ9
> uHjLVCV+Jk/DmymL0N0jkA8SwqD2byDbhx92InFzp/eawfEe3NMTGnYrHfGTwJnT
> wc/9YL1eDHkweM9CDq0z3yvKUiyJz47IppuhsWVD6peE44ibQD/8tMVU7BI2Pleo
> FGuJI3KX7dInMO66bRCUkGvf1FKlnDrhTsA+O7XXVlQJbFwxFRkbm7sTGvUu0QLG
> 0EdJmC/fuCnmgKXmmff0rZlmZ7X6XeMan0IlSUR3gf9ry8NBaTAQun7C5M77dtOl
> VQMrzMZ/xZ9EmHK6nuBq
> =OpTW
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
I already tried to configure the cluster via jmx.

After connecting to a tomcat instance, there was indeed a "Cluster" 
object in the tree but I was not able to add/remove existing members there.

This cluster object contains a group called "Member" where all members 
of the cluster are listed.
Therefore I was able to query information about the members.
Unfortunately the member objects do not offer any operations at all.
I do not have much experience with jmx but I think that means that the 
member-entries are read-only and it is currently not possible to 
configure the membership via jmx.

The cluster object itself offers the operations "start", "stop", 
"setProperty" and "send" which as far as I understood also do not give 
any possibility to add new members.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Add member to static memebership cluster during runtime

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chris,

On 4/16/15 9:59 AM, Christoph Prybila wrote:
> Tomcat:     7.0.59 OS:         Win7 Professional SP1 Java:
> 1.7.0_67
> 
> I want to create a cluster and I need to use static membership. But
> the number of nodes in my cluster is not static.
> 
> Is it possible to add members to such a static membership cluster 
> without restarting the other already running tomcat instances?
> 
> I figured that in order to add a new member I would need to specify
> it in the StaticMembershipInterceptor of all the other nodes. But
> editing the server.xml of a running tomcat instance had no effect.

Tomcat will not auto-reload server.xml; there are just too many moving
parts to reload it quickly, so you have to bounce the whole server.

Oddly enough, I was just talking to someone yesterday about how static
membership ought to be updatable via at least JMX. I'm not sure, but
it's possible that static membership is /already updatable via JMX.

Are you comfortable connecting to a local Tomcat using jconsole or
VisualVM and browsing around the "Catalina" tree? I don't have a
clustered setup handy to inspect myself to see if it's already possible.

If it's /not/ currently possible, it really should be.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVMJ3yAAoJEBzwKT+lPKRYroIQAKh86Eh4GeE3tR/sG8kKeGLg
+5nmMqBD5I/uRacUN8llzOjxN2kZA2f5uwxYgiSTmZE8oQVP/a+M6PT0F4pCZMkZ
8/kQDzc/QgcMLWdRC3ApO8GJRX09nes3hbgyTcKUdzqXHOcc5SfZSaESC/euCyZz
xSj/G3052FadK0zSKDDnD6JXJ5U55fGyPUew/7x+ERR0ZY/CG7SH0d2PVhm+iDKO
vaeCpSFKCakZ87XGp5PchvjXQeFnfqV0K60RCJ8N8EmbINdS9xxn2OcBX9jRaetb
Ptp+fUIKXrB5Jdz8riA+jU5vlVB6WtKC333GyNzGHD6/aTSxAOhpV3uuA/oSq7QI
B+7HzHWa51AI7GIkKIU5E2zSI0+Y75rIMW6KEyhqiUAatxcAHiC3jAGVG+py6pJ9
uHjLVCV+Jk/DmymL0N0jkA8SwqD2byDbhx92InFzp/eawfEe3NMTGnYrHfGTwJnT
wc/9YL1eDHkweM9CDq0z3yvKUiyJz47IppuhsWVD6peE44ibQD/8tMVU7BI2Pleo
FGuJI3KX7dInMO66bRCUkGvf1FKlnDrhTsA+O7XXVlQJbFwxFRkbm7sTGvUu0QLG
0EdJmC/fuCnmgKXmmff0rZlmZ7X6XeMan0IlSUR3gf9ry8NBaTAQun7C5M77dtOl
VQMrzMZ/xZ9EmHK6nuBq
=OpTW
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org