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

SSH connection to docker container reset #341

Open
ctrlaltdel121 opened this issue Jun 17, 2019 · 1 comment
Open

SSH connection to docker container reset #341

ctrlaltdel121 opened this issue Jun 17, 2019 · 1 comment

Comments

@ctrlaltdel121
Copy link

Hi,

I am trying to use test kitchen for the first time and I'm working with the docker driver. I've run into an issue where the kitchen create command is stuck waiting on SSH forever. I am using kitchen v1.24.

This is the error I get (with debug logging):

D      [SSH] opening connection to kitchen@localhost<{:user_known_hosts_file=>"/dev/null", :port=>32772, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :keys_only=>true, :keys=>["/***mydir***/.kitchen/docker_id_rsa"], :auth_methods=>["publickey"], :verify_host_key=>false, :logger=>#<Logger:0x0000000005635880 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00000000056357e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x0000000005635790 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @mon_owner=nil, @mon_count=0, @mon_mutex=#<Thread::Mutex:0x0000000005635740>>>, :password_prompt=>#<Net::SSH::Prompt:0x00000000056356f0>, :user=>"kitchen"}>
D      [SSH] connection failed (#<Errno::ECONNRESET: Connection reset by peer>)
       Waiting for SSH service on localhost:32772, retrying in 3 seconds

This is my .kitchen.yml:

---
driver:
  name: docker

provisioner:
  name: chef_zero

verifier:
  name: inspec

platforms:
- name: centos-7
  driver_config:
    image: centos:7
    platform: centos

suites:
  - name: addon_exec
    run_list:
      - recipe[addon_exec::default]
    verifier:
      inspec_tests:
        - test/integration/default
    attributes:

When I test the SSH using ssh -v -i .kitchen/docker_id_rsa kitchen@localhost -p 32772, I get into the container with no issue.

@ctrlaltdel121
Copy link
Author

I ended up getting past this by unsetting my SSH_AUTH_SOCK (ssh agent). Is there a way to have kitchen ignore this automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant