Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Issue with Python Dependencies for a Node.js App

I did try that, forgot to mention. It just opens another terminal and closes with a message which I can't see (closes very fast).

 

I am on Windows 10 environment. Should I try the same outside corporate network?

Re: Issue with Python Dependencies for a Node.js App

Legend
Legend
As the readme states, that is only tested in Linux & macOS, it won't work in Windows.

Proxying and ssh in a corporate network is its own can of worms, you'd definitely have an easier time outside, but I would recommend learning to live with it too. A simple google will point you to several resources.

Re: Issue with Python Dependencies for a Node.js App

Thanks. I tried it on Linux as well but no luck, not sure what the issue is:

./tools_cf-ssh.sh -v -a genpython-app
[info] detected params: APP_NAME: 'genpython-app', APP_INDEX: '0', EXTRA_SSH_PARAMS: ''
[info] queried GUID of genpython-app: 17*****3-27cc-46**-b**4-7e*****31***a
[info] queried CF SSH endpoint: ssh.cf.eu1.mindsphere.io:8443
[info] CF SSH endpoint url: ssh.cf.eu1.mindsphere.io, port: 8443
[info] obtained one-time password
[info] ssh command user: cf:17*****3-27cc-46**-b**4-7e*****31***a/0
[info] ssh command endpoint url: ssh.cf.eu1.mindsphere.io
[info] ssh command endpoint port: 8443
Permission denied, please try again.


When I check for ssh support it says it is enabled:
cf space-ssh-allowed *****
ssh support is enabled in space '*****'

Any idea?

Re: Issue with Python Dependencies for a Node.js App

Legend
Legend

From the mdsp documentation:

 


App SSH is deactivated by default until a user with the role Space Developer enables it for a specific app.

What does the command `cf ssh-enabled <your-app>` report?

Re: Issue with Python Dependencies for a Node.js App

beta@mindsphere:~/apptrial$ cf ssh-enabled genpython-app
ssh support is enabled for 'genpython-app'

beta@mindsphere:~/apptrial$ ./tools_cf-ssh.sh -v -a genpython-app
[info] detected params: APP_NAME: 'genpython-app', APP_INDEX: '0', EXTRA_SSH_PARAMS: ''
[info] queried GUID of genpython-app: 17****b3-2**c-***6-b7**-7e*****11**a
[info] queried CF SSH endpoint: ssh.cf.eu1.mindsphere.io:8443
[info] CF SSH endpoint url: ssh.cf.eu1.mindsphere.io, port: 8443
[info] obtained one-time password
[info] ssh command user: cf:17****b3-2**c-***6-b7**-7e*****11**a/0
[info] ssh command endpoint url: ssh.cf.eu1.mindsphere.io
[info] ssh command endpoint port: 8443
Permission denied, please try again.

Re: Issue with Python Dependencies for a Node.js App

Legend
Legend

I'm running out of ideas, your log shows you can properly reach the cf cli and get the configuration. My command line looks exactly like yours up to the permission denied.

The only other things I can think of are:
- check that `cf target` shows a proper output for `<your_org>` and `<your_space>`
- your user is listed under `Space Developer` or `Space Manager` with `cf space-users <your_org> <your_space>`
- your might have some kind of proxy in the middle, or ssh custom configuration in your `.ssh/config` or `/etc/ssh/ssh_config` that interferes with the ssh command launched by cf-ssh

You can try increasing the log level of the ssh command in the cf-ssh script (with `-vvv`) and see if that helps troubleshoot the issue.

Re: Issue with Python Dependencies for a Node.js App

Thanks for all your help, but I think there's no issue from above points perspective.

- 'cf target' works perfect and shows my user, org and space.
- Checked my roles, I am a 'Space Developer' as well as 'Space Manager' in my org/space.
- I couldn't find '.ssh/config', but there's nothing suspicious in '/etc/ssh/ssh_config'
- using cf-ssh script with '-vvv' gives me same output as I posted earlier Smiley Sad

I also tried to ssh using my Billing Manager's credentials, but no luck.

Trying to find out what's wrong...

Re: Issue with Python Dependencies for a Node.js App

Legend
Legend

For the `-vvv` you need to modify the script cf-ssh.sh, add that option as first parameter of both ssh commands that you find at the bottom. You'll be then able to see what is happening internally with ssh, hopefully you see some debug info that points to the reason of the denied access. You could also print your one-time password locally just in case it is empty somehow.

 

That is:

 

  # Use different ssh commands in case we are using a proxy command
 .log "OTP: ${cf_ssh_otp}" if [[ -z ${cf_ssh_proxy_command} ]]; then sshpass -p "${cf_ssh_otp}" ssh -vvv -4 -p "${cf_ssh_endpoint_port}" -o "${cf_ssh_no_host_check_opt}" $arg_extra_ssh_params "${cf_ssh_user}"@"${cf_ssh_endpoint_url}" else sshpass -p "${cf_ssh_otp}" ssh -vvv -4 -p "${cf_ssh_endpoint_port}" -o "${cf_ssh_proxy_command}" -o "${cf_ssh_no_host_check_opt}" $arg_extra_ssh_params "${cf_ssh_user}"@"${cf_ssh_endpoint_url}" fi

Re: Issue with Python Dependencies for a Node.js App

Ah! Okay, sorry didn't understand that.

 

Tried that, it gives me pretty long log, attached in log.txt, I am not able to interpret anything from that Smiley Happy

 

Can you please have a look and let me know?

Re: Issue with Python Dependencies for a Node.js App

Legend
Legend
The output looks perfect until the permission denied. I really don't know what happens with your environment. The script is able to auto-detect the configuration and get an OTP, so no proxy issues. It just is rejected by the server.

I'd have said that there's a bug in cf-ssh.sh, but you report that ssh doesn't work either when you try to connect directly, so my only conclusion is that there's something wrong with your space / org. I'd open a ticket with MindSphere support.