You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Mark W. Webb" <ma...@dolphtech.com> on 2003/04/16 15:31:16 UTC

problem with ant and reload of application

I am wondering why the "/" is being interpreted in hex format (2F = "/")
I have the following in my build.xml file :

<--snip-->
<property name="path"      value="/iwc"/>
<--snip-->

<--snip-->
<taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>

   <target name="reload" description="Reload web application" depends="all">
           <reload url="${url}"
                   username="${username}"
                   password="${password}"
                   path="${path}"/>
   </target>
<--snip-->


I get the following error:

ant reload
Buildfile: build.xml

init:

all:

reload:

BUILD FAILED
file:/home/markw/iwc/build.xml:30: java.io.IOException: Server returned HTTP response code: 401 for URL: http://127.0.0.1/manager/reload?path=%2Fiwc

Total time: 5 seconds







---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: problem with ant and reload of application

Posted by Karsten Wutzke <kw...@web.de>.
I get exactly the same when using an invalid login. Not sure what it is. 
May have to do with some character encoding stuff. Can't help there though.

When working on Win, just open the MShell (not Cygwin). While holding 
down left Alt, enter 47 on the num pad and a slash will appear. Nice 
trick to confirm ASCII codes. 2F == 47

Karsten

Mark W. Webb wrote:

> yes!
> 
> that was the problem.  I forgot to add the user.  Thank you.
> Although I am not sure why the "/" was interpreted in hex if the user 
> does not exist ?  Shouldn't you get some other response ?
> 
> 
> Karsten Wutzke wrote:
> 
>> Had this HTTP 401 error yesterday. Looks like your authentication with 
>> Tomcat manager app does not work.
>>
>> Have you added a user plus password with the role as manager in 
>> $CATALINA_HOME/conf/tomcat-users.xml?
>>
>>   <user username="myaccount" password="mypass" roles="manager"/>
>>
>> This has been done in Tomcat for security reasons, so no one can 
>> access the manager app by default. That way you are forced to do 
>> create a user.
>>
>> HTH
>> Karsten
>>
>> Mark W. Webb wrote:
>>
>>> I am wondering why the "/" is being interpreted in hex format (2F = "/")
>>> I have the following in my build.xml file :
>>>
>>> <--snip-->
>>> <property name="path"      value="/iwc"/>
>>> <--snip-->
>>>
>>> <--snip-->
>>> <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
>>>
>>>   <target name="reload" description="Reload web application" 
>>> depends="all">
>>>           <reload url="${url}"
>>>                   username="${username}"
>>>                   password="${password}"
>>>                   path="${path}"/>
>>>   </target>
>>> <--snip-->
>>>
>>>
>>> I get the following error:
>>>
>>> ant reload
>>> Buildfile: build.xml
>>>
>>> init:
>>>
>>> all:
>>>
>>> reload:
>>>
>>> BUILD FAILED
>>> file:/home/markw/iwc/build.xml:30: java.io.IOException: Server 
>>> returned HTTP response code: 401 for URL: 
>>> http://127.0.0.1/manager/reload?path=%2Fiwc
>>>
>>> Total time: 5 seconds
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: problem with ant and reload of application

Posted by "Mark W. Webb" <ma...@dolphtech.com>.
yes!

that was the problem.  I forgot to add the user.  Thank you.
Although I am not sure why the "/" was interpreted in hex if the user 
does not exist ?  Shouldn't you get some other response ?


Karsten Wutzke wrote:

> Had this HTTP 401 error yesterday. Looks like your authentication with 
> Tomcat manager app does not work.
>
> Have you added a user plus password with the role as manager in 
> $CATALINA_HOME/conf/tomcat-users.xml?
>
>   <user username="myaccount" password="mypass" roles="manager"/>
>
> This has been done in Tomcat for security reasons, so no one can 
> access the manager app by default. That way you are forced to do 
> create a user.
>
> HTH
> Karsten
>
> Mark W. Webb wrote:
>
>> I am wondering why the "/" is being interpreted in hex format (2F = "/")
>> I have the following in my build.xml file :
>>
>> <--snip-->
>> <property name="path"      value="/iwc"/>
>> <--snip-->
>>
>> <--snip-->
>> <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
>>
>>   <target name="reload" description="Reload web application" 
>> depends="all">
>>           <reload url="${url}"
>>                   username="${username}"
>>                   password="${password}"
>>                   path="${path}"/>
>>   </target>
>> <--snip-->
>>
>>
>> I get the following error:
>>
>> ant reload
>> Buildfile: build.xml
>>
>> init:
>>
>> all:
>>
>> reload:
>>
>> BUILD FAILED
>> file:/home/markw/iwc/build.xml:30: java.io.IOException: Server 
>> returned HTTP response code: 401 for URL: 
>> http://127.0.0.1/manager/reload?path=%2Fiwc
>>
>> Total time: 5 seconds
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: problem with ant and reload of application

Posted by Karsten Wutzke <kw...@web.de>.
Had this HTTP 401 error yesterday. Looks like your authentication with 
Tomcat manager app does not work.

Have you added a user plus password with the role as manager in 
$CATALINA_HOME/conf/tomcat-users.xml?

   <user username="myaccount" password="mypass" roles="manager"/>

This has been done in Tomcat for security reasons, so no one can access 
the manager app by default. That way you are forced to do create a user.

HTH
Karsten

Mark W. Webb wrote:

> I am wondering why the "/" is being interpreted in hex format (2F = "/")
> I have the following in my build.xml file :
> 
> <--snip-->
> <property name="path"      value="/iwc"/>
> <--snip-->
> 
> <--snip-->
> <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
> 
>   <target name="reload" description="Reload web application" depends="all">
>           <reload url="${url}"
>                   username="${username}"
>                   password="${password}"
>                   path="${path}"/>
>   </target>
> <--snip-->
> 
> 
> I get the following error:
> 
> ant reload
> Buildfile: build.xml
> 
> init:
> 
> all:
> 
> reload:
> 
> BUILD FAILED
> file:/home/markw/iwc/build.xml:30: java.io.IOException: Server returned 
> HTTP response code: 401 for URL: 
> http://127.0.0.1/manager/reload?path=%2Fiwc
> 
> Total time: 5 seconds
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org