You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Juan <jj...@lazerlink.com> on 2000/07/04 21:32:26 UTC
Tomcat+Apache problem
Small bug in bin\*.batHi there
I am new in the list, so forgive me is this was already posted/fixed.
I am running RH linux 6.1+apache 1.3.9
Just installed Tomcat and it works fine as a standalone server.
(hhtp://myserver:8080 )
When trying to make it work with Apache
http://myserver:8007
this would just make my browser time out. nothing happens.
I was using an old mod_jserv.so, so decided to compile it from the Tomcat
src by following the instructions in the Tomcat User;s Guide.
This is the error message I get now:
[root@cyclone jserv]# HANDLER THREAD PROBLEM: java.io.IOException: Stream
broken
java.io.IOException: Stream broken
at
org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp1
2ConnectionHandler.java:386)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:134)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Thread.java:475)
Any Ideas?
Thanks in advance
Juan
==================================================
Note: The Tomcat code used in my httpd.conf
LoadModule jserv_module libexec/mod_jserv.so
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel notice
ApJServDefaultPort 8007
AddType text/jsp .jsp
AddHandler jserv-servlet .jsp
Alias /examples /web/tomcat/webapps/examples
<Directory "/web/tomcat/webapps/examples">
Options Indexes FollowSymLinks
</Directory>
ApJServMount /examples/servlet /examples
<Location /examples/WEB-INF/ >
AllowOverride None
deny from all
</Location>
Alias /test /web/tomcat/webapps/test
<Directory "/web/tomcat/webapps/test">
Options Indexes FollowSymLinks
</Directory>
ApJServMount /test/servlet /test
<Location /test/WEB-INF/ >
AllowOverride None
deny from all
</Location>
ApJServMount /servlet /ROOT
<LocationMatch /examples/jsp/*.jsp>
SetHandler jserv-servlet
</LocationMatch>
RE: Tomcat+Apache problem. Thanks Maurizio
Posted by Juan <jj...@lazerlink.com>.
Maurizio
this seems to be working. My mistake was in trying to access the server
through http://localhost:8007
I can get the servlets now through http://myserver/examples/...
It seems that adding the new mod_jserv.so helped to have it working after
all.
Thanks again
Juan
Re: Tomcat+Apache problem
Posted by Maurizio Calcara <m....@cgsgroup.it>.
Hi Juan,
I have experencied your same trouble and I have solved it with the
team's support. The problem is a wrong use of the mod_jserv.o driver. I
will include the two email that help me to understand how to use
correctly the software.
Bye,
Maurizio
------
Maurizio,
As a supplement to Ed's very-well-put replies on this
thread...
The form of a URL is: protocol://hostname:portnumber/path
When you talk to a webserver, like Apache, with your browser,
you are using the HTTP protocol, which is why you type in:
http://www.RobSlifka.com/GodFatherOfSoul/
Here, protocol = http, hostname = www.RobSlifka.com, port = 80
("well-known" / default for the HTTP protocol), and path =
/GodFatherOfSoul/
What you're telling your browser to do is to use the HTTP
protocol to carry out communications with the host
www.RobSlifka.com on port 80, and you are requesting the
contents of the path /GodFatherOfSoul.
Now, think about what you're attemping with Netscape. From
your web browser, you're trying to talk to Tomcat on port 8007
by using the AJPV12 protocol. ***This protocol is not used
for communication from a web browser to a web server***. This
is a protocol used by Tomcat/JServ/Apache for internal
communication ***ONLY***. The *only only only* time you need
deal with AJP is making sure that Tomcat has an AJP listen
port (8007 by default, and is obviously working with your
setup or
else Tomcat wouldn't be giving you the HANDLER THREAD
exceptions) and that Apache is set to communicate with it.
Other than that, you never ever ever need to even think about
AJPV12, let alone type it in anywhere.
Hope this helps!
------
The mistake is the http://localhost:8007 bit. You don't talk
to the tomcat servlet engine directly, you must go through a
web
server. In stand alone mode, Tomcat creates it's own
web-server which you must go through (by default it is 8080),
however
when you combine it with apache, you MUST go through the
apache webserver process - you have no choice (unless of
course you grab the ajpv12 protocol code and write your own
client...)
I apologise if the following is a little patronising, but here
goes :)
Example of calling the SnoopServlet
The URL would be http://your.host.name/servlet/SnoopServlet
The tomcat apache config file instructs apache that any
request to the servlet directory is to be passed to tomcat via
the ajpv12
protocol so it can process the request instead - this is
completely transparent to the calling client browser - as
apache itself
cannot serve Servlets directly.
------
Juan wrote:
> Hi thereI am new in the list, so forgive me is this was already
> posted/fixed.I am running RH linux 6.1+apache 1.3.9Just installed
> Tomcat and it works fine as a standalone server. (hhtp://myserver:8080
> )When trying to make it work with Apache http://myserver:8007 this
> would just make my browser time out. nothing happens.I was using an
> old mod_jserv.so, so decided to compile it from the Tomcat src by
> following the instructions in the Tomcat User;s Guide.This is the
> error message I get now:[root@cyclone jserv]# HANDLER THREAD PROBLEM:
> java.io.IOException: Stream broken
> java.io.IOException: Stream broken
> at
> org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp12ConnectionHandler.java:386)
>
> at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:134)
>
> at
> org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
>
> at java.lang.Thread.run(Thread.java:475)Any Ideas?Thanks in
> advance
--
dr. Maurizio Calcara
m.calcara@cgsgroup.it