You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Zippy Zeppoli <zi...@gmail.com> on 2013/02/07 20:17:25 UTC

problem with context.xml for parallel deployments

I've been testing out parallel deployments
(http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deployment)
in my tomcat cluster. It seems to work really well if I futz around
with naming the filenames.

Here's what works:
1) cp /artifacts/someapp##001.war /tmp/war-listener
--- app gets deployed to the farm by farmdeployer successfully
2) cp /artifacts/someapp##002.war /tmp/war-listener
--- someapp##002.war gets deployed, new sessions are migrated over to
this version of the application, context path remains the same for
both
--- someapp##001.war still receives connections, but is undeployed
(manually set in server.xml) as sessions expire
--- eventually someapp##002.war is the only app serving requests and deployed

All good. However, I was trying to use context.xml to define the
version, but this fails, the cluster just hangs and never deploys the
app.

Here was an example of a META-INF/context.xml I was using:
<Context name="myapp##1.3.5">
</Context>

What was I doing wrong with this method?
Is it a best practice to version just using the filename, both?

Thanks for any insights, the documentation doesn't seem to explain
this very well and there isn't a resource on the web that goes over
this in detail.

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


Re: problem with context.xml for parallel deployments

Posted by Zippy Zeppoli <zi...@gmail.com>.
Thank you!

On Fri, Mar 1, 2013 at 4:38 AM, Mark Thomas <ma...@apache.org> wrote:
> Christopher Schultz <ch...@christopherschultz.net> wrote:
>
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA256
>>
>>Zippy,
>>
>>On 2/28/13 7:29 PM, Zippy Zeppoli wrote:
>>>
>>http://people.apache.org/~markt/presentations/2013-02-Apache-Tomcat-Clustering.pdf
>>>
>>>  Forbidden
>>>
>>> You don't have permission to access
>>> /~markt/presentations/2013-02-Apache-Tomcat-Clustering.pdf on this
>>> server. Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0g DAV/2
>>> Server at people.apache.org Port 80
>>>
>>> I take it it will be accessible after ApacheCon?
>>
>>Looks like Mark failed to make those files word-readable: you'll have
>>to wait until he notices and fixes it.
>
> Correct. Noticed and fixed. Enjoy.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


Re: problem with context.xml for parallel deployments

Posted by Mark Thomas <ma...@apache.org>.
Christopher Schultz <ch...@christopherschultz.net> wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA256
>
>Zippy,
>
>On 2/28/13 7:29 PM, Zippy Zeppoli wrote:
>>
>http://people.apache.org/~markt/presentations/2013-02-Apache-Tomcat-Clustering.pdf
>>
>>  Forbidden
>> 
>> You don't have permission to access 
>> /~markt/presentations/2013-02-Apache-Tomcat-Clustering.pdf on this 
>> server. Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0g DAV/2
>> Server at people.apache.org Port 80
>> 
>> I take it it will be accessible after ApacheCon?
>
>Looks like Mark failed to make those files word-readable: you'll have
>to wait until he notices and fixes it.

Correct. Noticed and fixed. Enjoy.

Mark


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


Re: problem with context.xml for parallel deployments

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

Zippy,

On 2/28/13 7:29 PM, Zippy Zeppoli wrote:
> http://people.apache.org/~markt/presentations/2013-02-Apache-Tomcat-Clustering.pdf
>
>  Forbidden
> 
> You don't have permission to access 
> /~markt/presentations/2013-02-Apache-Tomcat-Clustering.pdf on this 
> server. Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0g DAV/2
> Server at people.apache.org Port 80
> 
> I take it it will be accessible after ApacheCon?

Looks like Mark failed to make those files word-readable: you'll have
to wait until he notices and fixes it.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEwUxAACgkQ9CaO5/Lv0PDvggCeOzDl1ugM+Dz0764zeR0zp7bi
agIAn26VNkye7rsD+WV+ddJB33fX5v/7
=UpjQ
-----END PGP SIGNATURE-----

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


Re: problem with context.xml for parallel deployments

Posted by Zippy Zeppoli <zi...@gmail.com>.
http://people.apache.org/~markt/presentations/2013-02-Apache-Tomcat-Clustering.pdf

Forbidden

You don't have permission to access
/~markt/presentations/2013-02-Apache-Tomcat-Clustering.pdf on this
server.
Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0g DAV/2 Server at
people.apache.org Port 80

I take it it will be accessible after ApacheCon?


