我在我的工作站/本地机器上运行“chef verify”并得到这个错误结果。
mike@mike-pc:/opt/chefdk$ chef verify
Running verification for component 'berkshelf'
Running verification for component 'test-kitchen'
Running verification for component 'tk-policyfile-provisioner'
Running verification for component 'chef-client'
Running verification for component 'chef-dk'
Running verification for component 'chef-provisioning'
Running verification for component 'chefspec'
Running verification for component 'generated-cookbooks-pass-chefspec'
Running verification for component 'rubocop'
Running verification for component 'fauxhai'
Running verification for component 'knife-spork'
Running verification for component 'kitchen-vagrant'
Running verification for component 'package installation'
Running verification for component 'openssl'
Running verification for component 'inspec'
Running verification for component 'delivery-cli'
Running verification for component 'git'
Running verification for component 'opscode-pushy-client'
Running verification for component 'chef-sugar'
...
An error occurred in a `before(:suite)` hook.
Failure/Error: raise InvalidURIError, "Invalid scheme format: #{new_scheme}"
Addressable::URI::InvalidURIError:
Invalid scheme format: 127.0.0.1
# /home/mike-pc/.chefdk/gem/ruby/2.3.0/gems/berkshelf-5.6.4/lib/berkshelf/source.rb:58:in `build_universe'
# /home/mike-pc/.chefdk/gem/ruby/2.3.0/gems/berkshelf-5.6.4/lib/berkshelf/installer.rb:21:in `block (2 levels) in build_universe'
Finished in 0.25155 seconds (files took 1.57 seconds to load)
0 examples, 0 failures
我执行了“kitchen diagnose -all”,发现我有无效的 URI:
instances:
default-centos-72:
platform:
os_type: unix
shell_type: bourne
state_file:
hostname: 127.0.0.1
last_action: create
last_error: Addressable::URI::InvalidURIError
port: '2222'
我该如何解决这个问题?
错误很明显:
Addressable::URI::InvalidURIError:
Invalid scheme format: 127.0.0.1
我认为您在“127.0.0.1”之前缺少“http://”。
我是一名优秀的程序员,十分优秀!