yudai / cf_nise_installer

Cloud Foundry v2 installer with Nise BOSH and Vagrant
Apache License 2.0
84 stars 57 forks source link

Connection refused #135

Closed jabrena closed 9 years ago

jabrena commented 9 years ago

Hi,

I have deployed a simple PHP app to get data from the API:

https://api.MY_PUBLIC_IP.xip.io

But when I execute the script, I receive the following error:

file_get_contents(https://api.MY_PUBLIC_IP.xip.io): failed to open stream: Connection refused

In local, I can execute without any problem but if I execute the connection from an app deployed, I receive the error. Using ssh over the system with CF installed, I can execute curl:

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

I receive the same error from php and node, both micro apps deployed on CF but in local, they run nice. How to avoid this problem?

How to allow the connection in CF?

Many thanks in advance.

Juan Antonio

yudai commented 9 years ago

Hi @jabrena,

Do your applications verify the SSL certificate of your CF endpoint? This installer uses a self-signed certificate and that causes problems when your application verify the certificate strictly. For example, as you noticed, you need to add the -k option when you run the curl command. You may need to add a similar option to the functions in your applications like file_get_contents.

yudai commented 9 years ago

Closing as it looks an outdated ticket. Please recreate another ticket when still you have the issue.