For some reason in my organization we can't directly use the FQDN of the Chef server. All requests to it should be re-routed. Hence we have to do below setting inside the /etc/opscode/chef-server.rb file.
api_fqdn "<some_other_ip>"
This worked fine until one day, no cookbooks could be uploaded on one of the Chef servers, yet all other knife commands like 'knife ssl check', 'knife ssl fetch' or 'knife cookbook list' could be successfully run.
Checked the chef-server.rb file and found two additional lines.
bookshelf['vip'] = "https://<some_other_ip>:443"
bookshelf['external_url'] = "https://<some_other_ip>:443"
Bookshelf is an Amazon Simple Storage Service (S3)-compatible service used by Chef to store cookbooks. Some developer might did this for experimenting. The resulted exception is as below.
Uploading <some_cookbook> [0.10.12]
ERROR: Server returned error 500 for https://<some_other_ip>/organizations/cobalt/sandboxes/6d8079e5b8c3bfcbf24b9fcc88020bd2, retrying 1/5 in 3s
ERROR: Server returned error 500 for https://<some_other_ip>/organizations/cobalt/sandboxes/6d8079e5b8c3bfcbf24b9fcc88020bd2, retrying 2/5 in 8s
ERROR: Server returned error 500 for https://<some_other_ip/organizations/cobalt/sandboxes/6d8079e5b8c3bfcbf24b9fcc88020bd2, retrying 3/5 in 9s
ERROR: Server returned error 500 for https://<some_other_ip>/organizations/cobalt/sandboxes/6d8079e5b8c3bfcbf24b9fcc88020bd2, retrying 4/5 in 27s
ERROR: Server returned error 500 for https://<some_other_ip>/organizations/cobalt/sandboxes/6d8079e5b8c3bfcbf24b9fcc88020bd2, retrying 5/5 in 51s
ERROR: internal server error
Response: internal service error
Not sure how this could affect as the settings are documented on Chef and there are such records on StackOverflow (see the accepted answer) also.
The Chef servers (12.2) are hosted by respective docker containers.