On Tue, Feb 12, 2013 at 6:27 AM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Zippy,
>
> On 2/11/13 12:56 PM, Zippy Zeppoli wrote:
>> You're writing on tomcatexpert.com is excellent by the way. Perhaps
>> a link to a clustering example on tomcatexpert would provide the
>> level of verbosity that a thick-skull might require.
>
> Come to ApacheCon in Portland, OR at the end of the month and attend
> Mark's talk on clustering. Or, just read his slides afterwards (Mark
> is kind enough to post all his slides here after presentations:
> http://people.apache.org/~markt/presentations/).
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEAREIAAYFAlEaUVgACgkQ9CaO5/Lv0PDEZACfR+UKtvRR4AYzG+CSs5fqDyjr
> J/IAoIWbrGhwc+3GlTcmmZ2LZHWNClPb
> =RwL+
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


Re: problem with context.xml for parallel deployments

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

Zippy,

On 2/11/13 12:56 PM, Zippy Zeppoli wrote:
> You're writing on tomcatexpert.com is excellent by the way. Perhaps
> a link to a clustering example on tomcatexpert would provide the
> level of verbosity that a thick-skull might require.

Come to ApacheCon in Portland, OR at the end of the month and attend
Mark's talk on clustering. Or, just read his slides afterwards (Mark
is kind enough to post all his slides here after presentations:
http://people.apache.org/~markt/presentations/).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEaUVgACgkQ9CaO5/Lv0PDEZACfR+UKtvRR4AYzG+CSs5fqDyjr
J/IAoIWbrGhwc+3GlTcmmZ2LZHWNClPb
=RwL+
-----END PGP SIGNATURE-----

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


Re: problem with context.xml for parallel deployments

Posted by Zippy Zeppoli <zi...@gmail.com>.
You're writing on tomcatexpert.com is excellent by the way.
Perhaps a link to a clustering example on tomcatexpert would provide
the level of verbosity that a thick-skull might require.

apache.org documentation seems a bit terse at times.

On Mon, Feb 11, 2013 at 9:54 AM, Zippy Zeppoli <zi...@gmail.com> wrote:
> I think just an example or quick HOWTO would alleviate the issue for
> retards like me.
>
> On Fri, Feb 8, 2013 at 5:41 AM, Mark Thomas <ma...@apache.org> wrote:
>> On 08/02/2013 01:06, Zippy Zeppoli wrote:
>>> Ah, the author himself! Perhaps this will help
>>
>> Ha ha.
>>
>> If you want to help improve the Tomcat documentation then answers to the
>> following questions would be a good place to start.
>>
>>>>> <Context name="myapp##1.3.5">
>>>>> </Context>
>>
>> What led you to believe that such a configuration was valid? I don't see
>> any reference to a name attribute in the documentation.
>>
>>>>> Is it a best practice to version just using the filename, both?
>>
>> <snip/>
>>
>>>>> Thanks for any insights, the documentation doesn't seem to explain
>>>>> this very well and there isn't a resource on the web that goes over
>>>>> this in detail.
>>
>> Related, I suspect to the question 1 above. The docs on versions, paths
>> and the relationship between is here:
>>
>> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming
>>
>> 2. What isn't explained very well?
>>
>> Suggested improvements (ideally as patches) welcome.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>

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


Re: problem with context.xml for parallel deployments

Posted by Zippy Zeppoli <zi...@gmail.com>.
I think just an example or quick HOWTO would alleviate the issue for
retards like me.

On Fri, Feb 8, 2013 at 5:41 AM, Mark Thomas <ma...@apache.org> wrote:
> On 08/02/2013 01:06, Zippy Zeppoli wrote:
>> Ah, the author himself! Perhaps this will help
>
> Ha ha.
>
> If you want to help improve the Tomcat documentation then answers to the
> following questions would be a good place to start.
>
>>>> <Context name="myapp##1.3.5">
>>>> </Context>
>
> What led you to believe that such a configuration was valid? I don't see
> any reference to a name attribute in the documentation.
>
>>>> Is it a best practice to version just using the filename, both?
>
> <snip/>
>
>>>> Thanks for any insights, the documentation doesn't seem to explain
>>>> this very well and there isn't a resource on the web that goes over
>>>> this in detail.
>
> Related, I suspect to the question 1 above. The docs on versions, paths
> and the relationship between is here:
>
> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming
>
> 2. What isn't explained very well?
>
> Suggested improvements (ideally as patches) welcome.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


