Network connections fail when starting rebar app using "console" parameter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Network connections fail when starting rebar app using "console" parameter

Whealy, Chris
Hi All

I have a Cowboy app that at startup time, downloads various files from another web server.  I’m using rebar to create a release, and this all works fine when I start the app using the “start” parameter

$ _build/default/rel/geo_server/bin/geo_server start

But all the downloads fail when I use the “console” parameter

$ _build/default/rel/geo_server/bin/geo_server console

No other network conditions have changed, but now all the HTTP connections fail with {conn_failed,{error,ehostdown}} which clearly is not the case...

Are extra parameters needed when starting the app using “console”?

Thanks

Chris Whealy

SAP Cloud Platform | Strategy & Product Management | Team

SAP UK Ltd, Clockhouse Place, Bedfont Rd, Feltham, Middx, TW14 8HA, England 

M +44 (0)7808 575377
 

Find out more on the Strategy & Product Management Wiki page (SAP internal)
Follow our latest activities in SAP CP User Community Jam Group 

Please consider the impact on the environment before printing this e-mail. 

Twitter: @LogaRhythm
"The voice of ignorance speaks loud and long,
  but the words of the wise are quiet and few"
                                                 Ancient Proverb






_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Network connections fail when starting rebar app using "console" parameter

Roger Lipscombe-2
On 11 April 2018 at 15:44, Whealy, Chris <[hidden email]> wrote:
Hi All

I have a Cowboy app that at startup time, downloads various files from another web server.  I’m using rebar to create a release, and this all works fine when I start the app using the “start” parameter

$ _build/default/rel/geo_server/bin/geo_server start

But all the downloads fail when I use the “console” parameter

$ _build/default/rel/geo_server/bin/geo_server console

No other network conditions have changed, but now all the HTTP connections fail with {conn_failed,{error,ehostdown}} which clearly is not the case...

Are extra parameters needed when starting the app using “console”?

Not usually. What are you using to download the files from the other web server?
 

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Network connections fail when starting rebar app using "console" parameter

Whealy, Chris
Hi Roger

My Cowboy app has a dependency on iBrowse - which has been working fine up until trying to start the app using “console”.

ibrowse:start(),
ibrowse:set_dest("download.geonames.org", 80, [{max_sessions, 10}, {max_pipeline_size, 25}]),

Then I spawn another process to fetch some files from genomes.org and wait for the results.  The spawned process is just a wrapper around ibrowse:send_req(Url, [{"If-None-Match", Etag}], get) that fires off an HTTP GET request to Url for a given Etag.

This all works fine when using the “start" parameter, but fails when using “console”…

Regards

Chris Whealy

SAP Cloud Platform | Strategy & Product Management | Team

SAP UK Ltd, Clockhouse Place, Bedfont Rd, Feltham, Middx, TW14 8HA, England 

M +44 (0)7808 575377
 

Find out more on the Strategy & Product Management Wiki page (SAP internal)
Follow our latest activities in SAP CP User Community Jam Group 

Please consider the impact on the environment before printing this e-mail. 

Twitter: @LogaRhythm
"The voice of ignorance speaks loud and long,
  but the words of the wise are quiet and few"
                                                 Ancient Proverb





On 11 Apr 2018, at 17:07, Roger Lipscombe <[hidden email]> wrote:

On 11 April 2018 at 15:44, Whealy, Chris <[hidden email]> wrote:
Hi All

I have a Cowboy app that at startup time, downloads various files from another web server.  I’m using rebar to create a release, and this all works fine when I start the app using the “start” parameter

$ _build/default/rel/geo_server/bin/geo_server start

But all the downloads fail when I use the “console” parameter

$ _build/default/rel/geo_server/bin/geo_server console

No other network conditions have changed, but now all the HTTP connections fail with {conn_failed,{error,ehostdown}} which clearly is not the case...

Are extra parameters needed when starting the app using “console”?

Not usually. What are you using to download the files from the other web server?


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Network connections fail when starting rebar app using "console" parameter

YD Jiang
Maybe have a network capture to determine why the ehostdown happen. especially you can compare the worked capture with the failed one.

On Thu, Apr 12, 2018 at 12:29 AM Whealy, Chris <[hidden email]> wrote:
Hi Roger

My Cowboy app has a dependency on iBrowse - which has been working fine up until trying to start the app using “console”.

ibrowse:start(),
ibrowse:set_dest("download.geonames.org", 80, [{max_sessions, 10}, {max_pipeline_size, 25}]),

Then I spawn another process to fetch some files from genomes.org and wait for the results.  The spawned process is just a wrapper around ibrowse:send_req(Url, [{"If-None-Match", Etag}], get) that fires off an HTTP GET request to Url for a given Etag.

