# Getsockopt: connection refused

**URL:** https://discuss.elastic.co/t/getsockopt-connection-refused/102206
**Category:** Beats
**Tags:** filebeat
**Created:** [September 29, 2017, 3:42am UTC](https://discuss.elastic.co/t/getsockopt-connection-refused/102206 "2017-09-29T03:42:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![brw314](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brw314/32/22631_2.png) [@brw314](https://discuss.elastic.co/u/brw314)
#### Post date: [September 29, 2017, 3:42am UTC](https://discuss.elastic.co/t/getsockopt-connection-refused/102206/1 "2017-09-29T03:42:46Z")

</div>

I only have ports 8080,8081,8082 available on this linux sytem.

I get this error(I've also tried other ports):

2017/09/29 02:22:26.347036 single.go:140: ERR Connecting error publishing events (retrying): dial tcp [::1]:8080: getsockopt: connection refused

filebeat.yml:

filebeat.prospectors:

- input\_type: log  
paths:
  - /home/ubuntu/workspace/logfile/logstash-tutorial.log  
output.logstash:  
hosts: ["localhost:8080"]

---

<div class="post-metadata">

### Author: ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)
#### Post date: [September 29, 2017, 8:43am UTC](https://discuss.elastic.co/t/getsockopt-connection-refused/102206/2 "2017-09-29T08:43:00Z")

</div>

Hi @brw314,

Do you see anything in Logstash logs? Also I noticed it says `[::1]:8080`, this could be an IPv6 issue, can you try to write `127.0.0.1:8080` instead?

---

<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 27, 2017, 8:43am UTC](https://discuss.elastic.co/t/getsockopt-connection-refused/102206/3 "2017-10-27T08:43:24Z")

</div>

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