Chef Server returns 404 for all knife and chef requests

I am trying to configure chef-server and chef-client to automatically deploy packages on virtual machines running Openstack.

I follow the instructions https://docs.chef.io/install_server.html . The package version is chef-server 12.0.8, on the ubuntu 14.04 server (chef-server-core_12.0.8-1_amd64.deb). Several attempts were made, always with a clean machine and always with the same result, even with a slightly outdated version of the chef server (12.0.3, I think). A user is created, an organization is created. I also pulled the chef client directly from the chef site through the provided install.sh script (12.3.something).

Symptoms

knife ssl check returns success, however:

knife client list returns HTTP 404 error:

ERROR: The object you are looking for was not found ...

404 - not found

Sorry, I can’t find what you are looking for.

It doesn’t matter if I run it from the server directly or from another computer (the bootstrap laptop also fails, so I install it manually). The server (fully qualified domain name: chef.cluster.internal) is resolvable from all machines, and this is server_url used for client.rb / knife.rb. A self-signed certificate is pulled out wherever it is needed.

Nginx access logs from the chef server machine:

 192.168.10.85 - - [15/May/2015:12:16:56 +0000] "GET /clients HTTP/1.1" 404 "0.001" 617 "-" "Chef Knife/12.3.0 (ruby-2.1.4-p265; ohai-8.3.0; x86_64-linux; +http://opscode.com)" "-" "-" "-" "12.3.0" "algorithm=sha1;version=1.0;" "ubuntu" "2015-05-15T12:16:56Z" "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" 995 192.168.10.85 - - [15/May/2015:11:38:50 +0000] "POST /nodes HTTP/1.1" 404 "0.001" 617 "-" "Chef Knife/12.3.0 (ruby-2.1.4-p265; ohai-8.3.0; x86_64-linux; +http://opscode.com)" "-" "-" "-" "12.3.0" "algorithm=sha1;version=1.0;" "ubuntu" "2015-05-15T11:38:50Z" "5FBeTmym0Tm05estESshBGJrumI=" 1047 192.168.10.86 - - [15/May/2015:11:37:36 +0000] "POST /nodes HTTP/1.1" 404 "0.001" 617 "-" "Chef Knife/12.3.0 (ruby-2.1.4-p265; ohai-8.3.0; x86_64-linux; +http://opscode.com)" "-" "-" "-" "12.3.0" "algorithm=sha1;version=1.0;" "ubuntu" "2015-05-15T11:37:36Z" "5FBeTmym0Tm05estESshBGJrumI=" 1047 192.168.10.85 - - [15/May/2015:11:38:50 +0000] "PUT /nodes/dns-server HTTP/1.1" 404 "0.001" 617 "-" "Chef Knife/12.3.0 (ruby-2.1.4-p265; ohai-8.3.0; x86_64-linux; +http://opscode.com)" "-" "-" "-" "12.3.0" "algorithm=sha1;version=1.0;" "ubuntu" "2015-05-15T11:38:50Z" "5FBeTmym0Tm05estESshBGJrumI=" 1057 

... and so on. Thus, the server really receives the request, and the offer of the chef client that my chef_server_url may be invalid is incorrect.

All other settings are left by default. The strange thing is that I have an old chef setting, from two or three months ago, which works without problems.

I have no ideas. Any help would be greatly appreciated and appreciated.

Edit 1: I just imported the created user certificate and the nginx chef certificate to the previous installation of the mentioned knife, and I can successfully run the knife client list . Thus, it seems that the local version includes / organizations / orgname / nodes in the request. Why is this missing on an empty client?

0
chef knife
source share
1 answer

So, I was able to make progress by reconfiguring the knife and chef client on the server with the full chef_server_url created on the old machine.

0
source share

All Articles