# Logstash.conf error "Cannot get new connection from pool"

**URL:** <https://discuss.elastic.co/t/logstash-conf-error-cannot-get-new-connection-from-pool/62357>\
**Category:** Logstash\
**Created:** [October 6, 2016, 9:20am UTC](https://discuss.elastic.co/t/logstash-conf-error-cannot-get-new-connection-from-pool/62357 "2016-10-06T09:20:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lduriez](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@lduriez](https://discuss.elastic.co/u/lduriez)\
**Post date:** [October 6, 2016, 9:20am UTC](https://discuss.elastic.co/t/logstash-conf-error-cannot-get-new-connection-from-pool/62357/1 "2016-10-06T09:20:59Z")

</div>

Hi,

I'm trying to parse a log file with logstash to put it in an elasticsearch database, but I have the following error:  
Elasticsearch::Transport::Transport::Error: Cannot get new connection from pool.

I'm using elasticsearch 2.4.0 and logstash 2.4.0

This is a line example of my log file:  
`[Wed Oct 05 18:01:10 CEST 2016] [IP:109.7.92.64] [ID:spersyn_] [TICKET:ST-66537-ZP7ClBVOTMW4ffq3CRCD-cas.univ-valenciennes.fr] [SERVICE:https://portail.univ-valenciennes.fr/Login] [USER-AGENT:Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0]`

This is my logstash conf file:

> input {  
> stdin { }  
> }  
> filter {  
> grok {  
> match =\> ["message", "[%{DATA:requestdate}] [IP:%{IPORHOST:clientip}] [ID: {0,10}%{NOTSPACE:uid} {0,10}] [TICKET:%{NOTSPACE}] [SERVICE:%{DATA:[service][request]}] [USER-AGENT:%{DATA:[agent]}]" ]  
> }  
> grok {  
> match =\> ["message", "[%{DATA}] [IP:%{IPORHOST}] [ID: {0,10}%{NOTSPACE} {0,10}] [TICKET:%{NOTSPACE}] [SERVICE:%{URIPROTO:[service][proto]}://(?:%{USER:[service][user]}(?::[^@]\*)?@)?(?:%{URIHOST:[service][host]}$  
> }  
> if "\_grokparsefailure" not in [tags] {  
> if [uid] =~ /^http.?😕 {  
> mutate {  
> add\_field =\> { "not\_user" =\> "%{uid}" }  
> }  
> } else {  
> mutate {  
> lowercase =\> ["uid"]  
> }  
> elasticsearch {  
> hosts =\> ["agimus1", "agimus2", "agimus3"]  
> query =\> "\_type:ldap AND \_id:%{uid}"  
> sort =\> ""  
> fields =\> {  
> 'eduPersonPrimaryAffiliation' =\> 'eduPersonPrimaryAffiliation'  
> 'supannEtuCursusAnnee' =\> 'supannEtuCursusAnnee'  
> 'supannEtuSecteurDisciplianire' =\> 'supannEtuSecteurDisciplianire'  
> 'supannAffectation' =\> 'supannAffectation'  
> }  
> }  
> }  
> }  
> }  
> output {  
> }

If you have any solution can you share it to me?

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 7, 2016, 3:29am UTC](https://discuss.elastic.co/t/logstash-conf-error-cannot-get-new-connection-from-pool/62357/2 "2016-10-07T03:29:48Z")

</div>

> [@lduriez](#):
>
> elasticsearch 5.5.2

There is no such version, perhaps you can check again?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 7, 2016, 5:33am UTC](https://discuss.elastic.co/t/logstash-conf-error-cannot-get-new-connection-from-pool/62357/3 "2016-10-07T05:33:43Z")

</div>

Please also add the full error message you're getting. It looks like you forgot to paste it into your post.

---

<div class="post-metadata">

**Author:** ![lduriez](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@lduriez](https://discuss.elastic.co/u/lduriez)\
**Post date:** [October 7, 2016, 6:17am UTC](https://discuss.elastic.co/t/logstash-conf-error-cannot-get-new-connection-from-pool/62357/4 "2016-10-07T06:17:40Z")

</div>

Indeed, I that was the lucene version sorry.

My elasticsearch version is 2.4.0

---

<div class="post-metadata">

**Author:** ![lduriez](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@lduriez](https://discuss.elastic.co/u/lduriez)\
**Post date:** [October 7, 2016, 6:20am UTC](https://discuss.elastic.co/t/logstash-conf-error-cannot-get-new-connection-from-pool/62357/5 "2016-10-07T06:20:37Z")

</div>

Oh, sorry for the error message.

I pasted it well but I kept "\<" and "\>" symboles wich did that the message doesn't appear.

I corrected it, and this is the following error message :  
Elasticsearch::Transport::Transport::Error: Cannot get new connection from pool.

---

<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:** [July 6, 2017, 4:35am UTC](https://discuss.elastic.co/t/logstash-conf-error-cannot-get-new-connection-from-pool/62357/6 "2017-07-06T04:35:18Z")

</div>


