# Faraday::ConnectionFailed

**URL:** <https://discuss.elastic.co/t/faraday-connectionfailed/174082>\
**Category:** Logstash\
**Created:** [March 27, 2019, 10:03am UTC](https://discuss.elastic.co/t/faraday-connectionfailed/174082 "2019-03-27T10:03:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhaval.kathiriya](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dhaval.kathiriya](https://discuss.elastic.co/u/dhaval.kathiriya)\
**Post date:** [March 27, 2019, 10:03am UTC](https://discuss.elastic.co/t/faraday-connectionfailed/174082/1 "2019-03-27T10:03:15Z")

</div>

Hello,

I have using LS filter for fire query with ES and get matched record from ES.

but i have getting this error

[2019-03-27T15:10:29,993][WARN][logstash.filters.elasticsearch] Failed to query elasticsearch for previous event {:index=\>"test\_index", :query=\>{"query"=\>{"query\_string"=\>{"query"=\>"idUser:1 AND (currentData:\>='0' OR currentData:\>=0)"}}, "size"=\>1, "sort"=\>[{"@timestamp"=\>"desc"}]}, :event=\>#\<LogStash::Event:0x53ff2293\>, :error=\>#\<Faraday::ConnectionFailed\>}

so i can not understood why i got Faraday::ConnectionFailed error.

My LS configuration is here:

if ([fields][log\_type] == "test\_index") {  
elasticsearch {  
hosts =\> ["[http://192.168.0.203:9200](http://192.168.0.203:9200)"]  
index =\> "test\_index"  
query =\> "unique\_id:%{[unique\_id]}"  
fields =\> {  
"currentData" =\> "PreviousData"  
"@timestamp" =\> "lastTimeStamp"  
}  
}  
ruby {  
code =\> 'event.set("UsedData", ((event.get("currentData").to\_i)-(event.get("PreviousData").to\_i)))'  
}  
if [WMExpon] == "FF" {  
mutate {  
replace =\> {  
"[type]" =\> "test\_index"  
"currentData" =\> "-1"  
}  
add\_field =\> {  
"Status" =\> 0  
}  
strip =\> ["ReadTime"]  
}  
} else {  
mutate {  
replace =\> {  
"[type]" =\> "test\_index"  
}  
add\_field =\> {  
"Status" =\> 0  
}  
strip =\> ["ReadTime"]  
}  
}  
fingerprint {  
source =\> ["ReadDate", "ReadTime", "idUser"]  
target =\> "[@metadata][fingerprint]"  
method =\> "MURMUR3"  
concatenate\_sources =\> true  
}  
}

i have read log data using Filebeat and put records into ES using LS.

can anyone help me why i getting this errors.

---

<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:** [April 24, 2019, 10:03am UTC](https://discuss.elastic.co/t/faraday-connectionfailed/174082/2 "2019-04-24T10:03:17Z")

</div>

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