错误 R10(启动超时)->Web 进程未能在启动后 60 秒内绑定到 $PORT - Heroku [英] Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch - Heroku

查看:31
本文介绍了错误 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 类:

This is my Java class:

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