1

I am trying to run kitchen-converge/test using Vagrant (1.8.1) and Virtualbox (5.0), behind a proxy server (which has been configured using charles proxy).

I am either getting hung up while running kitchen test or getting connection refused while running kitchen converge.

I have posted my config and log files including the errors. I was using berkshelf,test-kitchen along with proxyconf as there is proxy server.

Could any one advise on what could be missing and causing this error to occur and how it can be resolved.

Config & Log Files:

kitchen.yml

driver:
name: vagrant
customize:
natdnshostresolver1: "on"
network:
 - ["forwarded_port", { guest: 81, host: 8082 }]
 - ["forwarded_port", { guest: 80, host: 8087 }]
provisioner:
 chef_omnibus_url: http://www.chef.io/chef/install.sh
 name: chef_zero
 platforms:
 - name: centos-6.7
 suites:
 - name: default
 run_list:
 - recipe[chef-boxtest::default]
 attributes:

Vagrant File

if Vagrant.has_plugin?("vagrant-proxyconf")
  config.proxy.http = "http://proxy.abc.com:8099"
  config.proxy.https = "https://proxy.abc.com:8099"
  config.proxy.no_proxy = "localhost,127.0.0.1"
end

kitchen-test

[SSH] Established
   Vagrant instance <default-centos-67> created.
   Finished creating <default-centos-67> (3m39.40s).
   -----> Converging <default-centos-67>...
   Preparing files for transfer
   Preparing dna.json
   Resolving cookbook dependencies with Berkshelf 4.3.1...
   Removing non-cookbook files before transfer
   Preparing validation.pem
   Preparing client.rb
   -----> Installing Chef Omnibus (install only if missing)
   Downloading http://www.chef.io/chef/install.sh to file /tmp/install.sh
   Trying wget...

kitchen-converge

[SSH] connection failed, retrying in 1 seconds (#<Errno::ECONNREFUSED:   Connection refused - connect(2) for 127.0.0.1:2222>)
[SSH] connection failed, retrying in 1 seconds (#<Errno::ECONNREFUSED: Connection refused - connect(2) for 127.0.0.1:2222>)
$$$$$$ [SSH] connection failed, terminating (#<Errno::ECONNREFUSED: Connection refused - connect(2) for 127.0.0.1:2200>)
>>>>>> Converge failed on instance <default-ubuntu-1204>.
Alex Harvey
  • 14,494
  • 5
  • 61
  • 97
bablu
  • 75
  • 4
  • 11

1 Answers1

1

I have never used a Vagrantfile with kitchen, as the kitchen-vagrant driver generates the Vagrant file on the fly.

I would suggest that you remove your Vagrantfile and modify your .kitchen.yml file to include the proxy data you need.

Josh Beauregard
  • 2,498
  • 2
  • 20
  • 37
  • Thank you @Josh Beauregard. I have deleted Vagrantfile and used kitchen-vagrant driver. – bablu Apr 01 '16 at 01:36