2015-12-07 333 views
0

我正在尝试使用cf-mvn-plugin将应用程序部署到基于cloudfoundary的基础架构。启动期间应用程序崩溃

应用程序(在本地运行,没有任何问题)立即崩溃。虽然Bootstrap逼近日志看起来几乎就像我的本地机器上,唯一的区别就是我得到的消息是这样的:

2015-12-07 10:39:04 [App/0] OUT 2015-12-07 09:39:04,691 INFO org.springframework.web.context.support.XmlWebApplicationContext - Bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 

然后在系统启动过程中一定的时间,应用程序崩溃:

2015-12-07 10:42:41 [DEA/18] ERR Instance (index 0) failed to start accepting connections 
2015-12-07 10:42:41 [API/0] OUT App instance exited with guid 405d6d18-d730-4765-a98b-7f5986f87eb2 payload: {"cc_partition"=>"default", "droplet"=>"405d6d18-d730-4765-a98b-7f5986f87eb2", "version"=>"6023f58c-9165-4a6d-8403-2727ec9f3723", "instance"=>"2118978ed1f54f18a03b1d77f82f3b58", "index"=>0, "reason"=>"CRASHED", "exit_status"=>255, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1449481361} 
2015-12-07 10:42:41 [API/3] OUT App instance exited with guid 405d6d18-d730-4765-a98b-7f5986f87eb2 payload: {"cc_partition"=>"default", "droplet"=>"405d6d18-d730-4765-a98b-7f5986f87eb2", "version"=>"6023f58c-9165-4a6d-8403-2727ec9f3723", "instance"=>"2118978ed1f54f18a03b1d77f82f3b58", "index"=>0, "reason"=>"CRASHED", "exit_status"=>255, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1449481361} 

这里我当前cf-maven-plugin配置:

<plugin> 
       <groupId>org.cloudfoundry</groupId> 
       <artifactId>cf-maven-plugin</artifactId> 
       <version>1.1.2</version> 
       <configuration> 
        <server>${cloudfoundry.server}</server> 
        <target>${cloudfoundry.target}</target> 
        <org>${cloudfoundry.org}</org> 
        <space>${cloudfoundry.space}</space> 
        <memory>1024</memory> 
        <appname>myApp</appname> 
        <url>my-app.scapp.io</url> 
        <healthCheckTimeout>180</healthCheckTimeout> 
        <appStartupTimeout>10</appStartupTimeout> 
        <env> 
         <JAVA_OPTS>-Djavax.xml.accessExternalSchema=all -Djava.security.egd=file:///dev/urandom</JAVA_OPTS> 
        </env> 
        <services> 
         <service> 
          <name>datadb</name> 
          <label>${cloudfoundry.service.datadb.label}</label> 
          <plan>${cloudfoundry.service.datadb.plan}</plan> 
         </service> 
        </services> 
       </configuration> 
      </plugin> 

CLI-版本:6.14.0 + 2654a47-2015-11-18

cf-mvn-plugin版本:1.1.2

谢谢!

+0

您的应用程序启动时间过长。你所得到的信息只是信息而已,并不相关。检查日志和/或增加应用程序的超时时间。 –

+0

我的日志没有什么特别的。我怎样才能延长超时时间? – user1145874

回答

0

当应用程序部署到CF时,平台将在启动时检查应用程序的运行状况,并期望它在一段时间后运行。在你的情况下,你已经配置这个运行状况检查超时为180秒(<healthCheckTimeout>180</healthCheckTimeout>)。这是平台支持的最大超时时间。

由于您已将路由指定给应用程序(使用<url>haufe-demo.scapp.io</url>),平台将访问该URL并预期在3分钟的超时期限内有响应。如果应用程序不是Web应用程序,并且不响应HTTP请求,则应该在没有路线的情况下部署应用程序。在应用程序没有路线,平台运行状况检查只是确保PID是活着的。

[DEA/18] ERR Instance (index 0) failed to start accepting connections错误表示您的应用在3分钟超时窗口内未接受HTTP连接。