You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bruce Huang <ma...@gmail.com> on 2017/04/07 08:08:58 UTC
Get fail response by using the Tomcat manager command to deploy a war
Hi all,
I want to use the tomcat supported manager command
<https://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Supported_Manager_Commands>
to deploy a war file. The Tomcat server is Tomcat v8.0.23.
The application is sure to be deployed and started successfully, I,
however, got the failed message of the response as below
*FAIL - Deployed application at context path /test but context failed to
start*
The way I used is the HttpURLConnection in Java to PUT a file by an HTTP
request as below code
public void execute(ResponseHandler handler) throws IOException {
String deployURL =
"http://localhost/manager/text/deploy?update=true&path=/test"
final HttpURLConnection hconn = (HttpURLConnection) (new
URL(deployURL)).openConnection();
try (FileInputStream fsInput = new FileInputStream(deployedPackage)) {
final long contentLength = fsInput.getChannel().size();
hconn.setAllowUserInteraction(false);
hconn.setDoInput(true);
hconn.setUseCaches(false);
hconn.setDoOutput(true);
hconn.setRequestMethod("PUT");
hconn.setRequestProperty("Content-Type", "application/octet-stream");
hconn.setRequestProperty("Content-Length", "" + contentLength);
hconn.setFixedLengthStreamingMode(contentLength);
hconn.setRequestProperty("User-Agent", "Catalina-Ant-Task/1.0");
// Set up an authorization header with our credentials
final String input = this.username + ":" + this.password;
final String output =
Base64.getEncoder().encodeToString(input.getBytes(StandardCharsets.ISO_8859_1));
hconn.setRequestProperty("Authorization", "Basic " + output);
// Establish the connection with the server
hconn.connect();
try (BufferedInputStream istream = new
BufferedInputStream(fsInput, 1024);
BufferedOutputStream ostream = new
BufferedOutputStream(hconn.getOutputStream(), 1024)) {
final byte buffer[] = new byte[1024];
while (true) {
int n = istream.read(buffer);
if (n < 0) {
break;
}
ostream.write(buffer, 0, n);
}
}
}
String response = new String();
// Process the response message
try (InputStreamReader reader = new
InputStreamReader(hconn.getInputStream(), "utf-8")) {
final StringBuilder buff = new StringBuilder();
while (true) {
int ch = reader.read();
if (ch < 0) {
break;
} else {
buff.append((char) ch);
}
}
handler.handle(buff.toString());
}
hconn.disconnect();}
The target URL is *http://localhost/manager/text/deploy?update=true&path=/test
<http://localhost/manager/text/deploy?update=true&path=/test>* for
deploying a war file to a context path "test". And the *deployedPackage* is
a File with the size amount 130 MB.
Is there anything I miss to set up or do it in the wrong way?
Thanks
Re: Get fail response by using the Tomcat manager command to deploy a
war
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Bruce,
(CC'ing the list this time. TB changed their REPLY semantics and I'm
still getting used to them.)
On 4/24/17 8:52 AM, Bruce Huang wrote:
> Thanks for the information that Chris has provided.
>
> I have found that the deployment has not always being succeeded.
>
> The situation is, if I hit the /stop and then /deploy?update=true,
even I
> always got a fail message as below
>
> *FAIL - Deployed application at context path /test but context
> failed to start*
>
> But, sometimes the deployment works and sometimes it doesn't. If it
> is failed to deploy, the folder of the web application will have a
> file remains which is the \WEB-INF\lib\licensor-1.0.0-RC.jar.
>
> What if I hit the /stop and then /undeploy before doing the
> /deploy?update=true, the response of the /undeploy request is
> always as below
>
> FAIL - Unable to delete
> [D:\Tomcat8\apache-tomcat-8.0.23\webapps\test]. The continued
> presence of this file may cause problems.
>
> And yes, the file remains is \WEB-INF\lib\licensor-1.0.0-RC.jar.
>
> The licensor-1.0.0-RC.jar(Developed by ourself) dependents to the
> bouncycastle <https://www.bouncycastle.org/> and log4j2
> <https://logging.apache.org/log4j/2.x/> as below pom shows.
Interesting.
> And our webapp uses log4j 1.2 as the logging system, the pom as
> below
>
> <dependency> <groupId>com.company</groupId>
> <artifactId>licensor</artifactId>
> <version>1.0.0-RC</version></dependency><dependency>
> <groupId>log4j</groupId> <artifactId>log4j</artifactId>
> <version>1.2.14</version></dependency>
>
> As mentioned above, everytime when we try to undeploy the webapp
> from tomcat manager, it always failed to undeploy the webapp and
> return the failed message as below
>
> FAIL - Unable to delete
> [D:\Tomcat8\apache-tomcat-8.0.23\webapps\test]. The continued
> presence of this file may cause problems.
>
> The remains file is always the WEB-INF\lib\licensor-1.0.0-RC.jar
> and it always being locked and unable to be deleted until we have
> shutdown the tomcat.
It seems like that file is being kept-open by some part of the code. I
suspect it's being held-open by some code from within that JAR file --
maybe opening a file and not closing it, etc.
> Is there any conflict problem if the webapp is using log4j 1.2 and
> its dependency lib has log4j2? Or the bouncycastle has some file
> locking
issue
> (Since it seems to contain some native code)?
There should be no log4j/log4j2 issues. I'm not sure about Bouncy
Castle, but I suspect that their implementation is good. native code
can't be loaded from a JAR file so I don't think that's going to be a
part of the problem.
You may need to attach a debugger/profiler to the application and look
at the open files to see what code is holding that file open.
An option for Tomcat is to set "antiJARLocking" to "true" in your
<Context> element in META-INF/context.xml [1]. Note that there may be
some other implications to using this, so please read the documentation.
- -chris
[1] https://tomcat.apache.org/tomcat-7.0-doc/config/context.html
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCAAGBQJY/ki1AAoJEBzwKT+lPKRYaYsP/2i4tkOaVgsdVwJEih8AVAuX
F6GQOuu+rrCWH0KBT5engib0AJjLvVI7KPgwRSFQ170MC3apswYRSaUg5LLOS02p
RTmOkzfv+B2rp4BU/j2bOJHf0oLtXAJBMNsTczAgybQyDGmLzUafLl9+hYEIaGaq
pCf4mmdi0wi9CECx57HDfpSJKSH3ZtpQ3PFet2GXhiHhViYRpCiuZG3U3h8BLFpb
9Nad+RZ14esEdXc57I9qvOjYUfDNkhjNebMrXQglvlMX/qVIffu+oiqUge9KQDb9
SAN4onLQtPpp0PxP8vkTFl/MLoo4tAVs5h9ARmFUX+UzPf3TllrJIp3K2IBHENf+
xluJ6U5Gio1MIx/CJjts3jnDR/A7/dATJzWyjlP+iTME1U+6OT4YOdVnuE6c1g3u
vyYJgsSkIMM4A5ixflJ/OCX5GlvOJeTA/2mIcrFvMW1WjPD/i7urhOH8KuTcSVBV
I8wzR75Zrq9JHWN7PgmrSoF3osVPfBwcJEnYi+v4S9VIzbpIS2xg0TKAhXMpI6xc
WYv2vegjPs8fsZGWdv+plumVauaki18ysLE4066foRqyh7kGb0GNEu097rowBis0
KnUyGbHDCBGPe162kShKAOqkDP1AG0ySKPq4y4di9jT+lApS+xxbXnD1MEvfbEwK
homOkesGo+M+M6CigY5k
=qf+H
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Get fail response by using the Tomcat manager command to deploy a war
Posted by Bruce Huang <ma...@gmail.com>.
Thanks for the information that Chris has provided.
I have found that the deployment has not always being succeeded.
The situation is, if I hit the /stop and then /deploy?update=true, even I
always got a fail message as below
*FAIL - Deployed application at context path /test but context failed to
start*
But, sometimes the deployment works and sometimes it doesn't. If it is
failed to deploy, the folder of the web application will have a file
remains which is the \WEB-INF\lib\licensor-1.0.0-RC.jar.
What if I hit the /stop and then /undeploy before doing the
/deploy?update=true, the response of the /undeploy request is always as
below
FAIL - Unable to delete
[D:\Tomcat8\apache-tomcat-8.0.23\webapps\test]. The continued presence
of this file may cause problems.
And yes, the file remains is \WEB-INF\lib\licensor-1.0.0-RC.jar.
The licensor-1.0.0-RC.jar(Developed by ourself) dependents to the
bouncycastle <https://www.bouncycastle.org/> and log4j2
<https://logging.apache.org/log4j/2.x/> as below pom shows.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies></dependencyManagement>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.51</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-ext-jdk15on</artifactId>
<version>1.51</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk15on</artifactId>
<version>1.51</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency></dependencies>
And our webapp uses log4j 1.2 as the logging system, the pom as below
<dependency>
<groupId>com.company</groupId>
<artifactId>licensor</artifactId>
<version>1.0.0-RC</version></dependency><dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version></dependency>
As mentioned above, everytime when we try to undeploy the webapp from
tomcat manager, it always failed to undeploy the webapp and return the
failed message as below
FAIL - Unable to delete
[D:\Tomcat8\apache-tomcat-8.0.23\webapps\test]. The continued presence
of this file may cause problems.
The remains file is always the WEB-INF\lib\licensor-1.0.0-RC.jar and it
always being locked and unable to be deleted until we have shutdown the
tomcat.
The tomcat log only complains about the directory could not be completely
deleted.
19-Apr-2017 18:49:56.976 INFO
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.HostConfig.undeploy Undeploying context
[/2.2]
19-Apr-2017 18:49:56.981 SEVERE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.ExpandWar.deleteDir
[D:\CI\Tomcat8\CI1\apache-tomcat-8.0.23\webapps\2.2\WEB-INF\lib] could
not be completely deleted. The presence of the remaining files may
cause problems
19-Apr-2017 18:49:56.982 SEVERE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.ExpandWar.deleteDir
[D:\CI\Tomcat8\CI1\apache-tomcat-8.0.23\webapps\2.2\WEB-INF] could not
be completely deleted. The presence of the remaining files may cause
problems
19-Apr-2017 18:49:56.982 SEVERE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.ExpandWar.deleteDir
[D:\CI\Tomcat8\CI1\apache-tomcat-8.0.23\webapps\2.2] could not be
completely deleted. The presence of the remaining files may cause
problems
19-Apr-2017 18:49:56.983 SEVERE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.ExpandWar.delete
[D:\CI\Tomcat8\CI1\apache-tomcat-8.0.23\webapps\2.2] could not be
completely deleted. The presence of the remaining files may cause
problems
Is there any conflict problem if the webapp is using log4j 1.2 and its
dependency lib has log4j2? Or the bouncycastle has some file locking issue
(Since it seems to contain some native code)?
Any help is appreciated
Bruce Huang <ma...@gmail.com> 於 2017年4月9日 週日 下午7:47寫道:
> Hi Christopher,
>
> I have checked the tomcat log, there is no error as below and the
> application is started successfully.
>
> Manager.log
>
> 09-Apr-2017 17:37:53.295 INFO [http-nio-3030-exec-342]
> org.apache.catalina.core.ApplicationContext.log Manager: stop: Stopping web
> application '/2.1.2-C1'
> 09-Apr-2017 17:38:23.769 INFO [http-nio-3030-exec-326]
> org.apache.catalina.core.ApplicationContext.log Manager: deploy: Deploying
> web application '/2.1.2-C1'
> 09-Apr-2017 17:38:23.769 INFO [http-nio-3030-exec-326]
> org.apache.catalina.core.ApplicationContext.log Manager: Uploading WAR file
> to D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1.war.tmp
>
> localhost.log
>
> 09-Apr-2017 17:37:53.344 INFO [http-nio-3030-exec-342]
> org.apache.catalina.core.ApplicationContext.log Shutting down log4j
> 09-Apr-2017 17:38:05.573 INFO [http-nio-3030-exec-342]
> org.apache.catalina.core.ApplicationContext.log Closing Spring root
> WebApplicationContext
> 09-Apr-2017 17:43:05.372 INFO [localhost-startStop-32]
> org.apache.catalina.core.ApplicationContext.log No Spring
> WebApplicationInitializer types detected on classpath
> 09-Apr-2017 17:43:05.833 INFO [localhost-startStop-32]
> org.apache.catalina.core.ApplicationContext.log Initializing Spring root
> WebApplicationContext
> 09-Apr-2017 17:44:00.206 INFO [localhost-startStop-32]
> org.apache.catalina.core.ApplicationContext.log Initializing log4j from
> [D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1\WEB-INF\classes\log4j.properties]
>
> catalina.log
>
> 09-Apr-2017 17:38:34.989 INFO
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
> org.apache.catalina.startup.HostConfig.undeploy Undeploying context
> [/2.1.2-C1]
> 09-Apr-2017 17:38:45.037 INFO [localhost-startStop-32]
> org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
> archive D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1.war
> 09-Apr-2017 17:43:05.365 INFO [localhost-startStop-32]
> org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned
> for TLDs yet contained no TLDs. Enable debug logging for this logger for a
> complete list of JARs that were scanned but no TLDs were found in them.
> Skipping unneeded JARs during scanning can improve startup time and JSP
> compilation time.
> 09-Apr-2017 17:44:01.106 INFO [localhost-startStop-32]
> org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
> application archive
> D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1.war has finished in
> 316,068 ms
>
>
> The log from my app for deploying the war file
>
> 2017-04-09 17:38:23,766 [main] INFO c.u.m.i.deployer.catalina.DeployTask -
> Deployed pacakge to
> http://localhost:3030/manager/text/deploy?update=true&path=/2.1.2-C1
> Sun Apr 09 17:38:24 CST 2017 -> FAIL - Deployed application at context
> path /2.1.2-C1 but context failed to start
>
> It looks like the deploying and uploading is started at around 17:38:23,
> and at the 17:38:24 the response is received and says failed to start. At
> 17:38:34, the app went to undeploying and at 17:38:45 it went to
> deploying and started successfully.
>
> Is that because my webapp taking too much time to be undeployed?
>
> Thanks
>
>
> Christopher Schultz <ch...@christopherschultz.net> 於 2017年4月7日 週五
> 下午9:25寫道:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Bruce,
>>
>> On 4/7/17 4:08 AM, Bruce Huang wrote:
>> > I want to use the tomcat supported manager command
>> > <https://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Supported
>> _Manager_Commands>
>> >
>> >
>> to deploy a war file. The Tomcat server is Tomcat v8.0.23.
>> >
>> > The application is sure to be deployed and started successfully,
>> > I, however, got the failed message of the response as below
>> >
>> > *FAIL - Deployed application at context path /test but context
>> > failed to start*
>> >
>> > The way I used is the HttpURLConnection in Java to PUT a file by an
>> > HTTP request as below code
>>
>> Re-read the error message you got. The upload was fine. The
>> application just didn't start properly. So the problem isn't with the
>> upload/deploy... it's with the application itself.
>>
>> Do onto the server and look at the log files to find out why the
>> application failed to start.
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Comment: GPGTools - http://gpgtools.org
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iQIcBAEBCAAGBQJY55NWAAoJEBzwKT+lPKRY23cQAKYEyu0KdyZeSSthSTrE+bCU
>> EgQEuFr36EjsdTc3hW8UYjJITzRgvjj7OUd/D/TTQmW9PsiRQQNmrjYDigpmnE6w
>> PlxkqhskbXX1iHJTcuIHKtUxvIGe67zMeJsZE2mlklOM9bJuPBcrORse185EBJyq
>> 543TZ/2GZkOqf3MuoKDTvrpaKL/hm70IeoMXKLv7MPEDMw/+MTI1OeNag/4pCgtw
>> b2WnemWNIO16msvaWWE7ZK7rcroQgX4ky2CvZ0COJjy2St8PfsnaBAYmzD1PCPtu
>> IkHdPHb8oAtJJoANPAmAQolg4SbNlzm9xL78tJvwgiY7hA8HKBC4STiIc7zM88nm
>> JhmzIfFScLGAEQ/qG4dGxTHctT4F/eE/DrTxKXwMai7z2Y1KjHfW7mn4eGmTIBLO
>> 2hWrTnfGUqhe/wM9D0nJJ8NuTCEt44JKSlMoBVqCzybHemykZKafxcKSa9ne5Yev
>> VQyTX3/CrbVqNIOD1oEuycuMDX8pXQfPWaFFWlcIu/1GOZNnHbXAr1GkNUM0cXSx
>> WcLAYK5SUs0x80ls06iZlyUNFQrH/Y94GFsIpu4alamIXyNC8G6gcagXOppKo8He
>> gvDcyDzrFCijZt7OW0j/toNH0U7AR/PHWF0+pf6qM/zDU2ewZRmFeCI0pD47eged
>> EVjBnqA2O5/nWhq08TGS
>> =V6R6
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
Re: Get fail response by using the Tomcat manager command to deploy a war
Posted by Bruce Huang <ma...@gmail.com>.
Hi Christopher,
I have checked the tomcat log, there is no error as below and the
application is started successfully.
Manager.log
09-Apr-2017 17:37:53.295 INFO [http-nio-3030-exec-342]
org.apache.catalina.core.ApplicationContext.log Manager: stop: Stopping web
application '/2.1.2-C1'
09-Apr-2017 17:38:23.769 INFO [http-nio-3030-exec-326]
org.apache.catalina.core.ApplicationContext.log Manager: deploy: Deploying
web application '/2.1.2-C1'
09-Apr-2017 17:38:23.769 INFO [http-nio-3030-exec-326]
org.apache.catalina.core.ApplicationContext.log Manager: Uploading WAR file
to D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1.war.tmp
localhost.log
09-Apr-2017 17:37:53.344 INFO [http-nio-3030-exec-342]
org.apache.catalina.core.ApplicationContext.log Shutting down log4j
09-Apr-2017 17:38:05.573 INFO [http-nio-3030-exec-342]
org.apache.catalina.core.ApplicationContext.log Closing Spring root
WebApplicationContext
09-Apr-2017 17:43:05.372 INFO [localhost-startStop-32]
org.apache.catalina.core.ApplicationContext.log No Spring
WebApplicationInitializer types detected on classpath
09-Apr-2017 17:43:05.833 INFO [localhost-startStop-32]
org.apache.catalina.core.ApplicationContext.log Initializing Spring root
WebApplicationContext
09-Apr-2017 17:44:00.206 INFO [localhost-startStop-32]
org.apache.catalina.core.ApplicationContext.log Initializing log4j from
[D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1\WEB-INF\classes\log4j.properties]
catalina.log
09-Apr-2017 17:38:34.989 INFO
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.HostConfig.undeploy Undeploying context
[/2.1.2-C1]
09-Apr-2017 17:38:45.037 INFO [localhost-startStop-32]
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
archive D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1.war
09-Apr-2017 17:43:05.365 INFO [localhost-startStop-32]
org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned
for TLDs yet contained no TLDs. Enable debug logging for this logger for a
complete list of JARs that were scanned but no TLDs were found in them.
Skipping unneeded JARs during scanning can improve startup time and JSP
compilation time.
09-Apr-2017 17:44:01.106 INFO [localhost-startStop-32]
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive
D:\CI\Tomcat8\CI6\apache-tomcat-8.0.23\webapps\2.1.2-C1.war has finished in
316,068 ms
The log from my app for deploying the war file
2017-04-09 17:38:23,766 [main] INFO c.u.m.i.deployer.catalina.DeployTask -
Deployed pacakge to
http://localhost:3030/manager/text/deploy?update=true&path=/2.1.2-C1
Sun Apr 09 17:38:24 CST 2017 -> FAIL - Deployed application at context path
/2.1.2-C1 but context failed to start
It looks like the deploying and uploading is started at around 17:38:23,
and at the 17:38:24 the response is received and says failed to start. At
17:38:34, the app went to undeploying and at 17:38:45 it went to
deploying and started successfully.
Is that because my webapp taking too much time to be undeployed?
Thanks
Christopher Schultz <ch...@christopherschultz.net> 於 2017年4月7日 週五 下午9:25寫道:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Bruce,
>
> On 4/7/17 4:08 AM, Bruce Huang wrote:
> > I want to use the tomcat supported manager command
> > <https://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Supported
> _Manager_Commands>
> >
> >
> to deploy a war file. The Tomcat server is Tomcat v8.0.23.
> >
> > The application is sure to be deployed and started successfully,
> > I, however, got the failed message of the response as below
> >
> > *FAIL - Deployed application at context path /test but context
> > failed to start*
> >
> > The way I used is the HttpURLConnection in Java to PUT a file by an
> > HTTP request as below code
>
> Re-read the error message you got. The upload was fine. The
> application just didn't start properly. So the problem isn't with the
> upload/deploy... it's with the application itself.
>
> Do onto the server and look at the log files to find out why the
> application failed to start.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJY55NWAAoJEBzwKT+lPKRY23cQAKYEyu0KdyZeSSthSTrE+bCU
> EgQEuFr36EjsdTc3hW8UYjJITzRgvjj7OUd/D/TTQmW9PsiRQQNmrjYDigpmnE6w
> PlxkqhskbXX1iHJTcuIHKtUxvIGe67zMeJsZE2mlklOM9bJuPBcrORse185EBJyq
> 543TZ/2GZkOqf3MuoKDTvrpaKL/hm70IeoMXKLv7MPEDMw/+MTI1OeNag/4pCgtw
> b2WnemWNIO16msvaWWE7ZK7rcroQgX4ky2CvZ0COJjy2St8PfsnaBAYmzD1PCPtu
> IkHdPHb8oAtJJoANPAmAQolg4SbNlzm9xL78tJvwgiY7hA8HKBC4STiIc7zM88nm
> JhmzIfFScLGAEQ/qG4dGxTHctT4F/eE/DrTxKXwMai7z2Y1KjHfW7mn4eGmTIBLO
> 2hWrTnfGUqhe/wM9D0nJJ8NuTCEt44JKSlMoBVqCzybHemykZKafxcKSa9ne5Yev
> VQyTX3/CrbVqNIOD1oEuycuMDX8pXQfPWaFFWlcIu/1GOZNnHbXAr1GkNUM0cXSx
> WcLAYK5SUs0x80ls06iZlyUNFQrH/Y94GFsIpu4alamIXyNC8G6gcagXOppKo8He
> gvDcyDzrFCijZt7OW0j/toNH0U7AR/PHWF0+pf6qM/zDU2ewZRmFeCI0pD47eged
> EVjBnqA2O5/nWhq08TGS
> =V6R6
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Get fail response by using the Tomcat manager command to deploy a
war
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Bruce,
On 4/7/17 4:08 AM, Bruce Huang wrote:
> I want to use the tomcat supported manager command
> <https://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Supported
_Manager_Commands>
>
>
to deploy a war file. The Tomcat server is Tomcat v8.0.23.
>
> The application is sure to be deployed and started successfully,
> I, however, got the failed message of the response as below
>
> *FAIL - Deployed application at context path /test but context
> failed to start*
>
> The way I used is the HttpURLConnection in Java to PUT a file by an
> HTTP request as below code
Re-read the error message you got. The upload was fine. The
application just didn't start properly. So the problem isn't with the
upload/deploy... it's with the application itself.
Do onto the server and look at the log files to find out why the
application failed to start.
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCAAGBQJY55NWAAoJEBzwKT+lPKRY23cQAKYEyu0KdyZeSSthSTrE+bCU
EgQEuFr36EjsdTc3hW8UYjJITzRgvjj7OUd/D/TTQmW9PsiRQQNmrjYDigpmnE6w
PlxkqhskbXX1iHJTcuIHKtUxvIGe67zMeJsZE2mlklOM9bJuPBcrORse185EBJyq
543TZ/2GZkOqf3MuoKDTvrpaKL/hm70IeoMXKLv7MPEDMw/+MTI1OeNag/4pCgtw
b2WnemWNIO16msvaWWE7ZK7rcroQgX4ky2CvZ0COJjy2St8PfsnaBAYmzD1PCPtu
IkHdPHb8oAtJJoANPAmAQolg4SbNlzm9xL78tJvwgiY7hA8HKBC4STiIc7zM88nm
JhmzIfFScLGAEQ/qG4dGxTHctT4F/eE/DrTxKXwMai7z2Y1KjHfW7mn4eGmTIBLO
2hWrTnfGUqhe/wM9D0nJJ8NuTCEt44JKSlMoBVqCzybHemykZKafxcKSa9ne5Yev
VQyTX3/CrbVqNIOD1oEuycuMDX8pXQfPWaFFWlcIu/1GOZNnHbXAr1GkNUM0cXSx
WcLAYK5SUs0x80ls06iZlyUNFQrH/Y94GFsIpu4alamIXyNC8G6gcagXOppKo8He
gvDcyDzrFCijZt7OW0j/toNH0U7AR/PHWF0+pf6qM/zDU2ewZRmFeCI0pD47eged
EVjBnqA2O5/nWhq08TGS
=V6R6
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org