Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dont fail with stacktrace on connection errors #588

Merged
merged 1 commit into from
Mar 24, 2016
Merged

Conversation

arlimus
Copy link
Contributor

@arlimus arlimus commented Mar 24, 2016

turn

bin/inspec exec examples/profile/ -t ssh://192.168.12.34 --password sth
...
/usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/transports/ssh_connection.rb:182:in `rescue in establish_connection': SSH session could not be established (Train::Transports::SSHFailed)
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/transports/ssh_connection.rb:177:in `establish_connection'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/transports/ssh_connection.rb:205:in `session'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/transports/ssh_connection.rb:79:in `run_command'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/extras/os_detect_darwin.rb:14:in `detect_darwin'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/extras/os_common.rb:115:in `detect_family_type'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/extras/os_common.rb:80:in `detect_family'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/extras/os_common.rb:26:in `initialize'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/transports/ssh_connection.rb:221:in `initialize'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/transports/ssh_connection.rb:58:in `new'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/transports/ssh_connection.rb:58:in `os'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/extras/command_wrapper.rb:133:in `load'
    from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.10.3/lib/train/transports/ssh_connection.rb:45:in `initialize'
...

into this

bin/inspec exec examples/profile/ -t ssh://192.168.12.34 --password sth
...
Transport error, can't connect to 'ssh' backend: SSH session could not be established

@arlimus arlimus added the Type: Enhancement Improves an existing feature label Mar 24, 2016
@arlimus arlimus merged commit 62cadd0 into master Mar 24, 2016
@arlimus arlimus deleted the dr/connection-errors branch March 24, 2016 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improves an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant