2016-03-29 72 views
0

我試圖運行vagrant(1.8.1)和virtualbox(5.0)的廚房收斂/ ,在代理服務器後面(它已經使用charles proxy進行配置)。我在運行廚房測試時遇到困難,或者在運行廚房收斂時拒絕連接。我發佈了我的配置和日誌文件,包括錯誤。因爲有代理服務器,所以我使用berkshelf,test-kitchen和proxyconf。流浪SSH連接失敗.....(Errno:ECONNREFUSED - 連接(2)爲127.0.0.1:2200)

任何一個建議可能會丟失什麼,並導致發生此錯誤以及如何解決。感謝您的說明謝謝

配置&日誌文件:

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: 

流浪文件

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 

廚房測試

[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... 

廚房收斂

[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>. 

回答

1

我從未使用過Vagrantfile有廚房,爲kitchen-vagrant driver產生上飛的流浪文件。

我建議您刪除您的Vagrantfile並修改您的.kitchen.yml文件以包含所需的代理數據。

+0

謝謝@Josh Beauregard。我已經刪除了Vagrantfile並使用了廚房 - 流浪者司機。 – bablu