Heroku production deploy failed #port number issue

SumeetGohil
0
SumeetGohil
commented a year ago

Hey,

I have been trying to deploy NUXT project on Heroku , i am getting following error

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-08-30T14:06:23.937742+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-08-30T14:06:23.937851+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-08-30T14:06:23.981614+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2017-08-30T14:06:24.090618+00:00 heroku[web.1]: Process exited with status 22
2017-08-30T14:06:24.104497+00:00 heroku[web.1]: State changed from starting to crashed
2017-08-30T14:29:05.815604+00:00 heroku[web.1]: State changed from crashed to starting
2017-08-30T14:29:11.414192+00:00 heroku[web.1]: Starting process with command `npm run start`
2017-08-30T14:29:16.140421+00:00 app[web.1]: 
2017-08-30T14:29:16.140448+00:00 app[web.1]: > [email protected]1.0.0 start /app
2017-08-30T14:29:16.140449+00:00 app[web.1]: > nuxt start
2017-08-30T14:29:16.140450+00:00 app[web.1]: 
2017-08-30T14:29:18.855297+00:00 app[web.1]: 
2017-08-30T14:29:18.855309+00:00 app[web.1]:  OPEN  http://localhost:35590
2017-08-30T14:29:18.855310+00:00 app[web.1]: 
2017-08-30T14:30:11.879940+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-08-30T14:30:11.879940+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-08-30T14:30:11.996198+00:00 heroku[web.1]: Process exited with status 137
2017-08-30T14:30:12.009611+00:00 heroku[web.1]: State changed from starting to crashed
2017-08-30T15:12:25.643787+00:00 heroku[web.1]: State changed from crashed to starting
2017-08-30T15:12:29.450673+00:00 heroku[web.1]: Starting process with command `npm run start`
2017-08-30T15:12:32.566576+00:00 app[web.1]: 
2017-08-30T15:12:32.566593+00:00 app[web.1]: > [email protected]1.0.0 start /app
2017-08-30T15:12:32.566594+00:00 app[web.1]: > nuxt start
2017-08-30T15:12:32.566594+00:00 app[web.1]: 
2017-08-30T15:12:34.358999+00:00 app[web.1]: 
2017-08-30T15:12:34.359015+00:00 app[web.1]:  OPEN  http://localhost:35134
2017-08-30T15:12:34.359016+00:00 app[web.1]: 
2017-08-30T15:13:30.043270+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-08-30T15:13:30.043356+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-08-30T15:13:30.207129+00:00 heroku[web.1]: Process exited with status 137
2017-08-30T15:13:30.221189+00:00 heroku[web.1]: State changed from starting to crashed
2017-08-30T15:57:13.959387+00:00 heroku[web.1]: State changed from crashed to starting
2017-08-30T15:57:18.602087+00:00 heroku[web.1]: Starting process with command `npm run start`
2017-08-30T15:57:22.247996+00:00 app[web.1]: 
2017-08-30T15:57:22.248015+00:00 app[web.1]: > [email protected]1.0.0 start /app
2017-08-30T15:57:22.248016+00:00 app[web.1]: > nuxt start
2017-08-30T15:57:22.248016+00:00 app[web.1]: 
2017-08-30T15:57:24.104092+00:00 app[web.1]: 
2017-08-30T15:57:24.104097+00:00 app[web.1]:  OPEN  http://localhost:59971
2017-08-30T15:57:24.104098+00:00 app[web.1]: 
2017-08-30T15:58:19.201254+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-08-30T15:58:19.201383+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-08-30T15:58:19.349583+00:00 heroku[web.1]: Process exited with status 137
2017-08-30T15:58:19.364388+00:00 heroku[web.1]: State changed from starting to crashed
2017-08-30T15:58:19.366460+00:00 heroku[web.1]: State changed from crashed to starting
2017-08-30T15:58:24.717590+00:00 heroku[web.1]: Starting process with command `npm run start`
2017-08-30T15:58:29.708534+00:00 app[web.1]: 
2017-08-30T15:58:29.708548+00:00 app[web.1]: > [email protected]1.0.0 start /app
2017-08-30T15:58:29.708549+00:00 app[web.1]: > nuxt start
2017-08-30T15:58:29.708550+00:00 app[web.1]: 
2017-08-30T15:58:32.823443+00:00 app[web.1]: 
2017-08-30T15:58:32.823458+00:00 app[web.1]:  OPEN  http://localhost:4162
2017-08-30T15:58:32.823458+00:00 app[web.1]: 
2017-08-30T15:59:25.360409+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-08-30T15:59:25.360513+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-08-30T15:59:25.522417+00:00 heroku[web.1]: State changed from starting to crashed
2017-08-30T15:59:25.508239+00:00 heroku[web.1]: Process exited with status 137

I have tried solution didn't worked for me.
Under package.json

  },
  "config": {
    "nuxt": {
      "port": 80
    }
  },

This didn't worked.

0
mkurczewski
0
mkurczewski
commented 7 months ago

I have exactly the same error. @SumeetGohil You closed this, but what was the solution?

0
adambeck7
0
adambeck7
commented 5 months ago

I have exactly the same error. @SumeetGohil You closed this, but what was the solution?

We had the same issue and it was coming from

 "scripts": {
    "build": "nuxt build",
    "start": "nuxt build && nuxt start",
  },

We had to take out the 'nuxt build' that was under the start script. We also set the NUXT_PORT = process.env.PORT nuxt. So it should look like this:

 "scripts": {
    "dev": "NUXT_PORT=process.env.PORT nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
  },
0
MathieuDerelle
0
MathieuDerelle
commented 25 days ago

I had the same problem.

The problem was that nuxt tried to bind to localhost, see

  • ℹ Listening on: http://localhost:22876 in my log
  • OPEN http://localhost:35590 in @SumeetGohil's log

The solution was explained in nuxt docs or in heroku help center

heroku config:set HOST=0.0.0.0

0
Informations
QuestionUnresolved
#c60 - Created a year ago