# Cant send logs via Filebeat using Reverse proxy endpoint for Elasticsearch server

**URL:** https://discuss.elastic.co/t/cant-send-logs-via-filebeat-using-reverse-proxy-endpoint-for-elasticsearch-server/233922
**Category:** Beats
**Tags:** filebeat
**Created:** [May 22, 2020, 3:18pm UTC](https://discuss.elastic.co/t/cant-send-logs-via-filebeat-using-reverse-proxy-endpoint-for-elasticsearch-server/233922 "2020-05-22T15:18:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![aparasxidis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aparasxidis/32/46385_2.png) [@aparasxidis](https://discuss.elastic.co/u/aparasxidis)
#### Post date: [May 22, 2020, 3:18pm UTC](https://discuss.elastic.co/t/cant-send-logs-via-filebeat-using-reverse-proxy-endpoint-for-elasticsearch-server/233922/1 "2020-05-22T15:18:44Z")

</div>

Hi, I'm running Filebeat on a EC2 machine as a docker container and configured to get logs from a Jenkins container, the Elasticsearch server is on another EC2 machine behind a reverse proxy (nginx), I can curl to the Elasticsearch using the URL or IP from the Filebeat machine, this is my filebeat.yml

```auto
filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /var/jenkins_home/logs/*.log.*
  multiline.pattern: '^[A-Z]{1}[a-z]{2} {1,2}[0-9]{1,2}, [0-9]{4} {1,2}[0-9]{1,2}:[0-9]{2}:[0-9]{2}'
  multiline.negate: true
  multiline.match: after

output.elasticsearch:
  hosts: ["http://xxxxx.xxxxx.com/elastic"]
  username: elastic
  password: somepassword
  timeout: 120

  path: "/elastic"
  proxy_url: http://xxxxxx.xxxxx.com

```

I don't know how to configure the host field, should I use the URL or IP, or what/how to specify in the proxy\_url field, right now my elastic is reachable from:  
URL  
**[http://xxxxx.xxxxx.com/elastic](http://xxxxx.xxxxx.com/elastic)**  
**[http://xxxxx.xxxxx.com/9200](http://xxxxx.xxxxx.com/9200)**

IP  
**[http://xx.xxx.xxx.xxx/elastic](http://xx.xxx.xxx.xxx/elastic)**  
**[http://xx.xxx.xxx.xxx/9200](http://xx.xxx.xxx.xxx/9200)**

This is the error I'm getting in the logs from Filebeat:

```auto
ERROR pipeline/output.go:100 Failed to connect to backoff(elasticsearch(http://xx.xxx.xxx.xxx:9200/elastic)): Get http://xx.xxx.xxx.xxx:9200/elastic: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
```

---

<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: [June 19, 2020, 5:20pm UTC](https://discuss.elastic.co/t/cant-send-logs-via-filebeat-using-reverse-proxy-endpoint-for-elasticsearch-server/233922/2 "2020-06-19T17:20:55Z")

</div>

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