# Logstash http poller "\_http\_request\_failure" : The server failed to respond with a valid HTTP response

**URL:** <https://discuss.elastic.co/t/logstash-http-poller-http-request-failure-the-server-failed-to-respond-with-a-valid-http-response/145927>\
**Category:** Logstash\
**Created:** [August 24, 2018, 1:55pm UTC](https://discuss.elastic.co/t/logstash-http-poller-http-request-failure-the-server-failed-to-respond-with-a-valid-http-response/145927 "2018-08-24T13:55:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harish\_Malu](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@Harish\_Malu](https://discuss.elastic.co/u/Harish_Malu)\
**Post date:** [August 24, 2018, 1:55pm UTC](https://discuss.elastic.co/t/logstash-http-poller-http-request-failure-the-server-failed-to-respond-with-a-valid-http-response/145927/1 "2018-08-24T13:55:38Z")

</div>

I have a http page that returns JSON data. If you enter the link in browser, it will just show data in JSON format.

I used this web link in logstash http poller conf. However, execution gives error -  
{  
"@version" =\> "1",  
"tags" =\> [  
[0] "\_http\_request\_failure"  
],  
"http\_request\_failure" =\> {  
"error" =\> "The server failed to respond with a valid HTTP response",  
"request" =\> {  
"headers" =\> {  
"Accept" =\> "application/json"  
},  
"method" =\> "get",  
"url" =\> "http\_link"  
},  
"name" =\> "test1",  
"backtrace" =\> nil,  
"runtime\_seconds" =\> 0.235865  
},  
"@timestamp" =\> 2018-08-24T13:49:00.531Z  
}

CONF -  
input {  
http\_poller {  
urls =\> {  
test1 =\> {  
method =\> get  
url =\> "http\_link"  
headers =\> {  
Accept =\> "application/json"  
}  
}  
}  
schedule =\> { cron =\> "\* \* \* \* \* UTC"}  
"codec" =\> "json\_lines"  
}  
}  
output {  
#elasticsearch {

# "codec" =\> "json"

# "hosts" =\> ["localhost:9200"]

# "index" =\> "lpardata"

#}  
stdout {  
"codec" =\> "rubydebug"  
}  
}

1. I have validated the JSON format and it is valid.
2. curl -X GET http\_link gives the JSON response as I see in the browser.

Please suggest.

Regards,  
Harish

---

<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:** [September 21, 2018, 1:55pm UTC](https://discuss.elastic.co/t/logstash-http-poller-http-request-failure-the-server-failed-to-respond-with-a-valid-http-response/145927/2 "2018-09-21T13:55:40Z")

</div>

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