流浪汉问题

时间:2015-08-20 11:29:50

标签: vagrant puppet

我们有一个需要代理才能上网的网络,我有一台本地Mac,我们正在为Drupal开发设置并设置HTTP_PROXYALL_PROXY,一切正常来自我们开发公司的bower,gem和librarian-puppet脚本来安装这些脚本。我现在正在使用他们创建的Vagrantfile来设置一个vagrant(VirtualBox)机器并解决问题。我最初在脚本中遇到了问题,但是已经安装了vagrant-proxyconf并添加了config.proxy.http,https和no_proxy行,现在在出错之前会更进一步:

==> default: Info: Loading facts ==> default: Could not retrieve fact='nodejs_latest_version', resolution='': Connection refused - connect(2) ==> default: Could not retrieve fact='nodejs_stable_version', resolution='': Connection refused - connect(2) ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

The ‘SSH command responded with a non-zero exit status.’ I see a few times in the script execution, but this is the first that stops the script running. If I connect the machine directly to an internet connection the script runs through successfully, but this isn’t a long term solution. I’m not sure if the issue is on the mac or the virtual box, or what file or setting I should be looking at. If anyone can help shed some light where the issue might be, or where I should be looking it would really be appreciated.

调试输出如下所示:

==> default: Info: Loading facts DEBUG ssh: stderr: Could not retrieve fact='nodejs_latest_version', resolution='': Connection refused - connect(2)

INFO interface: info: Could not retrieve fact='nodejs_latest_version', resolution='': Connection refused - connect(2) INFO interface: info: ==> default: Could not retrieve fact='nodejs_latest_version', resolution='': Connection refused - connect(2) ==> default: Could not retrieve fact='nodejs_latest_version', resolution='': Connection refused - connect(2) DEBUG ssh: stderr: Could not retrieve fact='nodejs_stable_version', resolution='': Connection refused - connect(2)

INFO interface: info: Could not retrieve fact='nodejs_stable_version', resolution='': Connection refused - connect(2) INFO interface: info: ==> default: Could not retrieve fact='nodejs_stable_version', resolution='': Connection refused - connect(2) ==> default: Could not retrieve fact='nodejs_stable_version', resolution='': Connection refused - connect(2) DEBUG ssh: stderr: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev

INFO interface: info: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev INFO interface: info: ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev DEBUG ssh: stderr: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev

INFO interface: info: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev INFO interface: info: ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev DEBUG ssh: Exit status: 1 ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Calling recover: # INFO warden: Beginning recovery process... INFO warden: Calling recover: # INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Calling recover: # INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Calling recover: # INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO environment: Released process lock: machine-action-d3538fe6302dd66edcdb4c05283597a6 INFO environment: Running hook: environment_unload INFO runner: Preparing hooks for middleware sequence... INFO runner: 2 hooks defined. INFO runner: Running action: environment_unload # ERROR vagrant: Vagrant experienced an error! Details: ERROR vagrant: # ERROR vagrant: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. ERROR vagrant: /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/communicators/ssh/communicator.rb:236:in execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/communicators/ssh/communicator.rb:246:insudo' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/provisioners/puppet/provisioner/puppet.rb:251:in run_puppet_apply'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/provisioners/puppet/provisioner/puppet.rb:124:inprovision' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:133:in run_provisioner'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:inbusy' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:428:inhook' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:121:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:121:inblock in call' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:103:in each'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:103:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/check_accessible.rb:18:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:inblock in finalize_action' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:inblock in run' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:inrun' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:inbusy' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/config_validate.rb:25:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:inbusy' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:214:inaction_raw' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:191:in block in action'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:516:inlock' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:inaction' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/commands/provision/command.rb:30:in block in execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:226:inblock in with_target_vms' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:in each'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:inwith_target_vms' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/commands/provision/command.rb:29:in execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/cli.rb:42:inexecute' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:301:in cli'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/bin/vagrant:174:in' INFO interface: error: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO interface: Machine: error-exit ["Vagrant::Errors::VagrantError", "The SSH command responded with a non-zero exit status. Vagrant\nassumes that this means the command failed. The output for this command\nshould be in the log above. Please read the output to determine what\nwent wrong."]

0 个答案:

没有答案