Reputation: 71
When I try to connect to external api with https connection from local it's working fine without any need of certificate.
But when the same app deployed in pivotal cloud foundary and try to access the external api then it's giving socket connection exception: connection reset.
Upvotes: 0
Views: 337
Reputation: 15006
The message connection reset
means that you are having network problems, specifically that a TCP packet with the RST flag set was received. It's impossible to say for sure with the given info, but it's likely that your external resource is not accessible from inside your PCF installation.
Access to resources that reside outside of CloudFoundry can be blocked by application security groups, which are a CloudFoundry concept. You can have platform-wide or space-scoped application security groups. The former is managed by your platform's operations team, the latter can be controlled by someone with the SpaceDev role for the given space.
Application security groups define the traffic that is allowed out of CloudFoundry (by default, nothing is allowed out and ASG's allow only the specified traffic).
Application security groups are specific to your environment, so you'd need to use these commands to view the ASG's for your environment and review to see if your connection is being blocked.
Beyond that, it is possible that the traffic is not routable at the network layer or blocked by firewalls on your network. Both of these problems would happen outside of CloudFoundry so you would not be able to change it with application security groups, and you would need to talk with your platform operations team or possibly your company's networking team to request access.
Upvotes: 1