Re: How to call Cloud Foundry API from a node.js application deployed?


Amit Kumar Gupta
 

You may need to configure the application-level security groups to allow
apps running in containers to talk to system components such as the Cloud
Controllers. You will likely only want to allow this for trusted
applications, and thus may wish to bind these more permissive security
group settings to the particular space in which your Node app resides. You
can read more about security groups here:

http://docs.pivotal.io/pivotalcf/adminguide/app-sec-groups.html

On Wed, Aug 12, 2015 at 2:22 AM, Juan Antonio BreƱa Moral <
bren(a)juanantonio.info> wrote:

Good morning,

Yes I tried but the connection failed:


{"error":{"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}}

Later, I tryed with curl in the same host where I installed CF and I had
success:

curl "https://api.MY_PUBLIC_IP.xip.io/v2/info" -X GET -k

{"name":"vcap","build":"2222","support":"http://support.cloudfoundry.com","version":2,"description":"Cloud
Foundry sponsored by Pivotal","authorization_endpoint":"
https://uaa.MY_PUBLIC_IP.xip.io","token_endpoint":"
https://uaa.MY_PUBLIC_IP.xip.io
","min_cli_version":null,"min_recommended_cli_version":null,"api_version":"2.25.0","logging_endpoint":"wss://
loggregator.MY_PUBLIC_IP.xip.io:4443"}

Why from CURL, I can't connect and from the application is not possible?
I have to open some port in CF?

Juan Antonio

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.