vagrant-landrush / landrush

A Vagrant plugin that provides a simple DNS server for Vagrant guests
MIT License
666 stars 78 forks source link

Random installation failures on Windows 10 #213

Open MarkSummers opened 8 years ago

MarkSummers commented 8 years ago

From a clean installation of Vagrant, the command vagrant plugin install landrush succeeds on some Windows 10 machines and not on others. Despite considerable effort, we have been unable to determine the critical difference between these machines (there should be no difference as far as we know).

The failure happens because eventmachine 1.0.9.1 doesn't install. The output from the gem install -v '1.0.9.1' eventmachine operation is useless, even in debug mode. There is no clear error message (unlike similar issues involving SSL libraries which others have raised in the past).

gem install eventmachine installs a newer version (1.2.0.1) successfully. Is there any scope for updating landrush to use this version?

MarkSummers commented 8 years ago

It seems that the dependency on eventmachine comes from rubydns 0.8.5 Later versions of rubydns don't use eventmachine.

hferentschik commented 8 years ago

I would love to understand this problem better, but it requires me to also reproduce it. See comments below.

From a clean installation of Vagrant, the command vagrant plugin install landrush succeeds on some Windows 10 machines and not on others.

Is the failure an exceptional case or are we talking about something like 50/50 (in half of the cases it works in the other half it fails)?

Can you reproduce it on a single machine, for example by continuously un- and then re-installing Vagrant + Landrush? Or does the problem only occur on specific machines?

The failure happens because eventmachine 1.0.9.1 doesn't install. The output from the gem install -v '1.0.9.1' eventmachine operation is useless, even in debug mode.

What does it say? How do you know eventmachine is causing the problem? Does the plugin install abort with an error message that eventmachine could not be installed?

There is no clear error message (unlike similar issues involving SSL libraries which others have raised in the past).

Which SSL issues are you referring to?

gem install eventmachine installs a newer version (1.2.0.1) successfully.

Interesting.

Is there any scope for updating landrush to use this version?

Not at the moment. In order to make Landrush work at all on Windows we had to pin the rubydns version to 0.8.5. Later versions switched to Celluloid as underlying even processing framework which has issues on Windows. rubydns 0.8.5 depends pessimistically on eventmachine ~> 1.0.0, meaning a version < 1.1. Before tempering with versions, I would first need to understand the problem.

NeoLegends commented 8 years ago

I've got the same problems with eventmachine.

What does it say? How do you know eventmachine is causing the problem? Does the plugin install abort with an error message that eventmachine could not be installed?

When digging through the log output, it indicates that compiling the native parts of eventmachine failed. Installing a newer version of eventmachine (1.2.something) also works on my machine.

Here is the output of the compilation process.

we had to pin the rubydns version to 0.8.5. Later versions switched to Celluloid as underlying even processing framework which has issues on Windows.

Did you check whether very recent versions of Celluloid exhibit the same undesired behavior?

A side note: I'm not a ruby user so I cannot make much sense out of the output, but while searching for a fix I found that it might be related to the architecture of the system. Respectively that there might be a 32-bit compiler trying to compile code for a 64-bit platform. I'm not sure whether that information is of any use, but it might point somebody into the right direction. :) @MarkSummers Are you sure all your machines you tried landrush on have the same architecture?

Has anyone tried to just upgrade the rubydns dependency on eventmachine to 1.1 and see what happens / see whether it "just works"?

hferentschik commented 8 years ago

What Ruby interpreter do you guys have installed? Do you also have the DevKit installed?

NeoLegends commented 8 years ago

I've got the one that ships with the current installer of Vagrant. I'm not on my machine right now but I'm gonna post the version of my Ruby tomorrow.

NeoLegends commented 8 years ago

.\ruby.exe -v prints ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]

hferentschik commented 8 years ago

Di you guys have a previous version of Landrush installed when you try to install it? If so can you try to make sure all is clean, before installing Landrush. You can delete the ~/.vagrant.d folder and then re-install. Mind you, this will delete all your cached Vagrant data (downloaded boxes, etc).

For what it's worth, I've now also seen an issue with eventmachine, but once I restarted the machine and tried again, it worked. @MarkSummers, have you tried to reboot the machine? Maybe in combination with a ~/vagrant.d cleanup?

NeoLegends commented 8 years ago

Nope, this error also happened during the first (clean) install.

MarkSummers commented 8 years ago

Sorry, I missed all the follow-up comments on this issue.

By chance, I encountered an unrelated issue during another installation, which is described here: https://github.com/mitchellh/vagrant/issues/6852

It seems to me that the eventmachine issue may also be fixed by installing the same redistributable.

My theory is that Windows 10 machines upgraded from earlier Windows versions, or where another application has already required this redistributable, are the ones where Landrush installation is working.

MarkSummers commented 8 years ago

Confirm that all the machines with issues were 64-bit. The issue affected specific machines only (approximately 1 in 4 machines).

Removing ~/vagrant.d and rebooting doesn't fix it.

MarkSummers commented 8 years ago

The aforementioned SSL issues with eventmachine: https://github.com/eventmachine/eventmachine/issues/675

NeoLegends commented 7 years ago

Any updates on this?