Comments (8)
inline
Sent from my iPhone
On Nov 9, 2016, at 2:14 AM, Sven Schmidt [email protected] wrote:
Hello,
I built the cli 2 days ago. Today I sshed into an uaa on vsphere.
First I tried gobosh -e overbosh ssh uaa 0 -d cf to connect to the uaa/0 instance which threw this error:
new cli always requires slashes for instance identifiers. uaa/0 for example instead of a space. in this case 0 became the command that was being run as shown below by the error from bash.
Using environment '172.27.1.6' as user 'admin'Using deployment 'cf'
Task 6471. Done
?/0: stderr | Unauthorized use is strictly prohibited. All access and activity
?/0: stderr | is subject to logging and monitoring.
?/0: stdout | bash: 0: command not found
?/0: stderr | Connection to 172.27.1.53 closed.Running SSH:
1 error(s) occurred:
- Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/home/vcap/.bosh/tmp/ssh-priv-key146955521 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/home/vcap/.bosh/tmp/ssh-known-hosts880087660 172.27.1.53 -l bosh_0c902fee64414437 0', stdout: '', stderr: '': exit status 127
Exit code 1```
after leaving out the id, I was able to connect, but when I close the SSH session I will get the error with another exit status
1 error(s) occurred: - Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/home/vcap/.bosh/tmp/ssh-priv-key436948954 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/home/vcap/.bosh/tmp/ssh-known-hosts249189745 172.27.1.53 -l bosh_941e632f2cc94387', stdout: '', stderr: '': exit status 130 Exit code 1``` Please let me know if I can provide logs/more output to help pinning down this error. were you using this interactively or running a specific command? it looks like in either case it resulted in exit code 130. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
from bosh-cli.
Hi, I was running it interactively, grabbing some logs at the first time. I tried it again, getting the same error when opening the session and then closing it again immediately with ctrl-d
from bosh-cli.
It's worth noting that when you Ctrl-C a command, that command will exit with a 130 status by default. Standard ssh will return the exit code of the last command executed. The CLI interprets the exit code that ssh gives (130) as a failure and propagates the exit code, too.
If you're seeing exit code 130, it probably means one of the following happened before exiting...
- a login shell command errored (unlikely unless you've patched your BOSH VM with some special commands)
- you ran a command like
tail -f /var/vcap/sys/log/**/*.log
and Ctrl-C'd it
Do either of those sound familiar?
@cppforlife, we chatted about this behavior a while ago. Perhaps a compromise for interactive mode might be to not raise an error in the UI, but still propagate the exit code. It would look normal and less alarming to users, but still provide the low-level behavior some automation may care about.
from bosh-cli.
I had Number 2 in one case, but the error also appears when I just ctrl-d my way out (Tested it right now with sshing onto the machine then immediately exiting with ctrl-d). Might me an idea to swallow that error.
from bosh-cli.
yeah i think it makes sense to be a bit more friendly with error message returned from terminated ssh sessions.
from bosh-cli.
Also had this issue
$ gosh --version
version 0.0.147-ba602d1-2017-01-11T20:05:06Z
Succeeded
router/388cc459-fcbe-4538-b82b-d37a3bee0ed9:~$ exit
logout
Connection to 10.0.16.5 closed.
Killed by signal 1.
Running SSH:
1 error(s) occurred:
* Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/shannon/.bosh/tmp/ssh-priv-key685444168 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/shannon/.bosh/tmp/ssh-known-hosts754332423 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l vcap 35.184.49.153 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null 10.0.16.5 -l bosh_ed49601128e04526', stdout: '', stderr: '': exit status 130
Exit code 1
from bosh-cli.
This happens if exit status of last command run is not 0 even if the shell is interactive. The current behavior is a bit confusing as it always feels as something went wrong.
- Last command exits with status 0
$ bosh ssh -d cf diego-cell; echo "EXIT CODE: $?" ... diego-cell/cf12e4ee-ad60-496d-bb34-9417fc054764:~$ exit logout Connection to 10.244.0.139 closed. Succeeded EXIT CODE: 0
- Last command exits with status 42
$ bosh ssh -d cf diego-cell; echo "EXIT CODE: $?" ... diego-cell/cf12e4ee-ad60-496d-bb34-9417fc054764:~$ exit 42 logout Connection to 10.244.0.139 closed. Running SSH: 1 error(s) occurred: * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/home/stas/.bosh/tmp/ssh-priv-key885911897 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/home/stas/.bosh/tmp/ssh-known-hosts536285924 10.244.0.139 -l bosh_e7ad4a2758354bd', stdout: '', stderr: '': exit status 42 Exit code 1 EXIT CODE: 1
What about mak*ing bosh cli do the same as openssh client
and cf cli
do, i.e. returning exit code of the last command without error message?
$ man ssh | grep "^EXIT STATUS" -A1
EXIT STATUS
ssh exits with the exit status of the remote command or with 255 if an error occurred.
- Example for openssh
$ ssh -i /tmp/vbox.key jumpbox@$BOSH_ENVIRONMENT; echo "EXIT CODE: $?" ... $ exit 42 Connection to 192.168.50.6 closed. EXIT CODE: 42
from bosh-cli.
Closing in favor of #434
from bosh-cli.
Related Issues (20)
- Cannot update go module to use higher version then v6.4.1 HOT 3
- BOSH CLI commands to automatically add diego cell or Create VM on which containers can be deployed on . HOT 1
- [Question] About release v6.4.8 HOT 5
- Running deploy with a certain variable value panics HOT 3
- BOSH CLI on Windows platform is holding file lock on ssh-known-hosts file prevent ssh child process to read it HOT 4
- Release binaries for arm64 HOT 2
- Set the the ACL when uploading to S3 HOT 3
- Allow importing bosh-cli v6.4.2 as a dependency HOT 2
- TLS handshake failure occurs when downloading bosh-release HOT 2
- bosh upload-release (from source) ignores local changes HOT 2
- Specifying instances by index ambiguous HOT 3
- Updating package via bosh `vendor-package --prefix` does not honor prefix on dependent packages HOT 3
- Adding `--preview` parameter to bosh deploy command before commencing deployment HOT 5
- Creating releases with blobs are broken on Windows HOT 3
- Replace --force flag with --dev-release? HOT 7
- delete_stemcell is causing bosh CLI to fail when stemcell already does not exist HOT 2
- Is a internal ca certificate can be used for HOT 2
- [Windows] Missing bosh create-env support HOT 12
- Default interpolated x509 certificates have invalid 3 digits USA country code
- CLI crashes on trying to select multiple columns to print HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bosh-cli.