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
R10 - Boot timeout errors occur when a web process took longer than 60 seconds to bind to its assigned $PORT .
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.
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}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With