Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 68DFB18CB9 for ; Tue, 13 Oct 2015 15:32:15 +0000 (UTC) Received: (qmail 10200 invoked by uid 500); 13 Oct 2015 15:32:10 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 10143 invoked by uid 500); 13 Oct 2015 15:32:10 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 10132 invoked by uid 99); 13 Oct 2015 15:32:10 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2015 15:32:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 055EB180E3C for ; Tue, 13 Oct 2015 15:32:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.869 X-Spam-Level: ** X-Spam-Status: No, score=2.869 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id JZ2awEjVZNuf for ; Tue, 13 Oct 2015 15:32:05 +0000 (UTC) Received: from nm21.bullet.mail.bf1.yahoo.com (nm21.bullet.mail.bf1.yahoo.com [98.139.212.180]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 80E2520758 for ; Tue, 13 Oct 2015 15:32:05 +0000 (UTC) Received: from [98.139.214.32] by nm21.bullet.mail.bf1.yahoo.com with NNFMP; 13 Oct 2015 15:31:58 -0000 Received: from [98.139.212.214] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 13 Oct 2015 15:31:57 -0000 Received: from [127.0.0.1] by omp1023.mail.bf1.yahoo.com with NNFMP; 13 Oct 2015 15:31:57 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 863433.68081.bm@omp1023.mail.bf1.yahoo.com X-YMail-OSG: EwWpQfMVM1mvmVEUZ_GYAxZFci8.DSlwRXAWMYB4QyBJr8_H9kDUViCxU_3.Pq1 1JYKijihS77A10eOopmkAk8wBmWwdmhTrKZF2Dfz0XYqncxpui1YDbL5D3sP0Qxvl7OYlysel442 cok5lcdOx42vFwepyBYMXVDPL7g8sYZUDg__gAE2w31fjOWuXj5YtVzUTIpQDxVEoiBcApWzaOKE 3DhSUyhrzkOkYIb7Wfkd1CONdAcxTaSXzIb8pO9wnm0er9uiPI5XEbRz.q3X4cSu_1o4Vwx3iVuV iFZzkMKSCqMZAboPTsf4FPIsEYPzds6o.6WuKtvPEO_VPgqZ00vKTsGP_fCFCiahJ48WmmgLzvSA tyGs3pUx_MnrvYyaXOjUI.2UIe9HwmFsWMZ8hkSKnK6NiInl5jTbEf8YPvUXK9XLSyd4gK4srp6z uI3DQWnPsT5g9j4grItnB8pK3dY3fTvmcZ.K3fnWJwbanyCouK7p0toOwIpnrALEQS9y8IylbAFt ROYvd Received: by 76.13.26.109; Tue, 13 Oct 2015 15:31:56 +0000 Date: Tue, 13 Oct 2015 15:31:55 +0000 (UTC) From: ptruche Reply-To: ptruche To: Tomcat Users List Message-ID: <1710558597.2999995.1444750315764.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <561D2128.5080900@apache.org> References: <1111592113.2950351.1444748953017.JavaMail.yahoo@mail.yahoo.com> <1111592113.2950351.1444748953017.JavaMail.yahoo@mail.yahoo.com> <561D2128.5080900@apache.org> Subject: Re: Unable to deploy app with Tomcat Manager Text interface using a Context Descriptor MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2999994_1245508591.1444750315756" ------=_Part_2999994_1245508591.1444750315756 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sorry about the formatting issue. Here is the corrected version.-----------= -------------------------------------------------------------------- My application context is defined as an XML file located in `my/path/to/Tom= cat/conf/Catalina/localhost/my-app.xml`. =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 `/my/path/to/myApp` contains the WAR file myAppWarFile.war and a number of = externalized properties that are read by Spring. Tomcat is configured with autoDeploy turned off. When I start Tomcat, it cr= eates `my/path/to/Tomcat/conf/webapps/my-app/` and the WAR file gets unpack= ed into this location as expected, and the application of course can run as= expected. When I want to deploy a new version without restarting Tomcat, I run the un= deploy command as follows: =C2=A0=C2=A0=C2=A0 curl http://localhost:8080/manager/text/undeploy?path=3D= /my-app --user my-username:my-password ... and that works. But when I instruct Tomcat to deploy with the following= curl statement, I get a failure. =C2=A0=C2=A0=C2=A0 curl http://localhost:8080/manager/text/deploy?config=3D= file:/my/path/to/Tomcat/conf/Catalina/localhost/my-app.xml --user my-userna= me:my-password =C2=A0=C2=A0=C2=A0 # Tomcat response =C2=A0=C2=A0=C2=A0 FAIL - Invalid context path null was specified Adding the path does not help much, I still get a failure. =C2=A0=C2=A0=C2=A0 curl http://localhost:8080/manager/text/deploy?config=3D= file:/my/path/to/Tomcat/conf/Catalina/localhost/my-app.xml\&path=3D/my-app = --user my-username:my-password =C2=A0=C2=A0=C2=A0 # Tomcat response =C2=A0=C2=A0=C2=A0 FAIL - Failed to deploy application at context path /my-= app The worst part is that tailing catalina.out does not yield any insight. And= on top of that, Tomcat deletes the application context XML file `my/path/t= o/Tomcat/conf/Catalina/localhost/my-app.xml`! Naturally I have reviewed Tomcat documentation (https://tomcat.apache.org/t= omcat-8.0-doc/manager-howto.html#Deploy_using_a_Context_configuration_%22.x= ml%22_file) and I have googled all day to figure this out, but I have not f= ound anything that can help me with this particular configuration. It feels as though the choice is:=20 =C2=A01. Tomcat with autoDeploy on (not recommended for production) in whic= h case simply dropping the new WAR to `/my/path/to/myApp/` will cause Tomca= t to hot deploy the app. =C2=A02. Tomcat with autoDeploy off, but re-deploying requires a Tomcat res= tart because the deploy API does not seem to be working as advertised. Has anybody made this work with this configuration? ADDITIONAL INFORMATION I turned up the logging on Catalina. When I run the first deploy command wi= thout the path, I get this set of log entries: =C2=A0=C2=A0=C2=A0 FINE: Start processing with input [config=3Dfile:/my/pat= h/to/tomcat/conf/Catalina/localhost/my-app.xml] =C2=A0=C2=A0=C2=A0 Oct 13, 2015 10:04:53 AM org.apache.coyote.AbstractProto= col$AbstractConnectionHandler process =C2=A0=C2=A0=C2=A0 FINE: Socket: [org.apache.tomcat.util.net.SocketWrapper@= 189651c1:Socket[addr=3D/0:0:0:0:0:0:0:1,port=3D45415,localport=3D8080]], St= atus in: [OPEN_READ], State out: [OPEN] =C2=A0=C2=A0=C2=A0 Oct 13, 2015 10:04:53 AM org.apache.coyote.http11.Abstra= ctHttp11Processor process =C2=A0=C2=A0=C2=A0 FINE: Error parsing HTTP request header =C2=A0=C2=A0=C2=A0 java.io.EOFException: Unexpected EOF read on the socket =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.coyote.http11.Http= 11Processor.setRequestLineReadTimeout(Http11Processor.java:168) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.coyote.http11.Abst= ractHttp11Processor.process(AbstractHttp11Processor.java:982) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.coyote.AbstractPro= tocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.tomcat.util.net.JI= oEndpoint$SocketProcessor.run(JIoEndpoint.java:316) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.concurrent.ThreadPo= olExecutor.runWorker(ThreadPoolExecutor.java:1145) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.concurrent.ThreadPo= olExecutor$Worker.run(ThreadPoolExecutor.java:615) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.tomcat.util.thread= s.TaskThread$WrappingRunnable.run(TaskThread.java:61) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.Thread.run(Thread.j= ava:744) =C2=A0=C2=A0=C2=A0 Oct 13, 2015 10:04:53 AM org.apache.coyote.AbstractProto= col$AbstractConnectionHandler process =C2=A0=C2=A0=C2=A0 FINE: Socket: [org.apache.tomcat.util.net.SocketWrapper@= 189651c1:Socket[addr=3D/0:0:0:0:0:0:0:1,port=3D45415,localport=3D8080]], St= atus in: [OPEN_READ], State out: [CLOSED] =C2=A0=C2=A0=C2=A0 Oct 13, 2015 10:04:53 AM org.apache.tomcat.util.threads.= LimitLatch countDown =C2=A0=C2=A0=C2=A0 FINE: Counting down[http-bio-8080-exec-16] latch=3D1 SERVER CONFIG =C2=A0=C2=A0=C2=A0 Apache Tomcat 7.0.55 (but confirmed same problem with 7.= 0.59 and 8.0.12. =C2=A0=C2=A0=C2=A0 Tomcat configured to run as a service with tomcat user a= nd group owning the catalina base and subfolders, and the docBase folders o= utside of the appBase =C2=A0=C2=A0=C2=A0 Centos 6.5 From: Mark Thomas To: Tomcat Users List =20 Sent: Tuesday, October 13, 2015 11:20 AM Subject: Re: Unable to deploy app with Tomcat Manager Text interface using= a Context Descriptor =20 On 13/10/2015 16:09, ptruche wrote: > My application context is defined as an XML file located in `my/path/to/T= omcat/conf/Catalina/localhost/my-app.xml`. >=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > `/my/path/to/myApp` contains the WAR file myAppWarFile.war and a number o= f externalized properties that are read by Spring. > Tomcat is configured with autoDeploy turned off. When I start Tomcat, it = creates `my/path/to/Tomcat/conf/webapps/my-app/` and the WAR file gets unpa= cked into this location as expected, and the application of course can run = as expected. > When I want to deploy a new version without restarting Tomcat, I run the = undeploy command as follows: >=C2=A0 =C2=A0 curl http://localhost:8080/manager/text/undeploy?path=3D/my-= app --user my-username:my-password > ... and that works. But when I instruct Tomcat to deploy with the followi= ng curl statement, I get a failure. >=C2=A0 =C2=A0 curl http://localhost:8080/manager/text/deploy?config=3Dfile= :/my/path/to/Tomcat/conf/Catalina/localhost/my-app.xml --user my-username:m= y-password=C2=A0 =C2=A0 # Tomcat response=C2=A0 =C2=A0 FAIL - Invalid conte= xt path null was specified > Adding the path does not help much, I still get a failure. >=C2=A0 =C2=A0 curl http://localhost:8080/manager/text/deploy?config=3Dfile= :/my/path/to/Tomcat/conf/Catalina/localhost/my-app.xml\&path=3D/my-app --us= er my-username:my-password >=C2=A0 =C2=A0 # Tomcat response=C2=A0 =C2=A0 FAIL - Failed to deploy appli= cation at context path /my-app > The worst part is that tailing catalina.out does not yield any insight. A= nd on top of that, Tomcat deletes the application context XML file `my/path= /to/Tomcat/conf/Catalina/localhost/my-app.xml`! > Naturally I have reviewed Tomcat documentation (https://tomcat.apache.org= /tomcat-8.0-doc/manager-howto.html#Deploy_using_a_Context_configuration_%22= .xml%22_file) and I have googled all day to figure this out, but I have not= found anything that can help me with this particular configuration. > It feels as though the choice is:=20 >=C2=A0 1. Tomcat with autoDeploy on (not recommended for production) in wh= ich case simply dropping the new WAR to `/my/path/to/myApp/` will cause Tom= cat to hot deploy the app. 2. Tomcat with autoDeploy off, but re-deploying = requires a Tomcat restart because the deploy API does not seem to be workin= g as advertised. > Has anybody made this work with this configuration? > ADDITIONAL INFORMATION > I turned up the logging on Catalina. When I run the first deploy command = without the path, I get this set of log entries: >=C2=A0 =C2=A0 FINE: Start processing with input [config=3Dfile:/my/path/to= /tomcat/conf/Catalina/localhost/my-app.xml]=C2=A0 =C2=A0 Oct 13, 2015 10:04= :53 AM org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process= =C2=A0 =C2=A0 FINE: Socket: [org.apache.tomcat.util.net.SocketWrapper@18965= 1c1:Socket[addr=3D/0:0:0:0:0:0:0:1,port=3D45415,localport=3D8080]], Status = in: [OPEN_READ], State out: [OPEN]=C2=A0 =C2=A0 Oct 13, 2015 10:04:53 AM or= g.apache.coyote.http11.AbstractHttp11Processor process=C2=A0 =C2=A0 FINE: E= rror parsing HTTP request header=C2=A0 =C2=A0 java.io.EOFException: Unexpec= ted EOF read on the socket=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.coyote.= http11.Http11Processor.setRequestLineReadTimeout(Http11Processor.java:168)= =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.coyote.http11.AbstractHttp11Proce= ssor.process(AbstractHttp11Processor.java:982)=C2=A0 =C2=A0 =C2=A0 =C2=A0 a= t org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abst= ractProtocol.java:611)=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.tomcat.util= .net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)=C2=A0 =C2=A0 =C2= =A0 =C2=A0 at java.util.concurrent.Thread P oolExecutor.runWorker(ThreadPoolExecutor.java:1145)=C2=A0 =C2=A0 =C2=A0 =C2= =A0 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecuto= r.java:615)=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.tomcat.util.threads.Ta= skThread$WrappingRunnable.run(TaskThread.java:61)=C2=A0 =C2=A0 =C2=A0 =C2= =A0 at java.lang.Thread.run(Thread.java:744) >=C2=A0 =C2=A0 Oct 13, 2015 10:04:53 AM org.apache.coyote.AbstractProtocol$= AbstractConnectionHandler process=C2=A0 =C2=A0 FINE: Socket: [org.apache.to= mcat.util.net.SocketWrapper@189651c1:Socket[addr=3D/0:0:0:0:0:0:0:1,port=3D= 45415,localport=3D8080]], Status in: [OPEN_READ], State out: [CLOSED]=C2=A0= =C2=A0 Oct 13, 2015 10:04:53 AM org.apache.tomcat.util.threads.LimitLatch = countDown=C2=A0 =C2=A0 FINE: Counting down[http-bio-8080-exec-16] latch=3D1 > SERVER CONFIG >=C2=A0 Apache Tomcat 7.0.55 (but confirmed same problem with 7.0.59 and 8.= 0.12. Tomcat configured to run as a service with tomcat user and group owni= ng the catalina base and subfolders, and the docBase folders outside of the= appBase Centos 6.5 >=20 The above is pretty much unreadable. Can you reformat please. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org ------=_Part_2999994_1245508591.1444750315756--