-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 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 "/manager" to >> "/manager/text". </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). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSZCSiAAoJEBzwKT+lPKRYVWMP/i10Iq+m2XVnA2KwTRByvuUV +10IF2pIKIPvvAKUDMqLynx18eTY0gavNf3P4SgnIhO4Pjw8eWYx4//n048XgAW7 WUUTx/Nvab+/aZLJKVgHlRulIX5JhHhMGHoZ7brUD3gPz3PkrE8seKtb1eYNmZlj vRnQ+tgTd08uzOa0SBJS0x0OuyqCou7JQOpC8lYXSXnkBmLzvLWb8P0KUPYSbeQL CdaThxg3d2nZoLlzYZDn9+pwhDnX/cFikiyTSQtVOdJWtfgWBbG3lqVsH1exN7+c D4dHMJNMteuyt70rtHNRH4SrqN4JkrXnE+/AyuGs2U34QPv6KsJhAs4x69cFWg6q B8a8loEy8xE2+Z+yESSdJshyJFgwE5F9LIEvXmXJpwMlq+sJ5t9IAPm6Uf7ZA0mf VVSNczh/8TceQHMCaEhVvlJdzdKYuoB4dsmHtl18Rg8QmFjEQj7vOzQwu/epD9nF dOYZLDm2moLVVbHxgXeNgckQDO0zOKyBIKdL0aK+/QvfDF384y5oSaZ/JCvrj/68 C4Qn4xFtrrkLI54+mGggxlrZsU3NqvXXLSbEBIidCMhzGaBAsCGHxiWBkht5hOR0 WxuJtUqZiwlXkSvT0clBKZfFBn2h60h2ErfgH8DlBsT+nwIvdoV2jkTcWDkDbjUI 2H6HmhdfZtacUspX/+uR =mhPS -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org