0

I'm trying to deploy a war on my remote server which is continuously failing with an error like TimeOutException.

I've checked over the web for similar issue but is out of luck as of now:

Please have a look below of the Logs generated out of it as I'm not sure what I'm missing here. Also I've updated my standalone.xml (added the deployment-timeout="240L" ) file as below:

<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
            <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="240L" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
</subsystem>

But still I'm getting a same exception seems like I'm missing something here, Logs are as below:

http://pastebin.com/BS6hrJ4z

Prashant Kumar
  • 168
  • 4
  • 16

2 Answers2

2

Your setting for deploy-timeout is incorrect.

<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
    <deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" deployment-timeout="240" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
</subsystem>

Remove the 'L' from the deploy timeout setting, which should be numeric only, then it should work fine.

NOTE: This deployment-timeout is in seconds

Additionally, you are getting a couple of Spring initialization errors during deployment. To get more information you need to increase the log level to see what the root cause may be:

2016-03-28 09:10:44,422 WARN  [org.jboss.as.ee] (MSC service thread 1-7) WFLYEE0007: Not installing optional component org.springframework.http.server.ServletServerHttpAsyncRequestControl due to an exception (enable DEBUG log level to see the cause)
2016-03-28 09:10:44,423 WARN  [org.jboss.as.ee] (MSC service thread 1-7) WFLYEE0007: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to an exception (enable DEBUG log level to see the cause)
pczeus
  • 7,709
  • 4
  • 36
  • 51
0

After looking at your logs, it seems that your deployment is taking more than 5 minutes to finish. Increasing the timeout is not the solution.

Instead, you should be breaking your deployment into smaller pieces and checking what's going on.

Things I'd check:

  • Assess your dependency on Spring. I know Spring folks will hate me for that, but most applications nowadays don't need "the full Spring". Pretty much everything can be achieved with Java EE standards, which are provided to you by your container (Wildfly, in this case). This reduces the overall footprint for your application, making the WAR file slimmer and deployment faster.

  • Answer to yourself: why do I need ehcache? You are using a very capable application server, providing you with JPA and second-level caching "for free" to you. You don't need to ship Hibernate and ehcache, unless you need to use very specific versions/features of Hibernate+ehcache.

  • Try to deploy some applications from the Java EE samples into your Wildfly. Are they also taking "long", comparing to, say, a reasonable machine on EC2/OpenShift? If so, this could indicate that the problem is on the environment, not on your application. Java EE samples: https://github.com/javaee-samples/javaee7-samples

jpkroehling
  • 13,881
  • 1
  • 37
  • 39