www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Can't start application on heroku

reply crimaniak <crimaniak gmail.com> writes:
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
...
Jun 15 2018
parent reply Jacob Shtokolov <jacob.100205 gmail.com> writes:
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
Jun 16 2018
parent crimaniak <crimaniak gmail.com> writes:
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.
Jun 16 2018