This all works fine when using the “start" parameter, but fails when using “console”…

Regards

Chris Whealy

SAP Cloud Platform | Strategy & Product Management | Team

SAP UK Ltd, Clockhouse Place, Bedfont Rd, Feltham, Middx, TW14 8HA, England 

M <a href="tel:+44%207808%20575377" value="+447808575377" target="_blank">+44 (0)7808 575377
 

Find out more on the Strategy & Product Management Wiki page (SAP internal)
Follow our latest activities in SAP CP User Community Jam Group 

Please consider the impact on the environment before printing this e-mail. 

Twitter: @LogaRhythm
"The voice of ignorance speaks loud and long,
  but the words of the wise are quiet and few"
                                                 Ancient Proverb





On 11 Apr 2018, at 17:07, Roger Lipscombe <[hidden email]> wrote:

On 11 April 2018 at 15:44, Whealy, Chris <[hidden email]> wrote:
Hi All

I have a Cowboy app that at startup time, downloads various files from another web server.  I’m using rebar to create a release, and this all works fine when I start the app using the “start” parameter

$ _build/default/rel/geo_server/bin/geo_server start

But all the downloads fail when I use the “console” parameter

$ _build/default/rel/geo_server/bin/geo_server console

No other network conditions have changed, but now all the HTTP connections fail with {conn_failed,{error,ehostdown}} which clearly is not the case...

Are extra parameters needed when starting the app using “console”?

Not usually. What are you using to download the files from the other web server?

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Network connections fail when starting rebar app using "console" parameter

Whealy, Chris
Found the problem…

For some reason I had a highly specific firewall rule that blocked outgoing network access by the BEAM, but only when run from within Terminal.

Deleted that rule and everything works fine now

Chris Whealy

SAP Cloud Platform | Strategy & Product Management | Team

SAP UK Ltd, Clockhouse Place, Bedfont Rd, Feltham, Middx, TW14 8HA, England 

M +44 (0)7808 575377
 

Find out more on the Strategy & Product Management Wiki page (SAP internal)
Follow our latest activities in SAP CP User Community Jam Group 

Please consider the impact on the environment before printing this e-mail. 

Twitter: @LogaRhythm
"The voice of ignorance speaks loud and long,
  but the words of the wise are quiet and few"
                                                 Ancient Proverb





On 11 Apr 2018, at 18:58, YD Jiang <[hidden email]> wrote:

Maybe have a network capture to determine why the ehostdown happen. especially you can compare the worked capture with the failed one.

On Thu, Apr 12, 2018 at 12:29 AM Whealy, Chris <[hidden email]> wrote:
Hi Roger

My Cowboy app has a dependency on iBrowse - which has been working fine up until trying to start the app using “console”.

ibrowse:start(),
ibrowse:set_dest("download.geonames.org", 80, [{max_sessions, 10}, {max_pipeline_size, 25}]),

Then I spawn another process to fetch some files from genomes.org and wait for the results.  The spawned process is just a wrapper around ibrowse:send_req(Url, [{"If-None-Match", Etag}], get) that fires off an HTTP GET request to Url for a given Etag.

This all works fine when using the “start" parameter, but fails when using “console”…

Regards

Chris Whealy

SAP Cloud Platform | Strategy & Product Management | Team

SAP UK Ltd, Clockhouse Place, Bedfont Rd, Feltham, Middx, TW14 8HA, England 

M <a href="tel:&#43;44%207808%20575377" value="&#43;447808575377" target="_blank" class=""> +44 (0)7808 575377
 

Find out more on the Strategy & Product Management Wiki page (SAP internal)
Follow our latest activities in SAP CP User Community Jam Group 

Please consider the impact on the environment before printing this e-mail. 

Twitter: @LogaRhythm
"The voice of ignorance speaks loud and long,
  but the words of the wise are quiet and few"
                                                 Ancient Proverb





On 11 Apr 2018, at 17:07, Roger Lipscombe <[hidden email]> wrote:

On 11 April 2018 at 15:44, Whealy, Chris <[hidden email]> wrote:
Hi All

I have a Cowboy app that at startup time, downloads various files from another web server.  I’m using rebar to create a release, and this all works fine when I start the app using the “start” parameter

$ _build/default/rel/geo_server/bin/geo_server start

But all the downloads fail when I use the “console” parameter

$ _build/default/rel/geo_server/bin/geo_server console

No other network conditions have changed, but now all the HTTP connections fail with {conn_failed,{error,ehostdown}} which clearly is not the case...

Are extra parameters needed when starting the app using “console”?

Not usually. What are you using to download the files from the other web server?

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions