ggiamarchi / vagrant-openstack-provider

Use Vagrant to manage OpenStack Cloud instances.
MIT License
245 stars 102 forks source link

connection timeout in authentication. (probably proxy issue) #337

Open hadisharifi opened 7 years ago

hadisharifi commented 7 years ago

At my place, we use proxy and I am trying to use the plugin behind the proxy. I am running the simple example with this plugin. Is there any particular proxy setting I am missing?

I am already doing the typical setting env variables in windows.

this is the error I am getting: C:/HashiCorp/Vagrant/embedded/gems/gems/rest-client-2.0.2-x86-mingw32/lib/restclient/request.rb:731:in rescue in transmit': Timed out connecting to server (RestClient Exceptions::OpenTimeout) from C:/HashiCorp/Vagrant/embedded/gems/gems/rest-client-2.0.2-x86-mingw32/lib/restclient/request.rb:647:intransmit'
from C:/HashiCorp/Vagrant/embedded/gems/gems/rest-client-2.0.2-x86-mingw32/lib/restclient/request.rb:145:in execute' from C:/HashiCorp/Vagrant/embedded/gems/gems/rest-client-2.0.2-x86-mingw32/lib/restclient/request.rb:52:inexecute'
from C:/Users/hsharifi/.vagrant.d/gems/2.2.5/gems/vagrant-openstack-provider-0.10.0/lib/vagrant-openstack-provider/client/rest_utils.rb:14:in post' from C:/Users/hsharifi/.vagrant.d/gems/2.2.5/gems/vagrant-openstack-provider-0.10.0/lib/vagrant-openstack-provider/client/keystone.rb:43:inauthenticate'
from C:/Users/hsharifi/.vagrant.d/gems/2.2.5/gems/vagrant-openstack-provider-0.10.0/lib/vagrant-openstack-provider/action/connect_openstack.rb:26:in execute' from C:/Users/hsharifi/.vagrant.d/gems/2.2.5/gems/vagrant-openstack-provider-0.10.0/lib/vagrant-openstack-provider/action/abstract_action.rb:8:incall'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/config_validate.rb:25:incall'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/handle_box.rb:25:incall'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builder.rb:116:incall'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in block in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/util/busy.rb:19:inbusy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:225:inaction_raw'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:200:in block in action' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:182:incall'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:182:in block in action' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:186:incall'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:186:in action' from C:/Users/hsharifi/.vagrant.d/gems/2.2.5/gems/vagrant-openstack-provider-0.10.0/lib/vagrant-openstack-provider/provider.rb:33:instate'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:506:in state' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:145:ininitialize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/vagrantfile.rb:79:in new' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/vagrantfile.rb:79:inmachine'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/environment.rb:669:in machine' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/plugin/v2/command.rb:177:inblock in with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/plugin/v2/command.rb:201:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/plugin/v2/command.rb:201:inblock in with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/plugin/v2/command.rb:183:in each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/plugin/v2/command.rb:183:inwith_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/commands/up/command.rb:131:in install_providers' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/commands/up/command.rb:85:inexecute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/cli.rb:42:in execute' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/environment.rb:308:incli'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/bin/vagrant:138:in `

'

ggiamarchi commented 6 years ago

I'm afraid we didn't implement proxy support (see #84). By the way, the underlying library we use for HTTP calls support proxy settings and it can be set statically. So, you can probably hack in your Vagrantfile something like that

require 'restclient'
RestClient.proxy = "http://my-proxy"

Vagrant.configure('2') do |config|
    ...
end

I think it should work.