tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anne Wilson <a...@unidata.ucar.edu>
Subject authentication problem deploying app to tomcat via ant
Date Fri, 09 Jun 2006 23:57:44 GMT
Hi,

I am trying to manage my tomcat webapp via ant, that is, start it, stop 
it, list apps, etc.  But I keep bumping up against an authentication 
problem.

I have read this:

http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html#Configuring%20Manager%20Application%20Access

and several other similar documents and related FAQs, etc., but am 
finding nothing that ties the error to this particular situation.


I have these and some other similar snippets in my build.xml:

<property name="tomcat.home" location="/opt/tomcat"/>
<property name="tomcat.manager.url"
    value="http://localhost:8080/manager"/>
<property name="tomcat.manager.username" value="xxxx"/>
<property name="tomcat.manager.password" value="yyyyy"/>

<taskdef name="list" classname="org.apache.catalina.ant.ListTask">
   <classpath>
     <path location="${tomcat.home}/server/lib/catalina-ant.jar"/>
   </classpath>
</taskdef>

<target name="list" description="List Tomcat applications">
   <list url="${tomcat.manager.url}"
     username="${tomcat.manager.username}"
     password="${tomcat.manager.password}"/>
</target>

Ant's [tidied] output is this (I may have munged the html):

list:
      [list] <html><head><title>Apache Tomcat/5.0.30 - Error 
report</title><style> <h1>HTTP Status 401 - </h1> <b>type</b>
Status 
report</p><p><b>message</b> <u></u></p><p><b>description</b>
<u>This 
request requires HTTP authentication ().</u>
BUILD SUCCESSFUL
Total time: 1 second

I've checked the username and password multiple times against 
tomcat-users.xml so I believe they are correct.  (I didn't have it right 
at first, and the error then was "Connection refused".  That error went 
away after I corrected them, so I think they are right now.)

I'm using java 1.5, tomcat 5.0.30, and ant 1.6.5 on Linux Fedora Core 5.

Any insights, suggestions or tips would be greatly appreciated!

TIA!

Anne





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message