# Problem connecting packetbeat to logstash

**URL:** <https://discuss.elastic.co/t/problem-connecting-packetbeat-to-logstash/188426>\
**Category:** Beats\
**Tags:** packetbeat\
**Created:** [July 2, 2019, 2:27am UTC](https://discuss.elastic.co/t/problem-connecting-packetbeat-to-logstash/188426 "2019-07-02T02:27:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![El\_Mahdi\_El\_Korri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/el_mahdi_el_korri/32/48255_2.png) [@El\_Mahdi\_El\_Korri](https://discuss.elastic.co/u/El_Mahdi_El_Korri)\
**Post date:** [July 2, 2019, 2:27am UTC](https://discuss.elastic.co/t/problem-connecting-packetbeat-to-logstash/188426/1 "2019-07-02T02:27:32Z")

</div>

Hi Everyone,

My packetbeat agent won't ship packets to logstash. Could someone give me hint to solve this issue ?

Packetbeat log :

2019-07-02T02:18:24.403Z INFO [monitoring] log/log.go:144 Non-zero metrics in the last 30s {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":760,"time":{"ms":11}},"total":{"ticks":2280,"time":{"ms":39},"value":2280},"user":{"ticks":1520,"time":{"ms":28}}},"handles":{"limit":{"hard":4096,"soft":1024},"open":7},"info":{"ephemeral\_id":"af8fd8a2-49fc-49d6-af15-37ae500e974a","uptime":{"ms":1050161}},"memstats":{"gc\_next":42739424,"memory\_alloc":23677752,"memory\_total":56891272}},"libbeat":{"config":{"module":{"running":0}},"output":{"read":{"errors":1},"write":{"bytes":126}},"pipeline":{"clients":15,"events":{"active":910,"published":11,"retry":1,"total":11}}},"system":{"load":{"1":0.02,"15":0.22,"5":0.22,"norm":{"1":0.02,"15":0.22,"5":0.22}}}}}}  
2019-07-02T02:18:35.891Z ERROR pipeline/output.go:100 Failed to connect to backoff(elasticsearch([http://192.168.31.139:5044](http://192.168.31.139:5044))): Get [http://192.168.31.139:5044](http://192.168.31.139:5044): read tcp 192.168.31.137:34764-\>192.168.31.139:5044: read: connection reset by peer  
2019-07-02T02:18:35.893Z INFO pipeline/output.go:93 Attempting to reconnect to backoff(elasticsearch([http://192.168.31.139:5044](http://192.168.31.139:5044))) with 28 reconnect attempt(s)  
2019-07-02T02:18:35.895Z INFO [publish] pipeline/retry.go:189 retryer: send unwait-signal to consumer  
2019-07-02T02:18:35.896Z INFO [publish] pipeline/retry.go:191 done  
2019-07-02T02:18:35.897Z INFO [publish] pipeline/retry.go:166 retryer: send wait signal to consumer  
2019-07-02T02:18:35.898Z INFO [publish] pipeline/retry.go:168 done

Packetbeat configuration:

#----------------------------- Logstash output --------------------------------  
#output.logstash:  
enabled: true

# The Logstash hosts

hosts: ["192.168.31.139:5044"]  
loadbalance: true

# Optional SSL. By default is off.

# List of root certificates for HTTPS server verifications

#ssl.certificate\_authorities: ["/etc/pki/root/ca.pem"]

# Certificate for SSL client authentication

#ssl.certificate: "/etc/pki/client/cert.pem"

# Client Certificate Key

#ssl.key: "/etc/pki/client/cert.key"

logstash configuration

input {  
beats {  
port =\> 5044  
}  
}

output {  
elasticsearch {  
hosts =\> ["[http://localhost:9200](http://localhost:9200)"]  
index =\> "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"  
}  
}

Best regards,

P.S: I followed up the instruction to create manual template in the documentation

---

<div class="post-metadata">

**Author:** ![leprovokateur](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@leprovokateur](https://discuss.elastic.co/u/leprovokateur)\
**Post date:** [July 17, 2019, 1:14pm UTC](https://discuss.elastic.co/t/problem-connecting-packetbeat-to-logstash/188426/2 "2019-07-17T13:14:59Z")

</div>

You need to get your outouts right:

add "enabled: false" to the elasticsearch stanza and remove the "#" from "#output.logstash:"

Hth,  
Robert

---

<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:** [August 14, 2019, 1:15pm UTC](https://discuss.elastic.co/t/problem-connecting-packetbeat-to-logstash/188426/3 "2019-08-14T13:15:00Z")

</div>

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