Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

apache not passing jsp requests to tomcat (config looks ok)

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  cgi vs. mod_perl & other oddities  
Author Message
apseyed

External


Since: Jul 03, 2003
Posts: 7



(Msg. 1) Posted: Thu Jul 03, 2003 3:57 pm
Post subject: apache not passing jsp requests to tomcat (config looks ok)
Archived from groups: alt>apache>configuration (more info?)

Looks like everything is configured correctly, _but_ when i navgate to
execute a jsp page within the JkMount path (httpd.conf), the apache
webserver displays it as html/plain text, so it looks like apache is not
handing off to mod_jk and the tomcat connector for some reason...

http://<hostname>/examples <permission denied>
http://<hostname>/examples/jsp page i cannot execute any of the jsp pages,
it just shows the script as text.

Here is my config:

in the /usr/local/tomcat/conf/server.xml:
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
-->

so when tomcat is started on port 8080 , the connector will start on port
8009

the /etc/httpd/conf/httpd.conf file looks like this (regarding Tomcat):
LoadModule jk_module modules/mod_jk.so
AddModule mod_jk.c

this used to complain, but i troubleshot a problem where i needed to put
mod_jk.so before mod_dir.so

##at the end of httpd.conf:

JkWorkersFile /usr/local/tomcat/conf/workers.properties
JkLogFile /var/log/mod_jk.log
JkLogLevel debug
Alias /examples /usr/local/tomcat/webapps/examples
JkMount /examples/servlet/* testWorker
JkMount /examples/*.jsp testWorker
#JkMount /examples/*.jsp testWorker
<location "/examples/web-inf/">
AllowOverride None
deny from all
</location>

and the workers.properties file:
worker.list=testWorker
worker.testWorker.port=8009
worker.testWorker.host=localhost
worker.testWorker.type=ajp13

when i start up tomcat the /usr/local/tomcat/logs/catalina.out shows:
Apache Tomcat/4.1.24
Jul 3, 2003 10:20:24 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Jul 3, 2003 10:20:24 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Jul 3, 2003 10:20:24 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/71
config=/usr/local/tomcat/conf/jk2.properties

/var/log/mod_jk.log doesn't make any complaints either.


well any ideas about appreciated,
/Patrice

 >> Stay informed about: apache not passing jsp requests to tomcat (config looks ok) 
Back to top
Login to vote
davide

External


Since: Jul 07, 2003
Posts: 44



(Msg. 2) Posted: Thu Jul 03, 2003 8:04 pm
Post subject: Re: apache not passing jsp requests to tomcat (config looks ok) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Patrice Seyed <apseyed RemoveThis @bu.edu> wrote:
 > in the /usr/local/tomcat/conf/server.xml:
 > acceptCount="10" debug="0"/>
 > -->

Why there is that last "comment" line?

 > /var/log/mod_jk.log doesn't make any complaints either.

Any info in any log files?

Davide<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: apache not passing jsp requests to tomcat (config looks ok) 
Back to top
Login to vote
apseyed

External


Since: Jul 03, 2003
Posts: 7



(Msg. 3) Posted: Thu Jul 03, 2003 8:04 pm
Post subject: Re: apache not passing jsp requests to tomcat (config looks ok) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Davide,

my bust, here is the server.xml section (i pasted the wrong one, which i
have commented out now):

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="0"
useURIValidationHack="false"

protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>


well catalina.out shows:

Starting service Tomcat-Standalone
Apache Tomcat/4.1.24
Jul 3, 2003 10:20:24 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Jul 3, 2003 10:20:24 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Jul 3, 2003 10:20:24 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/71
config=/usr/local/tomcat/conf/jk2.properties

and so ajp13 connector is opening up on 8009 and tomcat on 8080

and netstat confirms:
# netstat -nap | grep 80
tcp 0 0 127.0.0.1:8005 0.0.0.0:* LISTEN
19671/java
tcp 0 0 0.0.0.0:8009 0.0.0.0:* LISTEN
19671/java
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
19727/httpd
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
19671/java


which log files are you referring to?


<davide DeleteThis @yahoo.com> wrote in message
news:be1nnj$91rr$3@ID-18487.news.dfncis.de...
 > Patrice Seyed <apseyed DeleteThis @bu.edu> wrote:
  > > in the /usr/local/tomcat/conf/server.xml:
  > > acceptCount="10" debug="0"/>
  > > -->
 >
 > Why there is that last "comment" line?
 >
  > > /var/log/mod_jk.log doesn't make any complaints either.
 >
 > Any info in any log files?
 >
 > Davide<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache not passing jsp requests to tomcat (config looks ok) 
Back to top
Login to vote
davide

External


Since: Jul 07, 2003
Posts: 44



(Msg. 4) Posted: Thu Jul 03, 2003 8:58 pm
Post subject: Re: apache not passing jsp requests to tomcat (config looks ok) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Patrice Seyed <apseyed.RemoveThis@bu.edu> wrote:
 > well catalina.out shows:

Well, besides the fact that I'm using the Light Editin (LE) on one of my
servers I see exactly the same. Check on the Apache's Error log if there
is a line with "mod_jk" in the startup of Apache, so you know that
mod_jk is correctly initialized. Them check if there is any error in
the communication between Apache and Tomcat.

Davide<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache not passing jsp requests to tomcat (config looks ok) 
Back to top
Login to vote
apseyed

External


Since: Jul 03, 2003
Posts: 7



(Msg. 5) Posted: Thu Jul 03, 2003 8:58 pm
Post subject: Re: apache not passing jsp requests to tomcat (config looks ok) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

no complaints about mod_jk in /var/log/httpd/errorlog.
before it used to complaint but that was because of the location of the
directive in httpd.conf.

i'm guess its either:
1)not finding the path to the java classes to execute the jsp pages
or
2)apache is not passing requests to the ajp connector to pass to tomcat...

not sure what other logs i can look at to determine and trace it

/Patrice

<davide DeleteThis @yahoo.com> wrote in message
news:be1qsj$a48t$1@ID-18487.news.dfncis.de...
 > Patrice Seyed <apseyed DeleteThis @bu.edu> wrote:
  > > well catalina.out shows:
 >
 > Well, besides the fact that I'm using the Light Editin (LE) on one of my
 > servers I see exactly the same. Check on the Apache's Error log if there
 > is a line with "mod_jk" in the startup of Apache, so you know that
 > mod_jk is correctly initialized. Them check if there is any error in
 > the communication between Apache and Tomcat.
 >
 > Davide<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache not passing jsp requests to tomcat (config looks ok) 
Back to top
Login to vote
davide

External


Since: Jul 07, 2003
Posts: 44



(Msg. 6) Posted: Thu Jul 03, 2003 9:22 pm
Post subject: Re: apache not passing jsp requests to tomcat (config looks ok) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Patrice Seyed <apseyed RemoveThis @bu.edu> wrote:
 > before it used to complaint but that was because of the location of the
 > directive in httpd.conf.

It shouldn't complain, no matter where you put it. If you use
apachectl configtest what does it display?

 > 1)not finding the path to the java classes to execute the jsp pages

In this case you should receive a 500 internal error and some kind of
error should be logged in the jk log file.

 > 2)apache is not passing requests to the ajp connector to pass to tomcat...

This is the most likely, the problem is WHY. My guess is that the mod_jk
doesn't get loaded or activated, so the entire configuration is simply
skipped.

Davide<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache not passing jsp requests to tomcat (config looks ok) 
Back to top
Login to vote
apseyed

External


Since: Jul 03, 2003
Posts: 7



(Msg. 7) Posted: Thu Jul 03, 2003 9:22 pm
Post subject: Re: apache not passing jsp requests to tomcat (config looks ok) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

apachectl configtest displays:
Warning: DocumentRoot [/www/docs/<hostname.domain.edu/test] does not exist
Syntax OK

the warning is refering to a not existant documentroot path on one of my few
virtual hosts, and its just a warning as you see.

by the way, the explain the jk_module thing,
when i put:
LoadModule jk_module modules/mod_jk.so

before:
LoadModule dir_module modules/mod_dir.so

in httpd.conf

it complains:

# service httpd start
Starting httpd: Syntax error on line 227 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/mod_jk.so into server:
/etc/httpd/modules/mod_jk.so: undefined symbol: dir_module

when i moved it after mod_dir line it didn't complain, I assumed this is a
dependency.

I was also just looking at my server.xml and wondering if i need to add a
Context Path, I've seen this in some of the docs, but not the initial one i
followed:

<a style='text-decoration: underline;' href="http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html" target="_blank">http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html</a>

->I was also wondering if i should use the warp connector instead, which is
commented

so i'm starting to think its the connnector and not necessarily the apache
module (since it doesn't complain), and for the above reasons. Not sure
about the Context Path and warp items in server.xml.

so yea, the goal is getting <a style='text-decoration: underline;' href="http://genetics.bumc.bu.edu/examples/jsp/" target="_blank">http://genetics.bumc.bu.edu/examples/jsp/</a> items
to run through tomcat on apache..for a while i thought it was my JkMount
directives in httpd.conf, but i think they're ok.

/Patrice

<davide.DeleteThis@yahoo.com> wrote in message
news:be1s9h$a48t$3@ID-18487.news.dfncis.de...
 > Patrice Seyed <apseyed.DeleteThis@bu.edu> wrote:
  > > before it used to complaint but that was because of the location of the
  > > directive in httpd.conf.
 >
 > It shouldn't complain, no matter where you put it. If you use
 > apachectl configtest what does it display?
 >
  > > 1)not finding the path to the java classes to execute the jsp pages
 >
 > In this case you should receive a 500 internal error and some kind of
 > error should be logged in the jk log file.
 >
  > > 2)apache is not passing requests to the ajp connector to pass to
tomcat...
 >
 > This is the most likely, the problem is WHY. My guess is that the mod_jk
 > doesn't get loaded or activated, so the entire configuration is simply
 > skipped.
 >
 > Davide<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache not passing jsp requests to tomcat (config looks ok) 
Back to top
Login to vote
davide

External


Since: Jul 07, 2003
Posts: 44



(Msg. 8) Posted: Thu Jul 03, 2003 9:50 pm
Post subject: Re: apache not passing jsp requests to tomcat (config looks ok) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Patrice Seyed <apseyed DeleteThis @bu.edu> wrote:
 > I was also just looking at my server.xml and wondering if i need to add a
 > Context Path, I've seen this in some of the docs, but not the initial one i
 > followed:

Take a look at my httpd.conf and server.xml, you can get them from
<a style='text-decoration: underline;' href="ftp://ftp.clockwork.nl/pub/httpd.conf" target="_blank">ftp://ftp.clockwork.nl/pub/httpd.conf</a> and
<a style='text-decoration: underline;' href="ftp://ftp.clockwork.nl/pub/server.xml." target="_blank">ftp://ftp.clockwork.nl/pub/server.xml.</a>

Davide<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache not passing jsp requests to tomcat (config looks ok) 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Apache+Tomcat+Cocoon - Anyone ever get those 3 latest-stable release ever work? I got Apache+Tomcat works fine. But I can't get Cocoon to work. All I got when I did http://localhost:8080/cocoon is a directory listing. Helps are greatly appreciated. PS: Its too confusing to....

local virtual host config for testing setup problem - Ive got a dynddns address which works fine frmo the outside world. I want to set up another virtual host for testing purposes accessible only from my machine. from vhosts.conf ################# Named VirtualHosts NameVirtualHost * <VirtualHost *>....

adding document include path to working shtml config - adding document include path to working shtml config in Apache 1.3.x I have server side includes working but would like to set a path for include statements to look in --other than current directory--. i.e. If the #include file doesn't insist in....

Connection between Apache2 + Tomcat 4.1 - I've read and search the google but have no luck. I got Apache 2, Tomcat 4.1, and Cocoon running on my Windows XP. Now, how do I connect the Apache with Tomcat? It seems there are a few solutions, namely mod_jk2 and mod_webapp. Question: 1. Which one....

Apache +OpenSSL - Hi Group, I'm having a problem with Apache 2.0.45 on Win32. I'm trying to install a chained SSL certificate, but on restarting Apache, I get the error "Unable to configure verify locations for client authentication" The certificate was pur...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]