Re: problem with context.xml for parallel deployments

Posted by Mark Thomas <ma...@apache.org>.
On 08/02/2013 01:06, Zippy Zeppoli wrote:
> Ah, the author himself! Perhaps this will help

Ha ha.

If you want to help improve the Tomcat documentation then answers to the
following questions would be a good place to start.

>>> <Context name="myapp##1.3.5">
>>> </Context>

What led you to believe that such a configuration was valid? I don't see
any reference to a name attribute in the documentation.

>>> Is it a best practice to version just using the filename, both?

<snip/>

>>> Thanks for any insights, the documentation doesn't seem to explain
>>> this very well and there isn't a resource on the web that goes over
>>> this in detail.

Related, I suspect to the question 1 above. The docs on versions, paths
and the relationship between is here:

http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming

2. What isn't explained very well?

Suggested improvements (ideally as patches) welcome.

Mark

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


Re: problem with context.xml for parallel deployments

Posted by Zippy Zeppoli <zi...@gmail.com>.
Ah, the author himself! Perhaps this will help
http://www.walmart.com/ip/1058245?wmlspartner=wlpa&adid=22222222227000000000&wl0=&wl1=g&wl2=&wl3=21486607510&wl4=&wl5=pla&veh=sem

On Thu, Feb 7, 2013 at 11:30 AM, Mark Thomas <ma...@apache.org> wrote:
> On 07/02/2013 19:17, Zippy Zeppoli wrote:
>> I've been testing out parallel deployments
>> (http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deployment)
>> in my tomcat cluster. It seems to work really well if I futz around
>> with naming the filenames.
>>
>> Here's what works:
>> 1) cp /artifacts/someapp##001.war /tmp/war-listener
>> --- app gets deployed to the farm by farmdeployer successfully
>> 2) cp /artifacts/someapp##002.war /tmp/war-listener
>> --- someapp##002.war gets deployed, new sessions are migrated over to
>> this version of the application, context path remains the same for
>> both
>> --- someapp##001.war still receives connections, but is undeployed
>> (manually set in server.xml) as sessions expire
>> --- eventually someapp##002.war is the only app serving requests and deployed
>>
>> All good. However, I was trying to use context.xml to define the
>> version, but this fails, the cluster just hangs and never deploys the
>> app.
>>
>> Here was an example of a META-INF/context.xml I was using:
>> <Context name="myapp##1.3.5">
>> </Context>
>>
>> What was I doing wrong with this method?
> Failing to read the documentation.
>
> Do you see the "name" attribute for a Context defined anywhere in this list:
> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Attributes
>
>> Is it a best practice to version just using the filename, both?
> Again, read the docs:
> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming
>
>> Thanks for any insights, the documentation doesn't seem to explain
>> this very well and there isn't a resource on the web that goes over
>> this in detail.
>
> Looks pretty clear to me. Then I did write it.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


Re: problem with context.xml for parallel deployments

Posted by Mark Thomas <ma...@apache.org>.
On 07/02/2013 19:17, Zippy Zeppoli wrote:
> I've been testing out parallel deployments
> (http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deployment)
> in my tomcat cluster. It seems to work really well if I futz around
> with naming the filenames.
> 
> Here's what works:
> 1) cp /artifacts/someapp##001.war /tmp/war-listener
> --- app gets deployed to the farm by farmdeployer successfully
> 2) cp /artifacts/someapp##002.war /tmp/war-listener
> --- someapp##002.war gets deployed, new sessions are migrated over to
> this version of the application, context path remains the same for
> both
> --- someapp##001.war still receives connections, but is undeployed
> (manually set in server.xml) as sessions expire
> --- eventually someapp##002.war is the only app serving requests and deployed
> 
> All good. However, I was trying to use context.xml to define the
> version, but this fails, the cluster just hangs and never deploys the
> app.
> 
> Here was an example of a META-INF/context.xml I was using:
> <Context name="myapp##1.3.5">
> </Context>
> 
> What was I doing wrong with this method?
Failing to read the documentation.

Do you see the "name" attribute for a Context defined anywhere in this list:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Attributes

> Is it a best practice to version just using the filename, both?
Again, read the docs:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming

> Thanks for any insights, the documentation doesn't seem to explain
> this very well and there isn't a resource on the web that goes over
> this in detail.

Looks pretty clear to me. Then I did write it.

Mark


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