# Getting 502 bad gateway error while creating new index

**URL:** <https://discuss.elastic.co/t/getting-502-bad-gateway-error-while-creating-new-index/295183>\
**Category:** Elasticsearch\
**Created:** [January 24, 2022, 7:15am UTC](https://discuss.elastic.co/t/getting-502-bad-gateway-error-while-creating-new-index/295183 "2022-01-24T07:15:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikhil\_Sonkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikhil_sonkar/32/100760_2.png) [@Nikhil\_Sonkar](https://discuss.elastic.co/u/Nikhil_Sonkar)\
**Post date:** [January 24, 2022, 7:15am UTC](https://discuss.elastic.co/t/getting-502-bad-gateway-error-while-creating-new-index/295183/1 "2022-01-24T07:15:46Z")

</div>

502 Bad Gateway

# 502 Bad Gateway

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 24, 2022, 7:33am UTC](https://discuss.elastic.co/t/getting-502-bad-gateway-error-while-creating-new-index/295183/2 "2022-01-24T07:33:10Z")

</div>

What are your Elasticsearch logs?  
Is there a proxy?  
What exact request are you sending?  
How?

---

<div class="post-metadata">

**Author:** ![Nikhil\_Sonkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikhil_sonkar/32/100760_2.png) [@Nikhil\_Sonkar](https://discuss.elastic.co/u/Nikhil_Sonkar)\
**Post date:** [January 24, 2022, 7:58am UTC](https://discuss.elastic.co/t/getting-502-bad-gateway-error-while-creating-new-index/295183/3 "2022-01-24T07:58:45Z")

</div>

i am sending request from terminal using curl. here is the command:

```auto
curl -X PUT " ****ES_URL***" -H 'Content-Type: application/json' -d '{
   "settings":{
      "analysis":{
         "analyzer":{
            "my_email_analyzer":{
               "filter":[
                  "lowercase",
                  "stop"
               ],
               "type":"custom",
               "tokenizer":"uax_url_email"
            }
         }
      }
   },
   "mappings":{
      "properties":{
         "NewEducation":{
            "properties":{
               "degree":{
                  "properties":{
                     "id":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     },
                     "title":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     }
                  }
               },
               "gradDate":{
                  "properties":{
                     "mo":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     },
                     "yr":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     }
                  }
               },
               "institute":{
                  "properties":{
                     "id":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     },
                     "title":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     }
                  }
               },
               "marks":{
                  "properties":{
                     "type":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     },
                     "value":{
                        "type":"long"
                     }
                  }
               },
               "specialization":{
                  "properties":{
                     "id":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     },
                     "title":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     }
                  }
               }
            }
         },
         "completeness":{
            "type":"long"
         },
         "createdAt":{
            "type":"date"
         },
         "ctcCurrent":{
            "type":"long"
         },
         "ctcExpected":{
            "type":"long"
         },
         "currentCompany":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "currentDesignation":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "customer":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "daysToJoin":{
            "type":"long"
         },
         "email":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "experience":{
            "properties":{
               "month":{
                  "type":"long"
               },
               "year":{
                  "type":"long"
               }
            }
         },
         "externalProfileLinks":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "fullName":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "gender":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "id":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "jobTags":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "keySkills":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "location":{
            "properties":{
               "createdAt":{
                  "type":"date"
               },
               "customerDefined":{
                  "type":"boolean"
               },
               "gPlace":{
                  "properties":{
                     "address_components":{
                        "properties":{
                           "long_name":{
                              "type":"text",
                              "fields":{
                                 "keyword":{
                                    "type":"keyword",
                                    "ignore_above":256
                                 }
                              }
                           },
                           "short_name":{
                              "type":"text",
                              "fields":{
                                 "keyword":{
                                    "type":"keyword",
                                    "ignore_above":256
                                 }
                              }
                           },
                           "types":{
                              "type":"text",
                              "fields":{
                                 "keyword":{
                                    "type":"keyword",
                                    "ignore_above":256
                                 }
                              }
                           }
                        }
                     },
                     "adr_address":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     },
                     "formatted_address":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     },
                     "geometry":{
                        "properties":{
                           "location":{
                              "properties":{
                                 "lat":{
                                    "type":"float"
                                 },
                                 "lon":{
                                    "type":"float"
                                 }
                              }
                           },
                           "viewport":{
                              "properties":{
                                 "northeast":{
                                    "properties":{
                                       "lat":{
                                          "type":"float"
                                       },
                                       "lng":{
                                          "type":"float"
                                       }
                                    }
                                 },
                                 "southwest":{
                                    "properties":{
                                       "lat":{
                                          "type":"float"
                                       },
                                       "lng":{
                                          "type":"float"
                                       }
                                    }
                                 }
                              }
                           }
                        }
                     },
                     "place_id":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     }
                  }
               },
               "id":{
                  "type":"text",
                  "fields":{
                     "keyword":{
                        "type":"keyword",
                        "ignore_above":256
                     }
                  }
               },
               "searchText":{
                  "type":"text",
                  "fields":{
                     "keyword":{
                        "type":"keyword",
                        "ignore_above":256
                     }
                  }
               },
               "updatedAt":{
                  "type":"date"
               }
            }
         },
         "maritalStatus":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "phone":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "preferredLocation":{
            "properties":{
               "createdAt":{
                  "type":"date"
               },
               "customerDefined":{
                  "type":"boolean"
               },
               "gPlace":{
                  "properties":{
                     "address_components":{
                        "properties":{
                           "long_name":{
                              "type":"text",
                              "fields":{
                                 "keyword":{
                                    "type":"keyword",
                                    "ignore_above":256
                                 }
                              }
                           },
                           "short_name":{
                              "type":"text",
                              "fields":{
                                 "keyword":{
                                    "type":"keyword",
                                    "ignore_above":256
                                 }
                              }
                           },
                           "types":{
                              "type":"text",
                              "fields":{
                                 "keyword":{
                                    "type":"keyword",
                                    "ignore_above":256
                                 }
                              }
                           }
                        }
                     },
                     "adr_address":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     },
                     "formatted_address":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     },
                     "geometry":{
                        "properties":{
                           "location":{
                              "properties":{
                                 "lat":{
                                    "type":"float"
                                 },
                                 "lon":{
                                    "type":"float"
                                 }
                              }
                           },
                           "viewport":{
                              "properties":{
                                 "northeast":{
                                    "properties":{
                                       "lat":{
                                          "type":"float"
                                       },
                                       "lng":{
                                          "type":"float"
                                       }
                                    }
                                 },
                                 "southwest":{
                                    "properties":{
                                       "lat":{
                                          "type":"float"
                                       },
                                       "lng":{
                                          "type":"float"
                                       }
                                    }
                                 }
                              }
                           }
                        }
                     },
                     "place_id":{
                        "type":"text",
                        "fields":{
                           "keyword":{
                              "type":"keyword",
                              "ignore_above":256
                           }
                        }
                     }
                  }
               },
               "id":{
                  "type":"text",
                  "fields":{
                     "keyword":{
                        "type":"keyword",
                        "ignore_above":256
                     }
                  }
               },
               "searchText":{
                  "type":"text",
                  "fields":{
                     "keyword":{
                        "type":"keyword",
                        "ignore_above":256
                     }
                  }
               },
               "updatedAt":{
                  "type":"date"
               }
            }
         },
         "recruiter":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "relationship":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "resume":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "resumeTitle":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "source":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "systemTags":{
            "properties":{
               "dateOn":{
                  "type":"date"
               },
               "status":{
                  "type":"text",
                  "fields":{
                     "keyword":{
                        "type":"keyword",
                        "ignore_above":256
                     }
                  }
               }
            }
         },
         "tags":{
            "type":"text",
            "fields":{
               "keyword":{
                  "type":"keyword",
                  "ignore_above":256
               }
            }
         },
         "updatedAt":{
            "type":"date"
         }
      }
   }
}'

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 24, 2022, 8:23am UTC](https://discuss.elastic.co/t/getting-502-bad-gateway-error-while-creating-new-index/295183/4 "2022-01-24T08:23:54Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
Please update your post.

Also please answer the other questions.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 21, 2022, 8:24am UTC](https://discuss.elastic.co/t/getting-502-bad-gateway-error-while-creating-new-index/295183/5 "2022-02-21T08:24:31Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
