tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Gordon <adam.gor...@readytalk.com>
Subject Re: Apache/Tomcat - mod_jk issues
Date Thu, 28 Feb 2008 17:18:53 GMT
No worries, happens to the best of us.

I don't "think" tomcat is a reserved worker name - that said, I've seen 
stranger things...

Anyway, regarding your host question, it depends.  "localhost" should 
work fine out of the box if your apache/tomcat are running on the same 
server (assuming your hosts file is setup correctly, which it should be 
for localhost).  We're running it all on apache load balancers and they 
hand off the JK mounts to the Tomcat server computers as appropriate.  
For the host parameter to work correctly I think all you'll need to 
ensure is that either the host value is mapped correctly in the hosts 
file or in DNS - we use DNS.

Next up, what exactly happens when you try to go to a Tomcat URL?  Do 
you get a 404?  Regardless of whether you do or not, do you get any type 
of error?  Is the error an Apache error or Tomcat error?  If you haven't 
change the defaults of Apache or Tomcat, an Apache error will generally 
tell you the apache version in black text whereas the Tomcat error page 
usually has green or grey colored bars across it and will not display 
anything about Apache.

If you get an Apache error, it's definitely not going to Tomcat-land and 
if it gets to Tomcat-land, then your Apache configuration is probably 
correct.  I would next suggest turning up your JK logging and monitor 
your request logging to make sure 1) your requests are coming through 
and look as you expect them (in your apache access log), and then 2) 
look at your mod_jk log to see what's going on.

Another thing to make sure is that Tomcat is listening on port 8009.  
Not sure what platform you're on, but a "netstat -a" will tell you which 
ports are active - you should see 8009.  And on that note, make sure 
your ports.conf file has you listening on both port 80 and 443.

--adam

Lessie Z. Mitch wrote:
> Thank you Adam!
>
> 1-  eepers! Okay, that was overlooked! Changed that. ^.^
>
> 2- Not everything is secure (https). SSL is configured outside of the httpd.conf file
for security reasons and defined in conf.d/someotherfile.conf, with conf.d being included
(see previous post)
>
> 3- context files are located in their respective directories within catalin home (/tomcat_home/conf/Catalina/mydomain1.com
 et al)
> I followed option #2 of http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html
>
>
>
>
> Okay, fixed the virtual Host:
>     JkMount /*.jsp tomcat
>     JkMount /servlet/* tomcat
>
> Restarted, yet Apache is still not handing off to TC. The TC serves up my webapps fine
when standalone (either as 80 or 8080).
>
> Should the localhost property in workers.properties be changed to the IP (or domain name)
of the designated webapp? 
>
> IE:
> /somedirectory/worker.properties
>    worker.list=tomcat
>    worker.tomcat.host=localhost   change "localhost" to "123.234.345.1" or "mydomain.com"???
>    worker.tomcat.port=8009
>    worker.tomcat.type=ajp13
>
>
>
>
> ~LZM~
>
>
>
>
>
>
> -----Original Message-----
> From: Adam Gordon [mailto:adam.gordon@readytalk.com] 
> Sent: Tuesday, February 26, 2008 12:39 PM
> To: Tomcat Users List
> Subject: Re: Apache/Tomcat - mod_jk issues
>
> Lessie-
>
> Sorry to hear you're having trouble.  We use Apache/Tomcat in the same 
> way and assuming your snippets are reasonably complete I've noticed some 
> issues that may or may not be helping to cause problems:
>
> 1.  First and foremost, your worker list defines the worker name as 
> "tomcat" yet in your J/K mount in your VirtualHost you say "ajp13" as 
> the worker name.  I.e., "JkMount /*.jsp ajp13" should be "JkMount /*.jsp 
> tomcat".
>
> 2.  While I've not used the redirectPort attribute on the Connector 
> element, I'm assuming you are redirecting everything to HTTPS.  If this 
> is the case, I'm curious as to why you don't define either 
> SSLCertificateFile or SSLCertificateKeyFile in your VirtualHost.  We 
> have to to ensure the right certificate is served up with the right IP 
> since we don't have a site domain certificate.
>
> 3.  I don't see them but I'm also assuming that each of your webapps 
> have their own Context defined in the META-INF directory.
>
> That's all I noticed after a quick glance, but the biggie is #1.  Let us 
> know how it goes.
>
> --adam
>
>  
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2/26/2008 9:08 AM
>  
>
>   

---------------------------------------------------------------------
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


Mime
View raw message