tmatilai / vagrant-proxyconf

Vagrant plugin that configures the virtual machine to use proxies
MIT License
531 stars 74 forks source link

The following settings shouldn't exist: https   , http     #153

Closed markottaviani closed 8 years ago

markottaviani commented 8 years ago

Been trying solve this one for a while, and I'm coming up empty handed.

Windows 7 64bit Virtualbox Version 5.0.20 r106931

Vagrant 1.8.5

Tried both in a standard project specific Vagrantfile or in a global Vagrantfile:

Vagrant.configure("2") do |config|
  if Vagrant.has_plugin?("vagrant-proxyconf")
    config.proxy.enabled = true
    config.proxy.http     = 'http://access.lb.mycorp.com:80'
    config.proxy.https    = 'http://access.lb.mycorp.com:80'
    config.proxy.no_proxy = 'localhost,127.0.0.1,.mycorp.com'
  end
end
C:\my-box>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

#<VagrantPlugins::ProxyConf::Config::Key:0x486888>=true
#<VagrantPlugins::ProxyConf::Config::Key:0x47fec8>=
#<VagrantPlugins::ProxyConf::Config::Key:0x47fb98>=
#<VagrantPlugins::ProxyConf::Config::Key:0x47f7f0>=
#<VagrantPlugins::ProxyConf::Config::Key:0x47f580>=localhost,127.0.0.1,.mycorp.com
:
* The following settings shouldn't exist: https   , http    

Any help is appreciated thanks!

otahi commented 8 years ago

@markottaviani Thank you for your report.

I had tried to reproduce your problem, but I have not reproduced your problem. Can you check your vagrant box image, and your plugins? First, please try to use other vagrant image like ubuntu/trusty64.

I ran this Vagrantfile.

# Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"
  if Vagrant.has_plugin?("vagrant-proxyconf")
    config.proxy.enabled = true
    config.proxy.http     = 'http://access.lb.mycorp.com:80'
    config.proxy.https    = 'http://access.lb.mycorp.com:80'
    config.proxy.no_proxy = 'localhost,127.0.0.1,.mycorp.com'
  end
end

The result is as follows

[otahi@otahiair vagrant-proxyconf-issue-153]$ vagrant ssh -c env | grep -i proxy
NO_PROXY=localhost,127.0.0.1,.mycorp.com
http_proxy=http://access.lb.mycorp.com:80
FTP_PROXY=
ftp_proxy=
HTTPS_PROXY=http://access.lb.mycorp.com:80
https_proxy=http://access.lb.mycorp.com:80
no_proxy=localhost,127.0.0.1,.mycorp.com
HTTP_PROXY=http://access.lb.mycorp.com:80
Connection to 127.0.0.1 closed.
[otahi@otahiair vagrant-proxyconf-issue-153]$
markottaviani commented 8 years ago

Thanks for your response. Using your exact Vagrantfile:

C:\trusty>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

#<VagrantPlugins::ProxyConf::Config::Key:0x26cc328>=true
#<VagrantPlugins::ProxyConf::Config::Key:0x26cc220>=http://access.lb.mycorp.com:
80
#<VagrantPlugins::ProxyConf::Config::Key:0x26cc118>=http://access.lb.mycorp.com:
80
#<VagrantPlugins::ProxyConf::Config::Key:0x26cd588>=
#<VagrantPlugins::ProxyConf::Config::Key:0x2693e68>=localhost,127.0.0.1,.mycorp.
com
:
* The following settings shouldn't exist: https   , http    

Version Info:

C:\trusty>vagrant plugin list
vagrant-ca-certificates (1.2.0)
vagrant-proxyconf (1.5.2)
vagrant-registration (1.2.3)
  - Version Constraint: 1.2.3
vagrant-service-manager (1.1.0)
  - Version Constraint: 1.1.0
vagrant-share (1.1.5, system)
vagrant-sshfs (1.1.0)
  - Version Constraint: 1.1.0
C:\trusty>vagrant -v
Vagrant 1.8.5
otahi commented 8 years ago

@markottaviani Thank you for trying. Now, I don't know why this happens. Can you get a log with vagrant up --debug and put it on the Gist or something?

markottaviani commented 8 years ago

Sure, here you go: https://gist.github.com/markottaviani/ba16ce1226d6e76d557a863ab1088f1f

otahi commented 8 years ago

@markottaviani It seems vagrant on cygwin. Can you run vagrant up on cmd.exe?

markottaviani commented 8 years ago

Same result it appears: https://gist.github.com/markottaviani/b427d35cf53c0c9057ab4ba20cbf3ca0

otahi commented 8 years ago

@markottaviani Thank you for logs. But I have not found any solutions.

I have something I want to check.

  1. Can you reproduce this on other machines?
  2. Can you reproduce with Vagrantfile as exact same as my Vagrantfile?
  3. Can you reproduce this Vagrant with only vagrant-proxyconf and without any plugins?
  4. Can you reproduce this re-installed Vagrant?

Can you try some of them?

chelapurath commented 8 years ago

Try
if Vagrant.has_plugin?("vagrant-proxyconf") config.proxy.http = "http://username:password@proxyhost:80/" config.proxy.https = "http://username:password@proxyhost:80" config.proxy.no_proxy = "localhost,127.0.0.1,10.1.2.2" end

markottaviani commented 8 years ago

@chelapurath sadly still the same error.

@otahi I have tried with exactly your vagrant file. I'll try out some other machines. and fresh installs and see how it goes.

markottaviani commented 8 years ago

Good news, after some more troubleshooting I was able to trace this to some kind of old data in my .vagrant.d folder. Wiping that folder out and starting over cleared up this issue for me.

Thanks everyone for your help!