部署Java Web App Rest Spring Heroku端口消息错误R10

时间:2016-01-18 15:07:24

标签: java hibernate heroku

我无法在Heroku上部署我的java Web应用程序,我的应用程序使用:带有Spring Boot,Jersey和Hibernate的Java RESTful Web服务......

我从本教程开始使用我的应用程序:http://jasenkoh.blogspot.cl/2014/09/restfull-web-services-with-spring-boot.html

我对PORT有一些问题,我正在使用环境的$ PORT,正如许多教程所说的......最奇怪的是该应用程序在10次中运行良好...

Im ussing

这是我的procfile:

web: java $JAVA_OPTS -Dserver.port=$PORT -jar target/spring-boot-jersey-      hibernate-1.0-SNAPSHOT.jar

这是日志:

2016-01-18T15:00:10.026560+00:00 app[web.1]: 2016-01-18 15:00:10.024  INFO 3 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
2016-01-18T15:00:11.001694+00:00 app[web.1]: 2016-01-18 15:00:11.001  INFO 3 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
2016-01-18T15:00:53.762303+00:00 heroku[web.1]: Process exited with status 137
2016-01-18T15:00:10.004813+00:00 app[web.1]: 2016-01-18 15:00:10.004  INFO 3 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2016-01-18T15:00:10.026565+00:00 app[web.1]:    name: default
2016-01-18T15:00:10.026560+00:00 app[web.1]: 2016-01-18 15:00:10.024  INFO 3 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
2016-01-18T15:00:10.197117+00:00 app[web.1]: 2016-01-18 15:00:10.196  INFO 3 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {4.3.7.Final}
2016-01-18T15:00:11.001694+00:00 app[web.1]: 2016-01-18 15:00:11.001  INFO 3 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
2016-01-18T15:00:52.906849+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-01-18T15:00:10.004813+00:00 app[web.1]: 2016-01-18 15:00:10.004  INFO 3 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2016-01-18T15:00:10.026560+00:00 app[web.1]: 2016-01-18 15:00:10.024  INFO 3 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
2016-01-18T15:00:10.197117+00:00 app[web.1]: 2016-01-18 15:00:10.196  INFO 3 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {4.3.7.Final}
2016-01-18T15:00:52.906849+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-01-18T15:00:53.762303+00:00 heroku[web.1]: Process exited with status 137
2016-01-18T15:00:53.773047+00:00 heroku[web.1]: State changed from starting to crashed
2016-01-18T15:00:10.004813+00:00 app[web.1]: 2016-01-18 15:00:10.004  INFO 3 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2016-01-18T15:00:10.026560+00:00 app[web.1]: 2016-01-18 15:00:10.024  INFO 3 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
2016-01-18T15:00:10.197117+00:00 app[web.1]: 2016-01-18 15:00:10.196  INFO 3 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {4.3.7.Final}
2016-01-18T15:00:11.001694+00:00 app[web.1]: 2016-01-18 15:00:11.001  INFO 3 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
2016-01-18T15:00:52.906849+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-01-18T15:00:53.773047+00:00 heroku[web.1]: State changed from starting to crashed

1 个答案:

答案 0 :(得分:1)

Error R10 (Boot timeout)错误表示您的应用启动时间超过60秒。它可能在10次中有1次工作,因为它偶尔会在该时间范围内启动。

您可以尝试缩短开始时间,或者通过在http://help.heroku.com

打开机票,让Heroku支持人员增加限额