错误R10(启动超时)-> Web进程在启动后60秒内未能绑定到$ PORT-Heroku [英] Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch - Heroku
本文介绍了错误R10(启动超时)-> Web进程在启动后60秒内未能绑定到$ PORT-Heroku的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在heroku上部署服务器.我收到此错误:
I am trying to deploy my server on heroku. I got this error:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
这是我的Java类:
package introsde.document.endpoint;
import javax.xml.ws.Endpoint;
import introsde.assignment.soap.PeopleImpl;
public class PeoplePublisher {
public static String SERVER_URL = "http://localhost";
public static String PORT = "6902";
public static String BASE_URL = "/ws/people";
public static String getEndpointURL() {
return SERVER_URL+":"+PORT+BASE_URL;
}
public static void main(String[] args) {
String endpointUrl = getEndpointURL();
System.out.println("Starting People Service...");
System.out.println("--> Published at = "+endpointUrl);
Endpoint.publish(endpointUrl, new PeopleImpl());
}
}
我该如何解决这个问题?
How can I solve this problem?
谢谢
推荐答案
我在尝试创建最小的spring-boot应用程序时遇到了同样的问题.我已经将heroku的java-getting-started实现与我的进行了比较,发现了这个不错的解决方案. 只需将其添加到 src/main/resources/application.properties
I had the same issue trying to create a minimal spring-boot application. I've compared heroku's java-getting-started implementation with mine and found this nice fix. Just add this to src/main/resources/application.properties
server.port=${PORT:5000}
这篇关于错误R10(启动超时)-> Web进程在启动后60秒内未能绑定到$ PORT-Heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文