cloudfoundry-incubator / kubecf

Cloud Foundry on Kubernetes
Apache License 2.0
115 stars 62 forks source link

Unable to ssh to apps via CLI #1726

Closed sureshhcl closed 3 years ago

sureshhcl commented 3 years ago

Describe the bug unable to ssh to app instance from CFMR UI.

To Reproduce tried to reproduce the issue by deploying a new php app framework in CFMR

Expected behavior as expected unable to SSH from both CFMR UI and CLI why we can’t ssh via CFMR UI is because ssh in the underlying system isn’t working

Environment

cf_ssh_errors

Additional context

jandubois commented 3 years ago

Hi @sureshhcl!

This must be a CFMR configuration error. cf ssh APPNAME works fine with KubeCF and Eirini; I've just verified it myself.

Are you sure CFMR is setting up a load balancer for the ssh-proxy service?

@jbuns do you have any other ideas? Otherwise please contact IBM and raise an issue against CFMR.

This is what I did to verify this is not a kubecf issue:

$ make cf-operator-apply
$ FEATURE_EIRINI=true make kubecf-apply
$ make cf-login
$ cf create-org suse; cf create-space -o suse myspace; cf target -o suse -s myspace
$ cd [...]/12factor
$ cf push
name:                12factor
requested state:     started
[...]
start command:   bundle exec ruby web.rb -p $PORT
     state     since                  cpu    memory     disk        details
#0   running   2021-04-14T19:24:53Z   0.0%   0 of 64M   0 of 256M

$ cf ssh 12factor
bash-4.4$ ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
vcap         1     0  0 19:26 ?        00:00:00 dumb-init -- /bin/sh -c (  /lifecycle/launch && sleep 5 ) || sleep 5
vcap         6     1  0 19:26 ?        00:00:00 /bin/sh -c (  /lifecycle/launch && sleep 5 ) || sleep 5
vcap         7     6  0 19:26 ?        00:00:00 /bin/sh -c (  /lifecycle/launch && sleep 5 ) || sleep 5
vcap         8     7  1 19:26 ?        00:00:00 ruby web.rb -p 8080
vcap         9     8  0 19:26 ?        00:00:00 /lifecycle/sshd --allowedKeyExchanges= --address=0.0.0.0:2222 --allowUnauthenticatedClients=false --inheritDaemonEnv=true --allowedCiphers= --allowedMACs= --logLevel=info --debugAddr=
vcap        58     9  0 19:26 pts/0    00:00:00 /bin/bash
vcap        63    58  0 19:27 pts/0    00:00:00 ps -ef