# Updating Custom HTTP ingestion results in a 504 error

**URL:** <https://discuss.elastic.co/t/updating-custom-http-ingestion-results-in-a-504-error/330879>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 26, 2023, 7:19pm UTC](https://discuss.elastic.co/t/updating-custom-http-ingestion-results-in-a-504-error/330879 "2023-04-26T19:19:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenderson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chenderson/32/120275_2.png) [@chenderson](https://discuss.elastic.co/u/chenderson)\
**Post date:** [April 26, 2023, 7:19pm UTC](https://discuss.elastic.co/t/updating-custom-http-ingestion-results-in-a-504-error/330879/1 "2023-04-26T19:19:40Z")

</div>

I have added an integration to my stack running in Azure Kubernetes using the "Custom HTTP" integration. When I first create the integration everything works as expected and documents are ingested when I send them to the endpoint.

However, if I update the integration configuration (for example changing the url endpoint) and then save the integration it will no longer index documents. - returning a 504 status code instead. Looking through the logs I see the following error message:

```auto
[elastic_agent.filebeat][error] Input 'http_endpoint' failed with: unable to start server due to error: pattern already exists for 0.0.0.0:31335: /user-activity-logger-staging old=http_endpoint-http_endpoint.generic-0b97de64-092f-48b0-a086-ea9aa099c13e new=http_endpoint-http_endpoint.generic-146f5ddf-bdf0-4633-a4d3-ba681d75131a

```

In this example the "new" and "old" patterns are different but I have also observed this error where both the "new" and "old" patterns are the same.

Anyone know how to sort this out? The only way to fix it is to delete the integration and recreate it using a new port number - reusing the same port number results in the error message again.

---

<div class="post-metadata">

**Author:** ![chenderson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chenderson/32/120275_2.png) [@chenderson](https://discuss.elastic.co/u/chenderson)\
**Post date:** [April 27, 2023, 9:46am UTC](https://discuss.elastic.co/t/updating-custom-http-ingestion-results-in-a-504-error/330879/2 "2023-04-27T09:46:27Z")

</div>

Looks like I have found the solution to this problem, at least on Kubernetes. After making a change to the integration it looks like the pods on kubernetes running the agents should be "restarted" - I do this by running the command:

To stop the agents:

```auto
kubectl scale --replicas=0 {name of agent deployment}

```

Then to start them up again:

```auto
kubectl scale --replicas=n {name of agent deployment}

```

Where `n` is the number of agents you want running. Once Fleet updates itself looking in the logs the HTTP endpoint is logged as started.

---

<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:** [May 25, 2023, 11:46am UTC](https://discuss.elastic.co/t/updating-custom-http-ingestion-results-in-a-504-error/330879/3 "2023-05-25T11:46:47Z")

</div>

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