tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edoardo Panfili <edoa...@aspix.it>
Subject Re: can't connect to manager application
Date Sat, 19 Oct 2013 21:57:52 GMT
Il 19/10/13 15:34, André Warnier ha scritto:
> Edoardo Panfili wrote:
>> Il 19/10/13 00:24, Mark Eggers ha scritto:
>>> On 10/18/2013 3:18 PM, André Warnier wrote:
>>>> Edoardo Panfili wrote:
>>>>> Il 17/10/13 18:45, Edoardo Panfili ha scritto:
>>>>>> My Tomcat (7.0.42) is listening on port 7080 and I have this
>>>>>> conf/tomcat-users.xml in (production server)
>>>>>>
>>>>>> -------
>>>>>> <tomcat-users>
>>>>>> <role rolename="manager-script"/>
>>>>>>   <user username="myname" password="pwd"
>>>>>> roles="manager-script,manager-gui,manager-jmx"/>
>>>>>> </tomcat-users>
>>>>>> ----------
>>>>>> if I use
>>>>>>
>>>>>> curl -u myname:pwd
>>>>>> http://localhost:7080/manager/text/reload?path=/myApplication
>>>>>>
>>>>>> the response is--------------------------
>>>>>>     <h1>404 Not found</h1>
>>>>>>     <p>
>>>>>>      The page you tried to access
>>>>>>      (/manager/text/reload)
>>>>>>      does not exist.
>>>>>>     </p>
>>>>>>     <p>
>>>>>>      The Manager application has been re-structured for Tomcat 7
>>>>>> onwards
>>>>>> and some
>>>>>>      of URLs have changed. All URLs used to access the Manager
>>>>>> application should
>>>>>>      now start with one of the following options:
>>>>>>     </p>
>>>>>>      <ul>
>>>>>>        <li>/manager/html for the HTML GUI</li>
>>>>>>        <li>/manager/text for the text interface</li>
>>>>>>        <li>/manager/jmxproxy for the JMX proxy</li>
>>>>>>        <li>/manager/status for the status pages</li>
>>>>>>      </ul>
>>>>>>     <p>
>>>>>>      Note that the URL for the text interface has changed from
>>>>>>      &quot;/manager&quot; to
>>>>>>      &quot;/manager/text&quot;.
>>>>>>     </p>
>>>>>>     <p>
>>>>>>      You probably need to adjust the URL you are using to access
the
>>>>>> Manager
>>>>>>      application. However, there is always a chance you have found
a
>>>>>> bug
>>>>>> in the
>>>>>>      Manager application. If you are sure you have found a bug, and
>>>>>> that
>>>>>> the bug
>>>>>>      has not already been reported, please report it to the Apache
>>>>>> Tomcat team.
>>>>>>     </p>
>>>>>> ---------------------------------------------------------
>>>>>
>>>>>
>>>>> Installation step by step:
>>>>>
>>>>> Unpack new download from tomcat.apache.org
>>>>>
>>>>> 1- set users
>>>>> <tomcat-users>
>>>>>   <user username="edoardo" password="pwd"
>>>>>     roles="manager-script,manager-gui,manager-jmx,other"/>
>>>>> </tomcat-users>
>>>>>
>>>>> then reload tomcat
>>>>> $curl -u edoardo:pwd
>>>>> http://localhost:8080/manager/text/reload?path=/examples
>>>>> OK - Reloaded application at context path /examples
>>>>>
>>>>>
>>>>> 2- copy myApplication from production server
>>>>> copy configuration file ($tomcat/Catalina/localhost/myApplication.xml)
>>>>> from production server
>>>>> stop & start tomcat
>>>>>
>>>>> $curl -u edoardo:pwd
>>>>> http://localhost:8080/manager/text/reload?path=/myApplication
>>>>> OK - Reloaded application at context path /myApplication
>>>>>
>>>>>
>>>>> 3- first modify to server.xml
>>>>> shutdown tomcat
>>>>> modify server.xml
>>>>> <Connector port="8080" protocol="HTTP/1.1"
>>>>> becomes
>>>>> <Connector port="9080" protocol="HTTP/1.1"
>>>>>
>>>>> start then curl again
>>>>> all well
>>>>>
>>>>>
>>>>> 4- second modify to server.xml
>>>>> <Host name="localhost"  appBase="webapps"
>>>>> unpackWARs="true" autoDeploy="true">
>>>>> becomes
>>>>> <Host name="localhost"  appBase="webapps"
>>>>> unpackWARs="true" autoDeploy="true" deployXML="false">
>>>>>
>>>>> stop-start
>>>>>
>>>>> $curl -u edoardo:pwd
>>>>> http://localhost:9080/manager/text/reload?path=/myApplication
>>>>> javax.servlet.ServletException: Error instantiating servlet class
>>>>> org.apache.catalina.manager.ManagerServlet
>>>>> [...]
>>>>>
>>>>> $curl -u edoardo:pwd
>>>>> http://localhost:9080/manager/text/reload?path=/myApplication
>>>>> the same error reported in the initial post (above)
>>>>>
>>>>>
>>>>>
>>>>> deployXML="false" is recommended at
>>>>> http://tomcat.apache.org/tomcat-7.0-doc/config/host.html and useful
>>>>> for me.
>>>>>
>>>> One big difference that I see when deployXML="false", is that this
>>>> file :
>>>> (catalina_base)/webapps/myApplication/META-INF/context.xml
>>>> is no longer being parsed,
>>>> and instead this file is parsed :
>>>> $tomcat/Catalina/localhost/myApplication.xml
>>>> when you reload your app.
>>>> What is the content of that file ?
>>>
>>>  From the last log file that was posted, these context files are pretty
>>> broken (although myApplication.xml only had the magic debug attribute
>>> set).
>>
>> another try:
>>
>> - remove deployXML="false" from server.xml
>> - cp $tomcat/conf/Catalina/localhost/myApplication.xml
>> $tomcat/webapps/myApplication/META-INF/context.xml
>> - stop then start tomcat
>>
>> $curl -u name:pwd
>> http://localhost:9080/manager/text/reload?path=/myApplication
>> OK - Reloaded application at context path /myApplication
>>
>
> That does look like a bug, doesn't it ?
> Or at least, it doesn't look like it matches what is written in
> http://tomcat.apache.org/tomcat-7.0-doc/config/host.html
> for "deployXML".
>
> What happens if you set autoDeploy="false" ?

sorry for the late of the response but this mail (and another one) is 
arrived in late.

autoDeploy="false" is the default setting and with default settings all 
goes well.

using autoDeploy="true" I must move manager context file in 
conf/Catalina/localhost (as explained in other post of this thread).

thank you
Edoardo



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


Mime
View raw message