引导过程中应用程序崩溃



我正在尝试使用cf mvn插件将应用程序部署到基于cloudfoundary的基础设施。

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

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插件版本:1.1.2

谢谢!

当应用程序部署到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连接。

最新更新