chef - knife utility fails - 404 not found



I have chef server (12) installed on a redhat 7.3 server and ran the chef-server-ctl user-create USERNAME FIRST_NAME LAST_NAME EMAIL PASSWORD and chef-server org-create commands, which also generated the required pem files.

I then installed the chefdk (output of chef --version below) chef --version Chef Development Kit Version: 2.4.17 chef-client version: 13.6.4 delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427) berks version: 6.3.1 kitchen version: 1.19.2 inspec version: 1.45.13

Went on to create an app using chef generate app chef-repo This created the chef-repo folder and the sub-folders in it. I then went ahead and created the .chef folder and created a knife.rb file under the .chef folder Here are the contents of the knife.rb file:

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          ""
syntax_check_cache_path  "#{ENV['HOME']}/.chef/syntaxcache"
cookbook_path            ["#{current_dir}/../cookbooks"]

knife ssl check checks out successfully

knife ssl check Connecting to host Successfully verified certificates from `'

but when I run knife client list, I get the following error:

Response: <!DOCTYPE html>
<html xmlns="">
  <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="" />
  <!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="" /><![endif]-->
  <div class="header-block">
    <div id="header">
      <strong class="logo"><a href="">Chef</a></strong>
  <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 class="footer-block">
    <div id="footer">
      <div class="mybox">
      <div class="footer-bottom">
        <span>&copy; 2010&thinsp;&ndash;&thinsp;2017 Chef Software, Inc. All Rights Reserved</span>

1 Answer: 

ok I found the issue. the issue was in the knife.rb file. the organization I created was rmt while I had RMT in the chef_server_url attribute. Once I fixed that, it showed my client list.