-
Notifications
You must be signed in to change notification settings - Fork 213
Runtime error with MINGW64_NT-10.0 #465
Comments
You need to have rsync installed on your workstation. I usually work on OS X so the best I can offer for windows is to check out the readme at https://github.com/tknerr/bills-kitchen and contact the author there. I believe there are a few options for rsync on windows. |
Or if rsync works and you suspect a problem with the control master support you can try adding |
I installed rsync (cwRsync 5.4.1), and have similar issues. For some weird reason, I am prompted to enter a password to log in. The process for
At this point, it just freezes. |
Can you run it with -VV ? That should tell us what operation is leading to Do you have anywhere you would expect to enter a password or is everything On Friday, 11 December 2015, Joaquin Menchaca [email protected]
-Mat matschaffer.com |
I just tried this:
|
For using the ssh_config, it just freezes. $ knife solo cook vagrant@localhost -F ssh_config -VV
INFO: Using configuration from C:/Users/suave/projarea/sysadmin-exp/chef/06.knife_solo/centos7/.chef/knife.rb
Starting 'Run'
Running Chef on localhost...
Checking Chef version...
Enter the password for vagrant@localhost: vagrant When I specify the port and identity file manually, I get further information: $ knife solo cook vagrant@localhost -p 2222 -i .vagrant/machines/default/virtualbox/private_key -VV
INFO: Using configuration from C:/Users/suave/projarea/sysadmin-exp/chef/06.knife_solo/centos7/.chef/knife.rb
Starting 'Run'
Running Chef on localhost...
Checking Chef version...
DEBUG: Initial command sudo chef-solo --version 2>/dev/null | awk '$1 == "Chef:" {print $2}'
DEBUG: Initial command sudo -V
DEBUG: Running processed command sudo -V
DEBUG: sudo -V stdout: Sudo version 1.8.6p7
Sudoers policy plugin version 1.8.6p7
Sudoers file grammar version 42
Sudoers I/O plugin version 1.8.6p7
DEBUG: Running processed command sudo -p 'knife sudo password: ' chef-solo --version 2>/dev/null | awk '$1 == "Chef:" {print $2}'
DEBUG: sudo -p 'knife sudo password: ' chef-solo --version 2>/dev/null | awk '$1 == "Chef:" {print $2}' stdout: 12.5.1
DEBUG: Node config '../chef-repo/nodes/localhost.json' already exists
DEBUG: Berksfile not found
DEBUG: Cheffile not found
Uploading the kitchen...
DEBUG: Initial command ver
DEBUG: Running processed command ver
DEBUG: ver stdout: bash: ver: command not found
DEBUG: Initial command mkdir -p -m 0700 ~/chef-solo
DEBUG: Running processed command mkdir -p -m 0700 ~/chef-solo
DEBUG: No chefignore file found at ./chefignore no files will be ignored
DEBUG: ["rsync", "-rL", "-v", "--chmod=ugo=rwX", "--rsh=ssh vagrant@localhost -i .vagrant/machines/default/virtualbox/private_key -p 2222 -o ControlMaster=auto -o ControlPath=C:\\Users\\suave/.chef/knife-solo-sockets/%h -o ControlPersist=3600", "--delete-after", "-zt", "--excle=revision-deploys", "--exclude=.git", "--exclude=.hg", "--exclude=.svn", "--exclude=.bzr", "/C/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/knife-solo/resources/patch_cookbooks/", ":~/chef-solo/cookbooks-1"]
mm_receive_fd: no message header
process_mux_new_session: failed to receive fd 0 from slave
mm_send_fd: sendmsg(2): Connection reset by peer
mux_client_request_session: send fds failed
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.1]
C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/knife-solo/tools.rb:4:in `system!': Failed to launch command ["rsync", "-rL", "-v", "--chmod=ugo=rwX", "--rsh=ssh vagrant@localhost -i .vagrant/machines/default/virtualbox/private_key -p 2222 -o ContrMaster=auto -o ControlPath=C:\\Users\\suave/.chef/knife-solo-sockets/%h -o ControlPersist=3600", "--delete-after", "-zt", "--exclude=revision-deploys", "--exclude=.git", "--exclude=.hg", "--exclude=.svn", "--exclude=.bzr", "/C/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/ge/knife-solo-0.5.1/lib/knife-solo/resources/patch_cookbooks/", ":~/chef-solo/cookbooks-1"] (RuntimeError)
from C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/chef/knife/solo_cook.rb:279:in `rsync'
from C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/chef/knife/solo_cook.rb:233:in `upload'
from C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/chef/knife/solo_cook.rb:249:in `upload_to_provision_path'
from C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/chef/knife/solo_cook.rb:124:in `block in sync_kitchen'
from C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/chef/knife/solo_cook.rb:123:in `each'
from C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/chef/knife/solo_cook.rb:123:in `each_with_index'
from C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/chef/knife/solo_cook.rb:123:in `sync_kitchen'
from C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/chef/knife/solo_cook.rb:96:in `block in run'
from C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/chef/knife/solo_cook.rb:212:in `time'
from C:/Users/suave/AppData/Local/chefdk/gem/ruby/2.1.0/gems/knife-solo-0.5.1/lib/chef/knife/solo_cook.rb:79:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1-universal-mingw32/lib/chef/knife.rb:405:in `block in run_with_pretty_exceptions'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1-universal-mingw32/lib/chef/local_mode.rb:44:in `with_server_connectivity'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1-universal-mingw32/lib/chef/knife.rb:404:in `run_with_pretty_exceptions'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1-universal-mingw32/lib/chef/knife.rb:203:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1-universal-mingw32/lib/chef/application/knife.rb:142:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1-universal-mingw32/bin/knife:25:in `<top (required)>'
from C:/opscode/chefdk/bin/knife:64:in `load'
from C:/opscode/chefdk/bin/knife:64:in `<main>' |
The password prompt looks like a sudo prompt. Can you try setting up the As for the rsync fail, can you confirm that running the command (at least On Friday, 11 December 2015, Joaquin Menchaca [email protected]
-Mat matschaffer.com |
These are standard vagrant boxes, so I can sudo w/o permission. $ ssh vagrant@localhost -F ssh_config
Last login: Fri Dec 11 10:15:34 2015 from 10.0.2.2
[vagrant@localhost ~]$ sudo su -
[root@localhost sudoers.d]# cat /etc/sudoers.d/vagrant
vagrant ALL=(ALL) NOPASSWD: ALL |
I am trying combinations with rsync, but I am rusty with the tool. $ rsync -rL -v -e "ssh vagrant@localhost -F ssh_config" Vagrantfile vagrant@localhost:test/
dup() in/out/err failed
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at /usr/src/rsync/rsync-3.0.8/io.c(760) [sender=3.0.8]
$ rsync -rL -v -e "ssh vagrant@localhost -F ssh_config" ../chef-repo/ vagrant@localhost:test
dup() in/out/err failed
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at /usr/src/rsync/rsync-3.0.8/io.c(760) [sender=3.0.8] I get similar errors, whether using csRsync or MSYS Rsync |
Googling for that error turned up On Friday, 11 December 2015, Joaquin Menchaca [email protected]
-Mat matschaffer.com |
Is rsyncd required to run on target node? It's not running on my target CentOS 7 node.
|
It should be able to work by calling the rsync binary on the server side. On Friday, 11 December 2015, Joaquin Menchaca [email protected]
-Mat matschaffer.com |
I am thinking about some potential solutions paths. I think that the rsync does not work on MSYS, is because I may be using 32-bit w/ 64-bit environment, I am unfamiliar with MSYS beyond bundled versions with git, so I can take MSYS2 for a spin, see if I have better mileage. I can also use pure CygWin, but I have numerous problems with CygWin, e.g. file permission problem on Win7+ (noacl vs. cygdrive). Most problematic is that ChefDK doesn't work with it out of the box with CygWin, but works with MSYS. There's a Chef blog article on this, will dig that up after I can get rsync to work. Lastly, these vagrant images (centos or ubuntu trusty) have worked on both Linux host or Mac OS X flavored hosts, without requiring use of rsyncd. I will try some options, if I can get this to work, I can submit some documentation snippets for this. Side Note, Vagrant and other tools are suffering from this issue as well. I think they had some ruby library issues in addition to the non-existence of rync on Windows; I also saw discussions on bundling an rsync client with vagrant. I am not sure there final solution, may look at this later after running some tests... |
Some better documentation on how to use knife-solo from windows would definitely be appreciated. I'm all Mac & Linux these days so can't offer much perspective but if you hit new errors let me know and I can try to help work through them. |
I managed to setup a CygWin + ChefDK (notes below). I still have the error:
For getting the ChefDK to work with CygWin, the problem is that ChefDK comes with an embedded Windows Ruby, which doesn't work with CygWin POSIX paths, but works with Windows Command Shell, PowerShell, and MSYS. Thus, I created some aliases to wrap of the ChefDK commands. |
Finally. I am able to successfully able to use rsync, but knife-solo still fails.
Thus with good ChefDK + good Rsync, Knife-Solo fails:
|
Can you run the command as-specified in the output? Given what you On Saturday, 2 January 2016, Joaquin Menchaca [email protected]
-Mat matschaffer.com |
Assuming that is a space delimited array, I can try to recreate it. Generally, you cannot pass "C:\path\to\whatever" to POSIX systems, as they do not understand that. Thus the You would need to check One thing bizarre. How is knife-solo getting |
Hi. I may need some help. I have been trying to massage the command, but I am by no means an expert on rsync. I am sleuthing around solutions, reviewing man pages, etc. My original cook command is this:
I try to do the command manually, after fixing the path names. I am wondering if the --rsh string needs to be quoted? Any ideas?
|
Part of the struggle with this is that the output from knife-solo with I was able to get somewhere
This provided clues to get this information: http://stackoverflow.com/questions/20959792/is-ssh-controlmaster-with-cygwin-on-windows-actually-possible This referenced:
|
Okay, you'll want to pass |
I am not able to cook, when trying this with vagrant and git-bash (64bit MSYS). The problem is that the paths are getting munged up pretty badly. I initially had a problem with my own identity file, which I corrected (input was
C:
, so it was missing the /C/).However, even though that is fixed, when I try to cook, I am prompted for a password, and then it just hangs. I left the initial RuntimeError message below, as I noticed that the ControlPath might have caused a problem under MSYS:
ControlPath=C:\\Users\\devops/.chef/knife-solo-sockets/%h
. Even if that directory resolved correctly, I never created a.chef
there, only in my little vagrant play area~/knife_solo/centos7/.chef
.chef/knife.rb
The text was updated successfully, but these errors were encountered: