question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yo jhipster:heroku error cannot bind to $port

See original GitHub issue

@jkutner I believe the heroku deploy is broken $PORT is probably not replaced with the actual port.

  • Please follow the issue template below for bug reports and feature requests.
  • Tickets opened without any of these informations will be closed without any explanation.
Overview of the issue

yo jhipster:heroku does not deploy my app correctly to heroku and it crashes when it is started on heroku it states "Error R10 boot timeout -> web proces failed to bind to port $PORT within 90s of launch

Motivation for or Use Case

I cannot deploy my app to production

Reproduce the error

Welcome to the JHipster Generator v4.0.1 Documentation for creating an application: https://jhipster.github.io/creating-an-app/ Application files will be generated in folder: /Users/arnog/Documents/auction ? (1/15) Which type of application would you like to create? Microservice application ? (2/15) What is the base name of your application? auctioneerApi ? (3/15) Would you like to install other generators from the JHipster Marketplace? No ? (4/15) As you are running in a microservice architecture, on which port would like your server to run? It should be unique to avoid port conflicts. 8070 ? (5/15) What is your default Java package name? be.techninja.auctioneer ? (6/15) Which type of authentication would you like to use? JWT authentication (stateless, with a token) ? (7/15) Which Service Discovery and Configuration solution would you like to use? JHipster Registry (using Eureka and Spring Cloud Config) ? (8/15) Which type of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle) ? (9/15) Which production database would you like to use? PostgreSQL ? (10/15) Which development database would you like to use? PostgreSQL ? (11/15) Do you want to use Hibernate 2nd level cache? Yes, with HazelCast (distributed cache, for multiple nodes) ? (12/15) Would you like to use Maven or Gradle for building the backend? Maven ? (13/15) Which other technologies would you like to use? Search engine using Elasticsearch ? (14/15) Would you like to enable internationalization support? Yes ? Please choose the native language of the application? Dutch ? Please choose additional languages to install English, French, German ? (15/15) Besides JUnit and Karma, which testing frameworks would you like to use? ❯◉ Gatling β—― Cucumber

hi09666:auctioneer-api arnog$ yo jhipster:heroku Heroku configuration is starting ? Name to deploy as: auctioneerApi ? On which region do you want to deploy ? eu

Using existing Git repository

Installing Heroku CLI deployment plugin

Creating Heroku application and setting up node environment heroku create auctioneer-api --region eu https://auctioneer-api.herokuapp.com/ | https://git.heroku.com/auctioneer-api.git

Provisioning addons Created heroku-postgresql --as DATABASE

? What is the URL of your JHipster Registry? https://auctioneer-registry.herokuapp.com JHIPSTER_REGISTRY_URL: https://auctioneer-registry.herokuapp.com

Creating Heroku deployment files create src/main/resources/config/bootstrap-heroku.yml create src/main/resources/config/application-heroku.yml create Procfile

