# Chef- server setup -not working properly

**URL:** <https://discourse.chef.io/t/chef-server-setup-not-working-properly/5402>\
**Category:** Chef Infra (archive)\
**Created:** [June 2, 2014, 9:05am UTC](https://discourse.chef.io/t/chef-server-setup-not-working-properly/5402 "2014-06-02T09:05:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Indra\_k](https://avatars.discourse-cdn.com/v4/letter/i/c89c15/32.png) [@Indra\_k](https://discourse.chef.io/u/Indra_k)\
**Post date:** [June 2, 2014, 9:05am UTC](https://discourse.chef.io/t/chef-server-setup-not-working-properly/5402/1 "2014-06-02T09:05:39Z")

</div>

Hi,

```
     I am using open source chef server,for a past few days my server setup is not working it shows error when i use knife commnand like this:

```

ERROR: Server returned error for [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 1/5 in 4s  
ERROR: Server returned error for [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 2/5 in 6s  
ERROR: Server returned error for [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 3/5 in 10s  
ERROR: Server returned error for [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 4/5 in 17s  
ERROR: Server returned error for [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 5/5 in 62s  
ERROR: bad gateway  
Response:

502 Bad Gateway
# 502 Bad Gateway

* * *
nginx/1.4.4

As i ve checked it shows some of a chef-server-ctl services are down so again i up that and use it again services goes down also beam and epmd files are deleting automatically .So i change a instance and put a new server setup ,it works first but after one day again showing a same error,but all services are up only.

So where is the problem,instance or server setup ?anybody ve ideas?

Thanks,  
Indra

---

<div class="post-metadata">

**Author:** ![Sivakumar\_Gopalan](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sivakumar\_Gopalan](https://discourse.chef.io/u/Sivakumar_Gopalan)\
**Post date:** [June 2, 2014, 10:22am UTC](https://discourse.chef.io/t/chef-server-setup-not-working-properly/5402/2 "2014-06-02T10:22:57Z")

</div>

```
      I am using open source chef server,for a past few days my server

```

> setup is not working it shows error when i use knife commnand like this:
> 
> ERROR: Server returned error for  
> [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 1/5  
> in 4s  
> ERROR: Server returned error for  
> [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 2/5  
> in 6s  
> ERROR: Server returned error for  
> [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 3/5  
> in 10s  
> ERROR: Server returned error for  
> [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 4/5  
> in 17s  
> ERROR: Server returned error for  
> [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 5/5  
> in 62s  
> ERROR: bad gateway

It looks like there is something wrong with the configuration. Do you have  
a domain [example.com](http://example.com) in your local network ? If not then you need to check  
if you have given a right FDQN [1] for your chef server.

[1] [About fully qualified domain names (FQDNs)](http://kb.iu.edu/data/aiuv.html)

Rgds,  
Siva.

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [June 2, 2014, 3:37pm UTC](https://discourse.chef.io/t/chef-server-setup-not-working-properly/5402/3 "2014-06-02T15:37:45Z")

</div>

On Monday, June 2, 2014 at 3:22 AM, Sivakumar Gopalan wrote:

> > I am using open source chef server,for a past few days my server setup is not working it shows error when i use knife commnand like this:
> > 
> > ERROR: Server returned error for [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 1/5 in 4s  
> > ERROR: Server returned error for [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 2/5 in 6s  
> > ERROR: Server returned error for [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 3/5 in 10s  
> > ERROR: Server returned error for [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 4/5 in 17s  
> > ERROR: Server returned error for [https://mychefserver.example.com/cookbooks?num\_versions=all](https://mychefserver.example.com/cookbooks?num_versions=all), retrying 5/5 in 62s  
> > ERROR: bad gateway
> 
> It looks like there is something wrong with the configuration. Do you have a domain [example.com](http://example.com) ([http://example.com](http://example.com)) in your local network ? If not then you need to check if you have given a right FDQN [1] for your chef server.
> 
> [1] [About fully qualified domain names (FQDNs)](http://kb.iu.edu/data/aiuv.html)
> 
> Rgds,  
> Siva.

run `chef-server-ctl tail` to view the server error logs which should have more information. Are you running any automated processes (like chef-client) on the server that could be modifying the server configuration?

--  
Daniel DeLeo
