# "Could not fetch URL" while using http output plugin

**URL:** <https://discuss.elastic.co/t/could-not-fetch-url-while-using-http-output-plugin/98414>\
**Category:** Logstash\
**Created:** [August 25, 2017, 8:06pm UTC](https://discuss.elastic.co/t/could-not-fetch-url-while-using-http-output-plugin/98414 "2017-08-25T20:06:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajesh](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@rajesh](https://discuss.elastic.co/u/rajesh)\
**Post date:** [August 25, 2017, 8:06pm UTC](https://discuss.elastic.co/t/could-not-fetch-url-while-using-http-output-plugin/98414/1 "2017-08-25T20:06:18Z")

</div>

Hi..

I am using http output plugin in logstash and the error am getting is,

```
 ERROR logstash.outputs.http - [HTTP Output Failure] Could not fetch URL {:url=>"http://xxx.xx.xx:xxx"
name=memoryStats.numBytesAllocated origin=p-redis unit=count value=671040 \",\"type\":\"syslog\",\"tags\":[\"_grokparsefailure\"]}", :headers=>{"Content-Type"=>"application/json"}, :message=>"Read timed out", :class=>"Manticore::SocketTimeout", :backtrace=>nil, :will_retry=>true}
14:53:13.875 [pool-684-thread-1] INFO logstash.outputs.http - Retrying http request, will sleep for 0 seconds

```

And the weird thing is, it happens only sometimes. Can someone shed light on this?

Thanks in advance..

---

<div class="post-metadata">

**Author:** ![rajesh](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@rajesh](https://discuss.elastic.co/u/rajesh)\
**Post date:** [August 31, 2017, 2:32pm UTC](https://discuss.elastic.co/t/could-not-fetch-url-while-using-http-output-plugin/98414/2 "2017-08-31T14:32:03Z")

</div>

Hi, Can someone please help on this issue?

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [September 4, 2017, 2:05pm UTC](https://discuss.elastic.co/t/could-not-fetch-url-while-using-http-output-plugin/98414/3 "2017-09-04T14:05:21Z")

</div>

The error is not fatal because `will_retry` is set to true. So, occasionally, the request to your endpoint times out but it tries again and succeeds.

You should monitor this and examine the network and endpoint responsiveness if it happens too often for comfort.

---

<div class="post-metadata">

**Author:** ![rajesh](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@rajesh](https://discuss.elastic.co/u/rajesh)\
**Post date:** [September 4, 2017, 2:21pm UTC](https://discuss.elastic.co/t/could-not-fetch-url-while-using-http-output-plugin/98414/4 "2017-09-04T14:21:19Z")

</div>

Thanks Guy for you reply.

It happens too often and after some time I don't see this issue. Is it a problem with Logstash HTTP plugin or my network? If it retries, there would definitely be a lag for indexing. And also can you please confirm there wouldn't be any data loss? What would be the alternative for this? Please help me with all the questions I have.

Thank you

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [September 5, 2017, 1:21pm UTC](https://discuss.elastic.co/t/could-not-fetch-url-while-using-http-output-plugin/98414/5 "2017-09-05T13:21:22Z")

</div>

> [@rajesh](#):
>
> 14:53:13.875 [pool-684-thread-1] INFO logstash.outputs.http - Retrying http request, will sleep for 0 seconds

The output tells what the lag might be. The code uses a power 2 curve to determine the sleep time to a max of 60 seconds.

Its probably your network.

There **may** be data loss. You should test. Run your http endpoint with a file input that reads a large number of lines, say, 10 or 100 million. While LS is running, pause the http endpoint in some way or maybe use a simple http db service like riak. Count the documents in riak.

---

<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:** [October 3, 2017, 1:21pm UTC](https://discuss.elastic.co/t/could-not-fetch-url-while-using-http-output-plugin/98414/6 "2017-10-03T13:21:58Z")

</div>

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