You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dustin Fortin <df...@airscorp.com> on 2007/10/24 00:32:00 UTC
tomcat 5.0.25 migration to tomcat 6.0.14
Hello,
I apologize if this is the incorrect list to be writing to.
Regardless, here is my problem;
I have volunteerd to migrate my company from tomcat 5.0.25 to tomcat
6.0.14. All of our webapps, (around 15) are all working perfectly under
tomcat 5. I read all that I could find on tomcat 6 before starting this
project, and things made sense to me. The biggest discression that I
found between t5 and t6 is how contexts are dealt with.
Essentially what I have done, is copied the entire contents of the
$CATALINA_HOME/webapps directory from a working app server to this
upgraded t6 dev server. I copied the t5 server.xml from the working app
to the dev, and created the context structure as dictated in the
documentation. I removed the contexts from the main server.xml. I kept
all of my <Host> entries in the server.xml, and created
$CATALINA_HOME/conf/<engine>/<host>/context.xml.default files. After
messing with the syntax of the context.xml files and the server.xml
file, I finally got the tomcat server to start without any exceptions,
and it seems as though its waiting for connections on port 80 -- see
below:
Oct 23, 2007 5:48:03 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Oct 23, 2007 5:48:03 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 399 ms
Oct 23, 2007 5:48:03 PM org.apache.catalina.core.StandardService start
INFO: Starting service Tomcat-Standalone
Oct 23, 2007 5:48:03 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Oct 23, 2007 5:48:05 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Oct 23, 2007 5:48:05 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1494 ms
>From what I can tell the server is waiting for a connection. No
exceptions have been thrown to log. When I try to connect to the server
however, all I get is a blank page. Running fiddler, I see that I'm
getting a "HTTP/1.1 400 No Host matches server name xxx.xxx.com" The
host I'm trying to reach is entered into my local hosts file, and is
present on the servers hosts file. DNS resolution of the FQDN i'm
trying to go to shouldn't be an issue.
I have kept the global context.xml with the defaults that came with the
system as I don't want to establish any context values system wide.
My context files look like this:
<Context>
....Insert context paths and resource links here.
</Context>
Can anyone tell me where to look to find out why my t6 server refuses to
serve up pages that work under t5? Im out of logged exceptions to
troubleshoot.
thanks!
-dustin
Re: tomcat 5.0.25 migration to tomcat 6.0.14
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dustin,
Dustin Fortin wrote:
>> These days, all app-specific configuration should go into your webapp's
>> META-INF/context.xml file.
>
> So there should not be $CATALINA_HOME/conf/<engine>/<hostname>/*.xml
> with the path to the webapp being in the name of the .xml? Instead you
> should put the context.xml file in the META-INF folder? I thought the
> documentation said to put all contexts in the above directory?
You can do either, but I think it's sooooo much easier to just stick it
into your WAR file (or webapp directory, whichever you prefer).
> I'll give this a shot if I can't get my current config to do anything in
> the next day or so and write back with what the issue was that caused
> the server to start, but nothing to be served up. It's just unfortunate
> that the differences are that great as there are a ton of jdbc resources
> I will have to rewrite, and I was hoping to not have to do so.
You can probably copy the JDBC resources verbatim from one to the other.
In fact, you could probably move those into your context.xml unless they
need to be shared by multiple applications (and cannot be separated for
some reason).
The problems tend to be exact class names for various managers,
deprecated (or removed) XML elements, new stuff that you never knew you
needed, etc.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHH1m/9CaO5/Lv0PARApzFAKCej0aH20EuZggQJ2PdLZJWlSiBvwCgjOl7
5wb6XDcis3Pi6StVe1cG4wI=
=+DB+
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: tomcat 5.0.25 migration to tomcat 6.0.14
Posted by Dustin Fortin <df...@airscorp.com>.
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Dustin,
>
>Dustin Fortin wrote:
>> Do you know of anywhere to find documentation on migrating
>> an old server.xml to the new standard, as I've been unable to find
any
>> so far.
>
>The best thing to do is start with the stock server.xml file -- it
>should contain /tons/ of comments for what each element does and what
>it's options are. Put the new (stock) configuration and your old
>configuration side-by-side and migrate each of the things you need. My
>guess is that you'll need to do nothing other than properly configure
>the <Connector> to meet your needs (HTTP or AJP) and maybe configure
>session persistence or something like that.
>
>These days, all app-specific configuration should go into your webapp's
>META-INF/context.xml file.
So there should not be $CATALINA_HOME/conf/<engine>/<hostname>/*.xml
with the path to the webapp being in the name of the .xml? Instead you
should put the context.xml file in the META-INF folder? I thought the
documentation said to put all contexts in the above directory?
>> I have however found syntactical issues by trial and error with
>> the t5 server.xml when referring to the UserDatabase Resource name.
I
>> fixed those issues so that no exceptions were thrown to log. Could
>> there be other syntactical issues that for some reason do not cause
an
>> exception to be thrown?
>
>I tried migrating from 4.1 to 5.5 in the way you're trying to do it:
use
>my old server.xml file and fix errors until everything worked. It never
>worked: it was a fool's errand. Even when there are no errors, it still
>might not work. The best thing to do is start with the stock config
file
>and modify it little by little until you're done.
I'll give this a shot if I can't get my current config to do anything in
the next day or so and write back with what the issue was that caused
the server to start, but nothing to be served up. It's just unfortunate
that the differences are that great as there are a ton of jdbc resources
I will have to rewrite, and I was hoping to not have to do so.
Thanks
-dustin
>- -chris
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.7 (MingW32)
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>iD8DBQFHH0+q9CaO5/Lv0PARAlnIAJ9bcRfmm8uE+SjRWneU2d+Px5qr7ACfcBOu
>9ornzya+L1WI/VFy+0FhJUw=
>=0Tc/
>-----END PGP SIGNATURE-----
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat 5.0.25 migration to tomcat 6.0.14
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dustin,
Dustin Fortin wrote:
> Do you know of anywhere to find documentation on migrating
> an old server.xml to the new standard, as I've been unable to find any
> so far.
The best thing to do is start with the stock server.xml file -- it
should contain /tons/ of comments for what each element does and what
it's options are. Put the new (stock) configuration and your old
configuration side-by-side and migrate each of the things you need. My
guess is that you'll need to do nothing other than properly configure
the <Connector> to meet your needs (HTTP or AJP) and maybe configure
session persistence or something like that.
These days, all app-specific configuration should go into your webapp's
META-INF/context.xml file.
> I have however found syntactical issues by trial and error with
> the t5 server.xml when referring to the UserDatabase Resource name. I
> fixed those issues so that no exceptions were thrown to log. Could
> there be other syntactical issues that for some reason do not cause an
> exception to be thrown?
I tried migrating from 4.1 to 5.5 in the way you're trying to do it: use
my old server.xml file and fix errors until everything worked. It never
worked: it was a fool's errand. Even when there are no errors, it still
might not work. The best thing to do is start with the stock config file
and modify it little by little until you're done.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHH0+q9CaO5/Lv0PARAlnIAJ9bcRfmm8uE+SjRWneU2d+Px5qr7ACfcBOu
9ornzya+L1WI/VFy+0FhJUw=
=0Tc/
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat 5.0.25 migration to tomcat 6.0.14
Posted by Markus Schönhaber <ma...@schoenhaber.de>.
Dustin Fortin wrote:
> Do I need to start from scratch and completely ditch the t5 server.xml?
> I really hope not because there are a ton of database resources I would
> have to test and be 100% sure on before throwing this into production.
> I will do this if you feel it necessary, but if possible I'd rather find
> a conversion solution instead of starting from scratch.
I share Christopher's opinion an this: start from scratch.
As an alternative (if you think the pain when starting from scratch is
too much to bare) you could remove non-essential stuff (including the
Resources) until either
a) the error goes away or
b) server.xml is small enough and doesn't contain any sensitive
information that you can post it here for others to take a look at it.
If a) happens, re-add stuff until the error come back. That'll give you
a more precise hint at what might be wrong.
In case of b), well, we'll see.
Regards
mks
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: tomcat 5.0.25 migration to tomcat 6.0.14
Posted by Dustin Fortin <df...@airscorp.com>.
>
>No need to apologize, you found the correct place for your question.
Great, thank you for the quick reply.
>[...]
>> upgraded t6 dev server. I copied the t5 server.xml from the working
app
>> to the dev,
>
>I wouldn't do that.
Fair enough. Do you know of anywhere to find documentation on migrating
an old server.xml to the new standard, as I've been unable to find any
so far. I have however found syntactical issues by trial and error with
the t5 server.xml when referring to the UserDatabase Resource name. I
fixed those issues so that no exceptions were thrown to log. Could
there be other syntactical issues that for some reason do not cause an
exception to be thrown?
>[...]
>> Oct 23, 2007 5:48:03 PM org.apache.coyote.http11.Http11Protocol init
>> INFO: Initializing Coyote HTTP/1.1 on http-80
>> Oct 23, 2007 5:48:03 PM org.apache.catalina.startup.Catalina load
>> INFO: Initialization processed in 399 ms
>> Oct 23, 2007 5:48:03 PM org.apache.catalina.core.StandardService
start
>> INFO: Starting service Tomcat-Standalone
>> Oct 23, 2007 5:48:03 PM org.apache.catalina.core.StandardEngine start
>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
>> Oct 23, 2007 5:48:05 PM org.apache.coyote.http11.Http11Protocol start
>> INFO: Starting Coyote HTTP/1.1 on http-80
>> Oct 23, 2007 5:48:05 PM org.apache.catalina.startup.Catalina start
>> INFO: Server startup in 1494 ms
>>
>> From what I can tell the server is waiting for a connection. No
>> exceptions have been thrown to log. When I try to connect to the
server
>> however, all I get is a blank page. Running fiddler, I see that I'm
>> getting a "HTTP/1.1 400 No Host matches server name xxx.xxx.com"
>
>Check whether the value of the "defaultHost" attribute of <Engine>
>corresponds to the "name" attribute of one of your <Host>s. If this is
>not the case, you may get the result you've seen.
>What makes me somewhat unsure is you should also see a warning logged
at
>startup. But in the snippet above there is none.
I have done this. For example, this is what I have in one of my hosts
sections:
<Host name="www.xxx.com" appBase="">
<Alias>app9.xxx.com</Alias>
<Alias>www2.xxx.com</Alias>
<Alias>xxx.com</Alias>
<Alias>www.xxx.com</Alias>
<Alias>airscorp.com</Alias>
</Host>
In my engine name:
<Engine name="Standalone" defaultHost="www.xxx.com">
This line proceeds the hostname above.
After making this change, startup still seems fine as no exceptions are
thrown. However, the same behavior is happening, when I go to the
server at one of the above hostnames, all I get is a 400.
Do I need to start from scratch and completely ditch the t5 server.xml?
I really hope not because there are a ton of database resources I would
have to test and be 100% sure on before throwing this into production.
I will do this if you feel it necessary, but if possible I'd rather find
a conversion solution instead of starting from scratch.
thanks
-dustin
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat 5.0.25 migration to tomcat 6.0.14
Posted by Markus Schönhaber <ma...@schoenhaber.de>.
Dustin Fortin wrote:
> I apologize if this is the incorrect list to be writing to.
No need to apologize, you found the correct place for your question.
[...]
> upgraded t6 dev server. I copied the t5 server.xml from the working app
> to the dev,
I wouldn't do that.
[...]
> Oct 23, 2007 5:48:03 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-80
> Oct 23, 2007 5:48:03 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 399 ms
> Oct 23, 2007 5:48:03 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Tomcat-Standalone
> Oct 23, 2007 5:48:03 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
> Oct 23, 2007 5:48:05 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-80
> Oct 23, 2007 5:48:05 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 1494 ms
>
> From what I can tell the server is waiting for a connection. No
> exceptions have been thrown to log. When I try to connect to the server
> however, all I get is a blank page. Running fiddler, I see that I'm
> getting a "HTTP/1.1 400 No Host matches server name xxx.xxx.com"
Check whether the value of the "defaultHost" attribute of <Engine>
corresponds to the "name" attribute of one of your <Host>s. If this is
not the case, you may get the result you've seen.
What makes me somewhat unsure is you should also see a warning logged at
startup. But in the snippet above there is none.
Regards
mks
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org