刀实用程序失败 - 404未找到

问题描述 投票:0回答:1

我在redhat 7.3服务器上安装了厨师服务器(12)并运行了chef-server-ctl用户创建的USERNAME FIRST_NAME LAST_NAME EMAIL PASSWORD和chef-server org-create命令,这些命令还生成了所需的pem文件。

然后我安装了chefdk(厨师的输出--version下面)chef --version Chef Development Kit版本:2.4.17 chef-client版本:13.6.4交付版本:master(73ebb72a6c42b3d2ff5370c476be800fee7e5427)berks版本:6.3.1 kitchen version: 1.19.2 inspec版本:1.45.13

继续使用chef generate app chef-repo创建应用程序这创建了chef-repo文件夹及其中的子文件夹。然后我继续创建.chef文件夹并在.chef文件夹下创建了一个knife.rb文件。这是knife.rb文件的内容:

cat .chef / knife.rb

current_dir = File.dirname(__FILE__)
log_level                :debug
log_location             STDOUT
node_name                "daddepalli"
client_key               "#{current_dir}/daddepalli.pem"
validation_client_name   "XXX"
validation_key           "#{current_dir}/XXX.pem"
chef_server_url          "https://rhel73-chef-srv12.XXX.com/organizations/RMT"
syntax_check_cache_path  "#{ENV['HOME']}/.chef/syntaxcache"
cookbook_path            ["#{current_dir}/../cookbooks"]

刀ssl检查成功检查

knife ssl check连接到主机rhel73-chef-srv12.RMT.com:443从`rhel73-chef-srv12.RMT.com'成功验证证书

但是当我运行刀客户端列表时,我收到以下错误:

Response: <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  <title>Chef - 404 Not Found</title>
  <link media="all" rel="stylesheet" type="text/css" href="/css/all.css" />
  <!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="/css/lt7.css" /><![endif]-->
</head>
<body>
  <div class="header-block">
    <div id="header">
      <strong class="logo"><a href="https://www.chef.io">Chef</a></strong>
    </div>
  </div>
  <div id="wrapper">
    <div id="main">
      <div class="mybox">
        <div id="content">
          <h1>404 - Not Found</h1>
          <p>Sorry, I can't find what you are looking for.</p>
        </div>
      </div>
    </div>
  </div>
  <div class="footer-block">
    <div id="footer">
      <div class="mybox">
      </div>
      <div class="footer-bottom">
        <span>&copy; 2010&thinsp;&ndash;&thinsp;2017 Chef Software, Inc. All Rights Reserved</span>
      </div>
    </div>
  </div>
</body>
</html>
chef knife
1个回答
0
投票

好的,我发现了这个问题。问题发生在knife.rb文件中。我创建的组织是rmt,而我在chef_server_url属性中有RMT。一旦我修复了它,它就显示了我的客户列表。

© www.soinside.com 2019 - 2024. All rights reserved.