Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch - Heroku

Tags:

java

soap

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

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?

Thank you

like image 780
Joe Avatar asked Dec 03 '15 13:12

Joe


People also ask

Why does node js app crash with R10?

R10 - Boot timeout errors occur when a web process took longer than 60 seconds to bind to its assigned $PORT .

What port does heroku use?

Heroku expects a web application to bind its HTTP server to the port defined by the $PORT environment variable. Many frameworks default to port 8080, but can be configured to use an environment variable instead.


1 Answers

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}
like image 183
fortellao Avatar answered Sep 19 '22 18:09

fortellao