tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: can't connect to manager application
Date Sun, 20 Oct 2013 18:46:27 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

On 10/20/13 2:44 PM, Christopher Schultz wrote:
> Edoardo,
> 
> On 10/18/13 6:03 PM, 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.
> 
> I'll bet the problem is that Tomcat doesn't like applications 
> declaring themselves to be privileged="true". The first time Tomcat
> is started, META-INF/context.xml from the Manager is copied into 
> conf/Catalina/localhost/manager.xml where the privileged="true" is 
> preserved. With deployXML="false", this file is not copied and so 
> META-INF/context.xml is used instead. Tomcat maybe doesn't allow 
> META-INF/context.xml to contain privileged="true".
> 
> (Of course, Tomcat seems perfectly happy to copy
> META-INF/context.xml into conf/Catalina/localhost/manager.xml and
> *then* permit privileged="true" so my premise is a bit shaky).

Duh. I had this entirely backwards. Please ignore the noise.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSZCUDAAoJEBzwKT+lPKRYhQEQAMM21VkOkwCIb2lKcwv15ev4
0tDgNC3lZ4kW7g0srcD9EqxZV29vqUXPKknkCNib1upajaCUf8NRDedJmeUv2riO
Bn73ezkaQIvjIejgAOQ7FsEGxh5VI483BpDkAMygILN19mUc4rPdT2PEp0u0S1S2
81MK85SujwHNiflZXxf76G3/Y1991gzD0Qpr8HDniPDrgW/ITDmsET4HMi4sw31u
aXmSLo57iwJf/L/mIfCxTCakb8AveqyvR9Sx5ktRAGGS45nihOqHKs74dstM9d4H
A8l1eHpGy34DDlKzDFA8OXjJO+ExhE37a8/Tw+6Ml9BS4evoNM6WL1KlfTc1SIN5
HXSNSnkTFqNPgefA3G0rH8/jNZNKnn2RyTynOZuGqe5Jpuv8sgugvU1Q3rHzcc/N
i9idIWSM4TS3fxJRFSpw47FyhFXiI5qb0k8hxM52IuOZoOHavKn5w52C1ahRpNaY
X055rKeTqz2mu/uajhtH+FdFVZWaC65mmvtIgeRbzdTzberTRjNNBNyxv7Q6u1Cv
EAYjChm5VUaWM1aPmjdb1MWNdVRuFI2Mlm8FEI9gfj8RTQ0KmOtyUk10y0VQYKel
MMdnC4oN+UeGL99OMrNJFVOL/1dh571iqrrWNiYBp6YlpPnm9FWfjCeNeLcJgjXV
tJG5Tk1G27t3/FfNBdHV
=sZRe
-----END PGP SIGNATURE-----

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


Mime
View raw message