HTML error when doing knife cookbook upload

I was going through the learn.chef.io tutorials for uploading a cookbook to chef server and I got stuck on the following command:

knife cookbook upload learn_chef_iis

everything up until this point I have managed to figure out and google, but iā€™m getting a weird HTML error when I run that command on my work station. For reference, my work station is a windows 10 machine and the chef server is an ubuntu 16.04 machine that I have spun up in AWS.

The error I am getting is as follows:

ERROR: The object you are looking for could not be found
Response:

Chef - 404 Not Found

404 - Not Found

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

Ā© 2010ā€‰ā€“ā€‰2017 Chef Software, Inc. All Rights Reserved

has anyone come across this before and know how to deal with it? As I said earlier, I have managed to do and verify everything else in the tutorial so far. Any help is greatly appreciated.

1 Like

I have been running into the exact same issue. I have checked and double checked the chef server url (That is what i have found to be the most common problem for others) and I used that url to preform ssl fetch's so it should still work i would think. Did you ever find a solution to this problem?

Hi there, you've got an 404 error each time trying to operate via knife?
Also we are talking about manage.chef.io or you'r own chef server?

I only get the issue running the command "Knife cookbook upload 'cookbookName'" uploading a cookbook from my workstation to my chef ubuntu server.

Clear) I guess that problem is in chef server url that can't be resolved in case of virtual machine private network type. I'll recommend you to use ip address instead of url in you knife.rb file. Also don't forget to cleanup trusted_certs directory and set ssl verify mode to none.

Example:
In ~/.chef/knife.rb

...
chef_server_url      "https://192.168.10.10/organizations/[YOU_ORG_NAME]"
ssl_verify_mode      :verify_none
...

Hope it'l help you :slight_smile:

Note!
It's not a good practice to disable ssl verification, use it only for sandbox environment, local testing, etc.

Alas - Those are already steps I have taken.

Ok. Let's start from scratch. Could you ping you Chef Server from workstation?