Thread overview
Can't start application on heroku
Jun 16, 2018
crimaniak
Jun 16, 2018
Jacob Shtokolov
Jun 16, 2018
crimaniak
June 16, 2018
Hi all!

The first try to host application on Heroku provider. The application is started and starts to listen in 3 seconds on the port, provided by heroku-buildpack-d. But the server doesn't detect listening and stops the application. On the local machine, the application works as expected. What can be the problem here?

...
2018-06-16T00:34:33.000000+00:00 app[api]: Build succeeded
2018-06-16T00:34:35.078239+00:00 heroku[web.1]: Starting process with command `./virtual-cm --port 9254`
...
2018-06-16T00:34:38.199381+00:00 app[web.1]: [main(----) INF] Listening for requests on http://127.0.0.1:9254/
2018-06-16T00:35:35.416464+00:00 heroku[web.1]: Stopping process with SIGKILL
2018-06-16T00:35:35.416377+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2018-06-16T00:35:35.537505+00:00 heroku[web.1]: State changed from starting to crashed
...
June 16, 2018
On Saturday, 16 June 2018 at 01:24:04 UTC, crimaniak wrote:
> Hi all!
>
> The first try to host application on Heroku provider. The application is started and starts to listen in 3 seconds on the port, provided by heroku-buildpack-d. But the server doesn't detect listening and stops the application. On the local machine, the application works as expected. What can be the problem here?
>
> [...]

Probably you could try to change your listening address from 127.0.0.1 to 0.0.0.0
June 16, 2018
On Saturday, 16 June 2018 at 09:00:21 UTC, Jacob Shtokolov wrote:
> On Saturday, 16 June 2018 at 01:24:04 UTC, crimaniak wrote:
>> Hi all!
>>
>> The first try to host application on Heroku provider. The application is started and starts to listen in 3 seconds on the port, provided by heroku-buildpack-d. But the server doesn't detect listening and stops the application. On the local machine, the application works as expected. What can be the problem here?
>>
>> [...]
>
> Probably you could try to change your listening address from 127.0.0.1 to 0.0.0.0

Thanks! It is. Initially, I did not pay attention to the default interface address, because I expected the 'bind-address' parameter according to the documentation.