# Got 502 error when trying to bootstrip an instance

**URL:** <https://discourse.chef.io/t/got-502-error-when-trying-to-bootstrip-an-instance/12515>\
**Category:** Chef Automate\
**Created:** [January 31, 2018, 9:18pm UTC](https://discourse.chef.io/t/got-502-error-when-trying-to-bootstrip-an-instance/12515 "2018-01-31T21:18:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![condescendent](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@condescendent](https://discourse.chef.io/u/condescendent)\
**Post date:** [January 31, 2018, 9:18pm UTC](https://discourse.chef.io/t/got-502-error-when-trying-to-bootstrip-an-instance/12515/1 "2018-01-31T21:18:31Z")

</div>

Got an error when adding a client on a new chef automate server on aws. We use aws chef automate service.

10.104.0.225 [2018-01-31T19:03:24+00:00] ERROR: Server returned error 502 for [https://chefserver-n6art4jqn7kthxvd.us-east-1.opsworks-cm.io/organizations/default/data-collector](https://chefserver-n6art4jqn7kthxvd.us-east-1.opsworks-cm.io/organizations/default/data-collector), retrying 1/5 in 3s

---

<div class="post-metadata">

**Author:** ![condescendent](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@condescendent](https://discourse.chef.io/u/condescendent)\
**Post date:** [January 31, 2018, 9:19pm UTC](https://discourse.chef.io/t/got-502-error-when-trying-to-bootstrip-an-instance/12515/2 "2018-01-31T21:19:05Z")

</div>

[root@chefworkstation ca\_certs]# knife bootstrap 10.104.0.225 -N [asprodbkd1c.ec2.avery.com](http://asprodbkd1c.ec2.avery.com) -x ec2-user -i /home/jyu/avery123.pem --sudo

---

<div class="post-metadata">

**Author:** ![aman10592](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@aman10592](https://discourse.chef.io/u/aman10592)\
**Post date:** [February 2, 2018, 3:26am UTC](https://discourse.chef.io/t/got-502-error-when-trying-to-bootstrip-an-instance/12515/3 "2018-02-02T03:26:15Z")

</div>

Try to kill the process for nginx which are routing to different port and  
then try.
