[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] Tomcat - doesn't work: either enterstightloop or 404's



>  To run servlets for site1, you'd have to access them via:
>   http://test.benmoss.com/servlet/HelloWorld
>  Is that what you're using? Is the second site on a unique IP, or is
it a
> name-based host?

That's exactly what I'm doing.  It's the only site on that IP address
(because SSL is enabled).  It does have several aliases, although those
don't make it into the server.xml file.

To recap:

Here's the some of the bottom bits of server.xml:
===server.xml===
<Host name="test.benmoss.com">
  <Context path="" docBase="/home/sites/site1/web" debug="0"/>
  <Context path="/examples" docBase="/home/sites/site1/web/examples"
reloadable="true" debug="0"/>
</Host>
<Host name="205.200.36.57">
  <Context path="" docBase="/home/sites/site1/web" debug="0"/>
  <Context path="/examples" docBase="/home/sites/site1/web/examples"
reloadable="true" debug="0"/>
</Host>
<Host name="cobalt01-lc.qunara.net">
  <Context path="" docBase="/home/sites/home/web" debug="0"/>
</Host>
<Host name="205.200.36.56">
  <Context path="" docBase="/home/sites/home/web" debug="0"/>
</Host>
===end===


...and the files involved:

[root /root]# ls -l /home/sites/home/web/WEB-INF/classes/HelloWorld.*
-rw-r--r--   1 root     home          796 Jul 12 17:39
/home/sites/home/web/WEB-INF/classes/HelloWorld.class
-rw-r--r--   1 root     home          517 Jul 12 12:32
/home/sites/home/web/WEB-INF/classes/HelloWorld.java

[root /root]# ls -l /home/sites/site1/web/WEB-INF/classes/HelloWorld.*
-rw-r--r--   1 root     site1        1302 Jul 12 12:27
/home/sites/site1/web/WEB-INF/classes/HelloWorld.class
-rw-r--r--   1 root     site1        1330 Jul 12 12:27
/home/sites/site1/web/WEB-INF/classes/HelloWorld.java

...and the results:

[root /root]# telnet cobalt01-lc.qunara.net 80
Trying 192.168.252.150...
Connected to cobalt01-lc.qunara.net.
Escape character is '^]'.
GET /servlet/HelloWorld HTTP/1.0
Host: cobalt01-lc.qunara.net

HTTP/1.1 200 OK
Date: Fri, 13 Jul 2001 19:25:16 GMT
Server: Apache/1.3.12 Cobalt (Unix) mod_jk mod_ssl/2.6.4 OpenSSL/0.9.5a
PHP/4.0.3pl1 mod_auth_pam/1.0a FrontPage/4.0.4.3 mod_perl/1.24
Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java
1.3.1; Linux 2.2.16C27_III i386; java.vendor=Sun Microsystems Inc.)
Connection: close
Content-Type: text/html

<html><head><title>HelloWorld</title></head>
<body><p>The servlet has received a GET. This is the
reply.</p></body></html>
Connection closed by foreign host.


but...


[root /root]# telnet test.benmoss.com 80
Trying 205.200.36.57...
Connected to test.benmoss.com.
Escape character is '^]'.
GET /servlet/HelloWorld HTTP/1.0
Host: test.benmoss.com

HTTP/1.1 404 Not
Date: Fri, 13 Jul 2001 19:25:47 GMT
Server: Apache/1.3.12 Cobalt (Unix) mod_jk mod_ssl/2.6.4 OpenSSL/0.9.5a
PHP/4.0.3pl1 mod_auth_pam/1.0a FrontPage/4.0.4.3 mod_perl/1.24
Content-Length: 185
Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java
1.3.1; Linux 2.2.16C27_III i386; java.vendor=Sun Microsystems Inc.)
Connection: close
Content-Type: text/html

<head><title>Not Found (404)</title></head>
<body><h1>Not Found (404)</h1>
<b>Original request:</b> /servlet/HelloWorld<br><br>
<b>Not found request:</b> /servlet/HelloWorld</body>
Connection closed by foreign host.


And to coincide with those two tests, the following showed up in the
logs:
/var/log/httpd/access:
cobalt01-lc.qunara.net 192.168.252.150 - - [13/Jul/2001:14:25:22 -0500]
"GET /servlet/HelloWorld HTTP/1.0" 200 123 "-" "-"
test.benmoss.com 205.200.36.57 - - [13/Jul/2001:14:25:51 -0500] "GET
/servlet/HelloWorld HTTP/1.0" 404 185 "-" "-"

/var/log/httpd/error:
2001-07-13 02:25:51 - Ctx( test.benmoss.com: ): 404 R(  + /servlet +
/HelloWorld) null

/usr/java/jakarta-tomcat/logs/servlet.log:
2001-07-13 02:25:06 - path="" :HelloWorld: init

*Note: HelloWorld:init only occurs _once_ in servlet.log*

I'm stumped, frankly.  Accessing servlets (i.e.
/examples/servlet/SnoopServlet) in the example.war under
test.benmoss.com works!  The two HelloWorld servlets I'm using are not
quite identical...
OK, I just made them identical - and I get the same !@#$%^ behaviour.

I'm stumped here - any help is appreciated.

-Adam Thompson
 Qunara
 adamt@xxxxxxxxxx
 (204) 925-3256 - office
 (204) 932-0069 - fax