On 14/03/2012 22:25, Dave Shevett wrote:
>> From: Pid <p...@pidster.com>
>> Exactly which OS, Java & Tomcat versions are you using?
> 
> This is an AWS micro instance running some variant of CentOS
> Tomcat 6.0.33
> [ec2-user@app01 tomcat6]$ java -version
> java version "1.6.0_22"
> OpenJDK Runtime Environment (IcedTea6 1.10.6)
> (amazon-52.1.10.6.41.amzn1-x86_64)
> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
> 
>>> <Context path="/" docBase="/var/wars/application.war" />
>>
>> path="" would be correct if it was valid here, which it is not - it is
>> redundant because the path is derived from the Context definition file
>> name 'ROOT.xml'.
> 
> Fair enough - I removed the path= entry from the ROOT.xml.
> 
>>> I'm assuming when I hit vhost.REDACTED.com, I should see a deployed
>>> version of the application.war, right? Or am I doing something
>>> blatantly stupidly wrong here?
>>
>> What _do_ you see?
> 
> Right now I'm getting 404's on the root.
> 
> sloop:~ shevett$ curl -I http://REDACTED.com/
> HTTP/1.1 404 Not Found
> Date: Wed, 14 Mar 2012 22:16:30 GMT
> Content-Type: text/html;charset=utf-8
> Content-Length: 952
> Connection: close

What is serving that error?  Tomcat & HTTPD error pages look different.


>> Are there any relevant messages in the Tomcat logs?
> 
> Just that the app was in fact unpacked into the work directory (and I
> can see it there), and it looked like it tried to start (there's a stack
> trace, but that's application specific - it definitely tried to start, I
> just don't know where it is)

If it didn't start, that would explain why you can't get it to respond.
What is the stacktrace?


p

>> How have you defined the Hosts in server.xml?
> 
> Umm, to be honest initially I hadn't. :(  I was trying to come up with a
> way to get 'dynamic' vhost allocation - kick a ROOT.xml and directory
> structure into place, restart / hup, and the vhost goes live.  That
> doesn't look possible (as it appears I need Host entries in server.xml
> to do this, which is hard to dynamically edit).
> 
> Anyway, I created a new Host entry, and added a Valve for logging:
> 
> <Host name="REDACTED.com" appBase="REDACTED.com" unpackWARs="false"
> autoDeploy="true">
> <Valve className="org.apache.catalina.valves.AccessLogValve"
> directory="logs" prefix="REDACTED_access_log." suffix=".txt"
> pattern="common" resolveHosts="false"/>
> </Host>
> 
> When I hit the host, the vhost is obviously getting handled, as I'm now
> getting traffic into the REDACTED_access.log, but it's not actually
> triggering the app:
> 
> [ec2-user@app01 tomcat6]$ cat REDACTED_access_log.2012-03-14.txt
> 96.39.62.78 - - [14/Mar/2012:21:58:01 +0000] "GET / HTTP/1.1" 404 952
> 96.39.62.78 - - [14/Mar/2012:21:58:01 +0000] "GET /favicon.ico HTTP/1.1"
> 404 952
> 
> Hope that's enough information!


-- 

[key:62590808]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to