-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
doesn't work on Vagrant 1.8.0
#6702
Comments
From Cygwin Terminal: coreos-01: Rsyncing folder: /cygdrive/d/vagrant-lab/ => /vagrant
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.
Host path: /cygdrive/d/vagrant-lab/
Guest path: /vagrant
Command: rsync --verbose --archive --delete -z --copy-links --chmod=ugo=rwX --no-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o ControlMaster=auto -o ControlPath=C:/cygwin/tmp/ssh.625 -o ControlPersist=10m -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'C:/Users/<user_name>/.vagrant.d/insecure_private_key' --exclude .vagrant/ /cygdrive/d/vagrant-lab/ core@127.0.0.1:/vagrant
Error: Warning: Permanently added '[127.0.0.1]:2222' (ED25519) to the list of known hosts.
mm_receive_fd: no message header
process_mux_new_session: failed to receive fd 0 from slave
mux_client_request_session: read from master failed: Connection reset by peer
Failed to connect to new control master
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1] |
@arthuroy thank you. Removing lines 77-79 from helper.rb worked for me. |
I can confirm. Windows 10 Build 10240 Same issue, fix helps the same way :) |
Same issue here on 1.8.1. Removed the lines, now it works. |
Windows 10, Vagrant 1.8.0, fix working <3 |
I was able to reproduce this with 1.8.1 on Windows 10 |
Windows 8.1 64, Vagrant 1.8.1, removed above lines and it works. |
Thanks for the workaround - Windows 10, Vagrant 1.8.0 |
+1 For the solution. When Googling this issue I came across mentions that there are problems with using SSH ControlMaster under Cygwin. Maybe there should be an environment check on this code. |
Can anyone confirm if this is only on MinGW (Cygwin) versions of OpenSSH? If so, a simple check like...
Would work. A way to check in Windows is with Example:
|
Thanks, #6702 (comment) got me running on Windows 7/Cygwin/Vagrant 1.8.1. (Obviously, my path has a |
I'm currently using cwRsync 3.1.0 on Windows 7/Git Bash/Vagrant 1.8.1. The previous comment was not enough for my machine as it caused the following error:
I used solutions from #3230 to resolve my problem. |
Win10 Pro Same symptoms as first reported. I tried the workaround (remove lines 77-79), but I'm still experiencing the same symptoms. Any Ideas? Thanks. |
Had the same issue on Windows 10 / VirtualBox 5 / MSYS2 rsync & openssh (from msys2-i686-20150916.exe) / Vagrant 1.8.1. Workaround in #6702 (comment) fixed it, thanks for that. |
Same issue on:
Workaround in the comment worked like a charm. Thanks! |
This issue is now a month old, and the fix seems to be very simple. This, along with a few other baffling issues, has been a disappointing look into quality assurance at HashiCorp. I hope that this is fixed soon and that we're also given more insight into the testing and release process at HashiCorp (which seems as though it has a lot of room for improvement at the moment). |
Same problem here
Workaround doesn't work.
|
I have been experiencing the same issue:
rsync error:
I removed Vagrant 1.8.1 and installed an older version that I know works on another machine (1.7.4) and it now works fine. |
Same problem here. Windows 10 |
Same problem here -- workaround here works: #6702 (comment)
|
I can confirm that on Windows 10 64-bit, with rsync 3.1.2, Vagrant 1.8.1 and VirtualBox 5.0.12 the workaround noted here: #6702 (comment) resolves issues I've had with rsync. |
Another 👍 on the fix from @arthuroy working for a Windows 10 x64, Vagrant 1.8.1, VMWare Workstation user. Any word from a Hashicorp org person on getting a fix into a released version? Makes it really hard to promote Vagrant internally when these sorts of basics don't work out of the box. |
@frimik I don't think Git bash has |
@shrmrf indeed, but rsync in turn use ssh, and it uses whatever client is on path. And while in the git Bash shell where I run pretty much all my things, it picks that SSH client. Removing the
my Rsync (mingw) expects if Vagrant::Util::Platform.windows?
# rsync for Windows expects cygwin style paths, always.
hostpath = Vagrant::Util::Platform.cygwin_path(hostpath)
end Guess I need to decouple these things :). For now I've hacked both things above and my rsync works at the moment :). |
I see... > which ssh
/c/MinGW/msys/1.0/bin/ssh
> which rsync
/c/MinGW/msys/1.0/bin/rsync I can confirm that this works too. I don't think this is the right place to ask.. but do you know if we can use |
@frimik Thank you for pointing out that this is broken with the SSH client that comes with Git Bash. Installing openssh and rsync packages with mingw-get (http://www.mingw.org/wiki/getting_started) and copying all files from |
You don't have to overwrite your Git installation, just put the MinGW bin folder earlier in your PATH than then any other rsync binary. |
You can also uninstall the normal Git for Windows and install the Git for Windows SDK which has a package manager that can install rsync. |
Managed to resolve the issue by installing msys2 using MSYS2 installer, then installing rsync package with |
Note: using just cwRsync isn't going to work as of now, because it expects "cygwin-branded" paths (like |
This error is still occuring when using msys2 and vagrant: I am also using the openstack plugin from https://github.com/ggiamarchi/vagrant-openstack-provider Error:
Any ideas? Disabling rsync via Vagrantfile did not work. Edit: |
@baderas can you try checking rsync with an It is working for me. Here's my env:
|
Just for clarification: I'm using msys2, not msys. |
I opened a bug report there: ggiamarchi/vagrant-openstack-provider#304 |
I think we should be checking for the existence of cygpath in the path as well. Then as long as your ssh, rsync and cygpath work together you should be all right. No need to install cygwin then. Here is the monkey patch I would apply to C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.8.6\lib\vagrant\util\platform.rb:
|
One thing to check, if the workarounds do not work and you have git bash installed on Windows, is which ssh and rsync is used. Had the same error, and turned out that was using rsync from cygwin, but ssh from git bash. Changed the sequence in %PATH%, so that cygwin bin dir is before git bin dir, and it worked. |
Hi, same problem here, Could not find the X.Org or XFree86 Window System, skipping. ==> default: Checking for guest additions in VM... Host path: /cygdrive/c/vm/centos/ C:\vm\centos>vagrant ssh Host: 127.0.0.1 C:\vm\centos>vagrant --version C:\vm\centos>ver Microsoft Windows [Version 10.0.14393] C:\vm\centos> |
Had the rsync issue aswell using Git Bash. Added: So both ssh and rsync are used from C:/MinGW/msys/1.0/bin instead of Git Bash Mingw64 installation. |
@ulkuniem How to export path in windows10 |
@valoujjal If you want to persistent edit to the PATH environment variable: If you mean to export like in bashrc, there are ways. and with cmd.exe profiles I'm not that familiar with but fast googling gave me this blog post that might be helpful: cachemiss |
@ulkuniem Adding the path to the Git bashrc worked for me! (I added the path to cygwin though). |
It is line 53 on Vagrant 1.9.3 |
@ulkuniem Thanks! I only installed rsync via MinGW and that seemed to solve the issue for me, I didn't have to install ssh. |
Running vagrant
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
rsync
doesn't work on Vagrant 1.8.0, but it was ok on 1.7.4.From MSYS2 Shell:
see also #4586 #4073
The text was updated successfully, but these errors were encountered: