On 2/21/11 6:03 PM, Konstantin Kolinko wrote: > Tomcat respond with error 400 when it cannot map request to a valid > web application (and thus feels desperate).
Interesting... > One notorious case of it is when there is no ROOT webapp on a host: > instead of error 404 you will receive zero-length response with HTTP > response code of 400. > >>From a comment in your server.xml you know that you are missing the ROOT >>webapp: > > <!-- (...) All vhosts except congov2 are working properly The > difference is they have ROOT.xml files, and congov2 does not --> > > Do you have ROOT.xml on your default host (the "localhost" in your > configuration) as well? Nope, here's what's in localhost: dbs@nimitz:/etc/tomcat5.5/Catalina/localhost$ ls -l total 12 -rwxrwx--- 1 tomcat55 adm 795 2007-06-04 17:06 admin.xml -rwxrwx--- 1 tomcat55 adm 266 2007-06-04 17:06 host-manager.xml -rwxrwx--- 1 tomcat55 adm 370 2007-06-04 17:06 manager.xml >> REDACTED.com:80 172.16.1.1 - - [21/Feb/2011:12:29:38 -0500] "PUT >> /manager/deploy?path=%2Fcongo&war=&update=true HTTP/1.0" 400 - "-" >> "Tomcat Maven Plugin/1.1" > > The above is an HTTP/1.0 request. I wonder whether it is mapped to a > virtual host correctly or whether it is served by localhost instead > (that depends on what is actually sent to Tomcat, though I see > REDACTED.com in the above log line). So the 1.0 request was due to a proxy problem I was working on elsewhere that was forcing the proxy to 1.0. I've removed that setting, but still getting the error: congov2.stonekeep.com:80 172.16.1.1 - - [21/Feb/2011:20:28:56 -0500] "GET / HTTP/1.1" 400 - "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4" congov2.stonekeep.com:80 172.16.1.1 - - [21/Feb/2011:20:29:00 -0500] "GET /manager/ HTTP/1.1" 400 - "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4" > You say that you have manager.xml deployed on that host, but is it > actually running? (autodeploy is off on your host, so Tomcat won't > notice the new webapp, unless you restart it, or tell it through API > or JMX like the manager app does). Is the manager webapp starting up > mentioned in the logs when Tomcat starts up? > > Is that manager.xml file readable by the user that runs Tomcat? -rwxr-x--- 1 dbs dbs 364 2011-02-21 15:41 manager.xml You sir, are a god. Now when I hit /manager/html, I get a login prompt - and my Jenkins build just did a successful push of the app: [INFO] [tomcat:deploy] [INFO] Deploying war to http://congov2.stonekeep.com/congo [INFO] OK - Undeployed application at context path /congo [INFO] OK - Deployed application at context path /congo [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL HOORAY! So in all honesty, this is now going back to a question I was trying to solve to begin with - this may hijack the thread, but here goes anyway. The other vhosts have fixed deployments. They have ROOT.xml's that deploy the .war file for each vhost: <Context path="/" docBase="/var/lib/tomcat5.5/webapps/congo-2.0.3.6.war"> <Parameter name="congo.home" value="/var/lib/congo/arisia.stonekeep.com/" override="false" /> <Parameter name="log4j.xml.url" value="file:/var/lib/congo/arisia.stonekeep.com/log4j.xml" override="false" /> </Context> The Parameter is needed for the vhost to specify where to write configuration files. If jenkins is forcing the deploy via the app manager, how do I specify parameters for the vhost context path "http://congov2.stonekeep.com/congo/" ? (I've also been informed the 'path="/"' here is illegal. It was left over by the first person who built this setup - haven't tried removing it yet :) Again, ENORMOUS thanks. -d --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org