2015-12-07 335 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連接。