I have an app deployed to IBM Cloud as a liberty java application.
From the Cloud Foundry CLI on my local machine I can connect and run a command using
cf ssh APP -c "ls -l"
With version
$ cf -v
cf version 6.26.0+9c9a261fd.2017-04-06
Attempting to run the same cf ssh * command from a Jenkins job on a server. This is always failing to connect to SSH. The jenkins job's build script already performs other cf operations such as cf push and cf start etc, I am just adding a new step which uses cf ssh, example:
bx cf ssh rca-qa5 -c "ls -l"
This runs and hits a connection error with the following output
+ bx cf ssh rca-qa5 -c ls -l
Invoking 'cf ssh rca-qa5 -c ls -l'...
FAILED
Error opening SSH connection: dial tcp zzz.zzz.zzz.zzz:2222: getsockopt: connection refused
Build step 'Execute shell' marked build as failure
Am I missing some configuration for the jenkins server's IBM Cloud cli? Or is there any other reason why this might not be able to connect?
Edit: Add Jenkins IBM Cloud CLI version info
+ bx cf -v
Invoking 'cf -v'...
cf version 6.32.0+0191c33d9.2017-09-26
+ bx -v
bx version 0.6.2+040af8d-2017-11-17T08:22:55+00:00
This may have been some sort of temporary outage as it began to work later.
How to ssh into a docker container running in IBM Cloud Foundry... 0 Answers
Login with appid redirect url invalid... 2 Answers
OPENWHISK AUTHENTICATION ERROR WHEN CALLED FROM WATSON ASSISTANT 0 Answers
Cloud Function connected to Watson Assistant gets HTTP 401 error and won't run 1 Answer
CF Auto Configure Failing 0 Answers