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

rsync_to uses incorrect port when using Beaker with vagrant #53

Open
mjs510 opened this issue Apr 4, 2022 · 0 comments
Open

rsync_to uses incorrect port when using Beaker with vagrant #53

mjs510 opened this issue Apr 4, 2022 · 0 comments

Comments

@mjs510
Copy link

mjs510 commented Apr 4, 2022

Using beaker with beaker-vagrant versions 0.6.7 and above, when I call rsync_to it attempts to connect to the guest on port 2222. This fails as the guest is not listening on that port.

Here is a typical error:

rsync: localhost:/data/ to root@10.255.137.136:/data {:ignore => ["spec", "tests", ".git", ".vagrant", "vagrant"]}
rsync returned #<Rsync::Result:0x000055fcd247dd60 @raw="ssh: connect to host 10.255.137.136 port 2222: Connection refused\r\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: unexplained error (code 255) at io.c(228) [sender=3.2.3]\n", @exitcode=255>

Note, vagrant is forwarding port 22 on the guest to 2222 on the host so rsync_to could successfully connect to localhost port 2222, but not 10.255.137.136 port 2222.

This problem only occurs when using beaker-vagrant versions higher than 0.6.7. I believe the port to use is determined from the ssh config (https://github.com/voxpupuli/beaker/blob/master/lib/beaker/host.rb#L579) so is it possible that this commit in beaker-vagrant has introduced a bug? 5cd6320

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