cf-service-connect icon indicating copy to clipboard operation
cf-service-connect copied to clipboard

Support CAPI v3 for v3-zdt-push'd applications

Open ryanhofdotgov opened this issue 5 years ago • 0 comments

Because of differences between Cloud Foundry API (CAPI) v2 and v3, cf connect-to-service fails on applications that have been deployed with a zero downtime push, using cf CLI v6.

If you have deployed an app with cf v3-zdt-push, you have to use cf v3-ssh or the cf CLI v7. cf ssh under cf CLI v6 will fail.

From Rolling App Deployments (Beta):

Pushing updates to your app with a v3-zdt command causes the new web process and app GUID to mismatch. cf ssh does not handle this scenario. You must use the cf v3-ssh command instead. Note: This limitation only applies to cf CLI v6.

Steps to reproduce:

  • Prerequisites: cf CLI v6, cf-service-connect 1.1.0
  1. Deploy a Cloud Foundry app using cf v3-zdt-push
  2. Attempt to connect via cf connect-to-service APP-NAME SERVICE-NAME. That will result in:
Finding the service instance details...
Setting up SSH tunnel...
FAILED
Error opening SSH connection: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain

Executing cf ssh APP-NAME will result in the same error.

Workaround is to use cf v3-ssh or cf7 ssh to do local port forwarding, and then use the service client (e.g., psql) to connect to that local port.

ryanhofdotgov avatar Mar 31 '20 22:03 ryanhofdotgov