Building application [INFO] Scanning for projects… [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Auctioneer Api 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] β€” maven-resources-plugin:3.0.1:copy-resources (default-resources) @ auctioneer-api β€” [INFO] Using β€˜UTF-8’ encoding to copy filtered resources. [INFO] Copying 11 resources [INFO] Copying 7 resources [INFO] [INFO] β€” maven-resources-plugin:3.0.1:resources (default-resources) @ auctioneer-api β€” [INFO] Using β€˜UTF-8’ encoding to copy filtered resources. [INFO] Copying 11 resources [INFO] Copying 7 resources [INFO] [INFO] β€” maven-enforcer-plugin:1.4.1:enforce (enforce-versions) @ auctioneer-api β€” [INFO] [INFO] β€” jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (pre-unit-tests) @ auctioneer-api β€” [INFO] argLine set to -javaagent:/Users/arnog/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/Users/arnog/Documents/auction/auctioneer-api/target/test-results/coverage/jacoco/jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx256m [INFO] [INFO] β€” spring-boot-maven-plugin:1.4.4.RELEASE:build-info (default) @ auctioneer-api β€” [INFO] [INFO] β€” maven-compiler-plugin:3.6.0:compile (default-compile) @ auctioneer-api β€” [INFO] Changes detected - recompiling the module! [INFO] Compiling 47 source files to /Users/arnog/Documents/auction/auctioneer-api/target/classes [INFO] [INFO] β€” maven-resources-plugin:3.0.1:testResources (default-testResources) @ auctioneer-api β€” [INFO] Using β€˜UTF-8’ encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] [INFO] β€” maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ auctioneer-api β€” [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] β€” maven-surefire-plugin:2.18.1:test (default-test) @ auctioneer-api β€” [INFO] Tests are skipped. [INFO] [INFO] β€” jacoco-maven-plugin:0.7.7.201606060606:report (post-unit-test) @ auctioneer-api β€” [INFO] Skipping JaCoCo execution due to missing execution data file. [INFO] [INFO] β€” maven-war-plugin:2.6:war (default-war) @ auctioneer-api β€” [INFO] Packaging webapp [INFO] Assembling webapp [auctioneer-api] in [/Users/arnog/Documents/auction/auctioneer-api/target/auctioneer-api-0.0.1-SNAPSHOT] [INFO] Processing war project [INFO] Copying webapp resources [/Users/arnog/Documents/auction/auctioneer-api/src/main/webapp] [INFO] Webapp assembled in [1094 msecs] [INFO] Building war: /Users/arnog/Documents/auction/auctioneer-api/target/auctioneer-api-0.0.1-SNAPSHOT.war [INFO] [INFO] β€” spring-boot-maven-plugin:1.4.4.RELEASE:repackage (default) @ auctioneer-api β€” [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10.440 s [INFO] Finished at: 2017-02-06T13:41:57+01:00 [INFO] Final Memory: 68M/387M [INFO] ------------------------------------------------------------------------

Deploying application

Uploading your application code. This may take several minutes depending on your connection speed… Uploading auctioneer-api-0.0.1-SNAPSHOT.war -----> Packaging application… - app: auctioneer-api - including: target/auctioneer-api-0.0.1-SNAPSHOT.war -----> Creating build… - file: slug.tgz - size: 82MB -----> Uploading build… - success -----> Deploying… remote: remote: -----> heroku-deploy app detected remote: -----> Installing OpenJDK 1.8… done remote: -----> Discovering process types remote: Procfile declares types -> web remote: remote: -----> Compressing… remote: Done: 130.8M remote: -----> Launching… remote: Released v5 remote: https://auctioneer-api.herokuapp.com/ deployed to Heroku remote: -----> Done

Your app should now be live. To view it run heroku open And you can view the logs with this command heroku logs --tail After application modification, redeploy it with yo jhipster:heroku

2017-02-06T12:43:10.460274+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx350m -Xss512k -Dfile.encoding=UTF-8 2017-02-06T12:43:30.050778+00:00 app[web.1]: 2017-02-06T12:43:30.050794+00:00 app[web.1]: β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— 2017-02-06T12:43:30.050795+00:00 app[web.1]: β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ•β•β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β• β•šβ•β•β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•”β•β•β•β•β•β• β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•— 2017-02-06T12:43:30.050800+00:00 app[web.1]: β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• 2017-02-06T12:43:30.050801+00:00 app[web.1]: β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β•β•β• β•šβ•β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘ 2017-02-06T12:43:30.050802+00:00 app[web.1]: β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ•— 2017-02-06T12:43:30.050802+00:00 app[web.1]: β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β•β•β• β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β•β•β•β•β•β•β• β•šβ•β• β•šβ•β• 2017-02-06T12:43:30.050803+00:00 app[web.1]: 2017-02-06T12:43:30.050804+00:00 app[web.1]: :: JHipster πŸ€“ :: Running Spring Boot 1.4.4.RELEASE :: 2017-02-06T12:43:30.050805+00:00 app[web.1]: :: http://jhipster.github.io :: 2017-02-06T12:43:30.050836+00:00 app[web.1]: 2017-02-06T12:44:38.402275+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch 2017-02-06T12:44:38.402436+00:00 heroku[web.1]: Stopping process with SIGKILL 2017-02-06T12:44:38.636987+00:00 heroku[web.1]: Process exited with status 137 2017-02-06T12:44:38.669391+00:00 heroku[web.1]: State changed from starting to crashed

Related issues

None that I know of

Suggest a Fix

Possibly $PORT is not replaced with the heroku port ?

JHipster Version(s)

4.0.1

4.0.1
JHipster configuration

Welcome to the JHipster Information Sub-Generator

JHipster Version(s)
/Users/arnog/Documents/auction/auctioneer-api
└── generator-jhipster@4.0.1 

JHipster configuration, a .yo-rc.json file generated in the root folder
{
  "generator-jhipster": {
    "jhipsterVersion": "4.0.1",
    "baseName": "auctioneerApi",
    "packageName": "be.techninja.auctioneer",
    "packageFolder": "be/techninja/auctioneer",
    "serverPort": "8075",
    "authenticationType": "jwt",
    "hibernateCache": "hazelcast",
    "clusteredHttpSession": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "prodDatabaseType": "postgresql",
    "searchEngine": "elasticsearch",
    "messageBroker": false,
    "serviceDiscoveryType": "eureka",
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "jwtSecretKey": "",
    "enableTranslation": true,
    "applicationType": "microservice",
    "testFrameworks": [
      "gatling"
    ],
    "jhiPrefix": "jhi",
    "skipClient": true,
    "skipUserManagement": true,
    "nativeLanguage": "nl",
    "languages": [
      "nl",
      "en",
      "fr",
      "de"
    ],
    "clientPackageManager": "yarn",
    "clientFramework": "angular1"
  }
}
Entity configuration(s) entityName.json files generated in the .jhipster directory

ls: no such file or directory: .jhipster/*.json

Browsers and Operating System

java version β€œ1.8.0_60” Javaβ„’ SE Runtime Environment (build 1.8.0_60-b27) Java HotSpotβ„’ 64-Bit Server VM (build 25.60-b23, mixed mode)

git version 2.10.1 (Apple Git-78)

node: v6.9.5

npm: 3.10.10

bower: 1.8.0

gulp: [13:56:08] CLI version 3.9.1

yeoman: 1.8.5

yarn: 0.19.1

Docker version 1.13.0, build 49bf474

docker-compose version 1.10.0, build 4bd6f1a

Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System

macOS Sierra 10.12.2

  • [x ] Checking this box is mandatory (this is just to show you read everything)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
jduboiscommented, Feb 6, 2017

Your app is just taking too long to start. Are you sure you didn’t lock your database? Have a look at how Liquibase works, there is a β€œlock” table that might prevent you to start.

1reaction
gmarzioucommented, Mar 10, 2018

@nutrimax1987 please don’t comment on a one year old closed issue, please open a new issue with all required details

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploying a JHipster Application to Heroku - Stack Overflow
I have started an Heroku sub-generator for JHipster, using your comments: ... Error R10 (Boot timeout) -> Web process failed to bind to...
Read more >
jhipster/generator-jhipster - Gitter
heroku cannot bind to port 8080, so you must ise heroku's port (etracted from ENV) ... When I create a new application (yo...
Read more >
Deploying to Heroku - JHipster
If the problem is persistent, try contacting Heroku Support to request a longer boot limit for your app.
Read more >
Build Secure Microservices With JHipster, Docker ... - DZone
npm install -g yo generator-jhipster ... Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch....
Read more >
Heroku Deployment Pitfall: Bind to $PORT | rockyourcode
That doesn't work with Heroku because Heroku binds your port and you cannot set it yourself. You'll get an error: Web process failed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found