Closed kevinpapst closed 10 years ago
Hi Kevin,
Nice that you like the plugin! =)
And sorry for problems. To be honest, I don't right away understand what's the issue. I run Vagrant 1.6.3 on OS X with the master version of vagrant-proxyconf just fine. Could you please gist the full debug output of a failed run. You can get it to file with:
vagrant up --debug > vagrant.log 2>&1
I don't normally have access to a Windows machine so it's difficult for me to debug this myself.
By the way, you can also install a released version of any plugin by downloading the gem manually from rubygems.org (e.g. https://rubygems.org/gems/vagrant-proxyconf) and installing it with vagrant plugin install
.
Oh, and why doesn't the normal installation work even with HTTP_PROXY
and HTTPS_PROXY
env vars? A Vagrant issue or too enthusiastic filtering rules on the proxy?
Too strict proxy rules, I couldn't even download the released gem file, thats why I used the source code built. I am trying to get the IT department to remove some of these proxy rules, because further puppet installations will fail too, but you might know that feeling: once you wrap your head around a problem, you just have to solve it ;-)
Will upload the full debug log tomorrow and thanks for your quick feedback! And if you have any idea what I could do to debug the problem, let me know. I am not a ruby dev, but I should be able to add some debug messages and recompile the plugin.
how about http_proxy
for environment?
@kevinpapst It could be the strict proxy rules..
Your computer seems Windows machine.
So I checked the execution on my windows7 machine.
The result of vagrant plugin install vagrant-proxyconf
on my machine is like that. (a little old vagrant version)
Have you done like this?
C:\tmp>vagrant --version
Vagrant 1.4.2
C:\tmp>set HTTP_PROXY=
C:\tmp>vagrant plugin install vagrant-proxyconf
Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...
The plugin 'vagrant-proxyconf' could not be found in local or remote
repositories. Please check the name of the plugin and try again.
C:\tmp>set HTTP_PROXY=http://myproxy:3128/
C:\tmp>vagrant plugin install vagrant-proxyconf
Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...
Installed the plugin 'vagrant-proxyconf (1.3.2)'!
C:\tmp>
Hey guys, thanks for all your feedback. @otahi I tried all that before I posted here. The proxy blocked the ruby client (or whatever fetches the gems when using "vagrant plugin install"), assuming that it is some kind of infected browser.
My real problem was: Vagrant reported that it loaded the proxyconf plugin but at the same time reported that the config section ".proxy" was unknown.
Must have been somehow related to my build from the source code. Today I brought the downloaded plugin gem (from rubygems) from home to work today and after installing that one everything worked now!
I don't know why the version that I did built from the sources had that problem, as I got no error during building the gem. I tried it on two different Windows7 machines with the same result. But as it works now with the pre-built version => I am closing this issue.
Sorry for stealing your time ;-)
@kevinpapst if you have time and can still reproduce the issue on Windows and bleeding edge plugin version, I would be interested to see the full debug log. That anyway feels like a bug somewhere (probably in Vagrant itself).
Sure, I will sent you the full debug output next week.
I was trying to running bleeding edge to get docker support :(. Getting the same issue
Debug log is here https://gist.github.com/btrepp/be32169ea83b7c289878
Kindof strange actually. The proxy config stuff is in a detection block
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http ="http://10.0.2.2:8888"
config.proxy.https="http://10.0.2.2:8888"
config.proxy.no_proxy="localhost,127.0.0.1"
end
So that's interesting, it seems like it knows proxyconf is installed, but its not attaching the proxy object to config when it does.
Yes, that's really strange. The plugin is listed in the beginning of the debug output, but it's never loaded/registered later. I can try to investigate later, but might be difficult as there are no hints of any kind in the debug log.
This was actually me failing to build the gem correctly. I had to tweak the gemspec (git's not on the path for how vagrant needs it. Windows ends up being a horrible combination of cygwin+normal shell and remembering which tool runs where).
So I had to edit the spec.files section in the gemspec, and I messed up and didn't include the lib folder properly :(. Fixing that mistake and re-installing it made it work.
I had a similar issue running
vagrant plugin install vagrant-proxyconf --plugin-source file://vagrant-proxyconf.1.4.4.gem
however running
vagrant plugin install vagrant-proxyconf.1.4.0.gem
worked
runefs's approach worked for me as well.
Hi!
Thanks for your plugin, very much appreciated :+1:
I have an obscure problem, which I cannot solve and like to ask for your help. Usecase is a simple setup of a new Vagrant Linux-Guest box on a Windows machine behind a companies very restrictive proxy.
I couldn't use the default "vagrant plugin install vagrant-proxyconf" due to the proxy (even with env vars
HTTP_PROXY
andHTTPS_PROXY
set). So I downloaded two different version (the https://github.com/tmatilai/vagrant-proxyconf/releases/tag/v1.2.0 and master) which both have the same problem. Installation as suggested via wiki worked:But when using "vagrant up" or "vagrant reload --provision" I always receive the message:
The Vagrantfile is as simple as possible:
The raise condition is never met, so the plugin seems to be loaded (just to make sure: I tried to moved the raise into the if_has_plugin clause and the provisioning stopped directly with the expected "ProxyConf plugin not installed!" message).
Here is some output using the "vagrant reload --provision --debug" flag:
Which tells me that the plugin is loaded, same applies for "vagrant plugin list":
I use Vagrant 1.6.3 as seen in "vagrant version":
Now being at home I tried 'vagrant plugin install vagrant-proxyconf' on my Mac and the box/plugin is working as expected. So it must be either the Windows7 environment at work or the installation method.
Can you give me some hints on how to debug the problem? It seems that the plugin is not loaded properly, as config.proxy is not registered as possible key.