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

Fix docker usage to use correct port and IP address on local docker #44

Merged
merged 1 commit into from
Mar 13, 2021

Conversation

treydock
Copy link
Contributor

This fixes #43 . Output from local docker run of beaker using this patch:

centos-7 15:07:30$ cat /etc/resolv.conf
  Attempting ssh connection to 127.0.0.1, user: root, opts: {:password=>"root", :port=>"5484", :forward_agent=>false, :auth_methods=>["password", "publickey", "hostbased", "keyboard-interactive"]}

Before this patch my local executions using beaker were trying to connect to the container IP and port 22 both of which won't work.

@treydock
Copy link
Contributor Author

This is output when only fixing port issue:

centos-7 15:06:32$ cat /etc/resolv.conf
  Attempting ssh connection to 172.17.0.7, user: root, opts: {:password=>"root", :port=>"5484", :forward_agent=>false, :auth_methods=>["password", "publickey", "hostbased", "keyboard-interactive"]}
  Warning: Try 1 -- Host 172.17.0.7 unreachable: Errno::ECONNREFUSED - Connection refused - connect(2) for 172.17.0.7:5484
  Warning: Trying again in 3 seconds

The issue above is the local execution trying to connect to container IP which isn't accessible from the host, should be using loopback address.

This was error with no changes using latest release:


centos-7 15:00:57$ cat /etc/resolv.conf
  Attempting ssh connection to 172.17.0.7, user: root, opts: {:password=>"root", :port=>"22", :forward_agent=>false, :auth_methods=>["password", "publickey", "hostbased", "keyboard-interactive"]}
  Warning: Try 1 -- Host 172.17.0.7 unreachable: Errno::ECONNREFUSED - Connection refused - connect(2) for 172.17.0.7:22
  Warning: Trying again in 3 seconds

@trevor-vaughan trevor-vaughan mentioned this pull request Mar 12, 2021
@trevor-vaughan trevor-vaughan merged commit b3ab3fd into voxpupuli:master Mar 13, 2021
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

Successfully merging this pull request may close these issues.

Wrong SSH port getting used
2 participants