# Heartbeat not able to connect the HTTP Endpoint via Proxy

**URL:** <https://discuss.elastic.co/t/heartbeat-not-able-to-connect-the-http-endpoint-via-proxy/246393>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [August 26, 2020, 6:34am UTC](https://discuss.elastic.co/t/heartbeat-not-able-to-connect-the-http-endpoint-via-proxy/246393 "2020-08-26T06:34:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rakesh15](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@rakesh15](https://discuss.elastic.co/u/rakesh15)\
**Post date:** [August 26, 2020, 6:34am UTC](https://discuss.elastic.co/t/heartbeat-not-able-to-connect-the-http-endpoint-via-proxy/246393/1 "2020-08-26T06:34:31Z")

</div>

Hi All,

Im try to configure the heartbeat to monitor the up time for endpoint. Below is the configuration for the same.

```auto
- type: http
  name: JocataHealthCheck
  schedule: '@every 60s'
  urls: ["https://SomeURL/rest/jocata/v1.0/healthCheck"]
  timeout: 60s
  proxy_url: 'http://<<IP>>:<<PORT>>'
  check.request:
    method: GET
    headers:
      content-type : 'application/json'
      Authorization : 'Basic MTNlMzkxNzY6am9jYXRhdWF0'
  check.response:
    status: 200

```

Upon starting heartbeat I'm getting the following error for the endpoint.

```auto
Get https://SomeURL/rest/jocata/v1.0/healthCheck: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

```

I'm able to access the using the below curl request

```auto
 curl -kv https://SomeURL/rest/jocata/v1.0/healthCheck --proxy <<IP>>:<<PORT>> --header 'Authorization: Basic MTNlMzkxNzY6am9jYXRhdWF0'

```

Can anyone please point if something is missing while configuring the same.

Thanks and Regards,  
Rakesh Chhabria

---

<div class="post-metadata">

**Author:** ![rakesh15](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@rakesh15](https://discuss.elastic.co/u/rakesh15)\
**Post date:** [August 26, 2020, 10:05am UTC](https://discuss.elastic.co/t/heartbeat-not-able-to-connect-the-http-endpoint-via-proxy/246393/2 "2020-08-26T10:05:11Z")

</div>

Hi All,

I added the proxy details at VM level, and now I'm getting the below error.

```auto
Get https://SomeURL/rest/jocata/v1.0/healthCheck: context deadline exceeded

```

Thanks and Regards,  
Rakesh Chhabria

---

<div class="post-metadata">

**Author:** ![shahzad31](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahzad31/32/51637_2.png) [@shahzad31](https://discuss.elastic.co/u/shahzad31)\
**Post date:** [September 4, 2020, 2:18pm UTC](https://discuss.elastic.co/t/heartbeat-not-able-to-connect-the-http-endpoint-via-proxy/246393/3 "2020-09-04T14:18:51Z")

</div>

@andrewvc can you please check this out.

---

<div class="post-metadata">

**Author:** ![rakesh15](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@rakesh15](https://discuss.elastic.co/u/rakesh15)\
**Post date:** [September 4, 2020, 3:59pm UTC](https://discuss.elastic.co/t/heartbeat-not-able-to-connect-the-http-endpoint-via-proxy/246393/4 "2020-09-04T15:59:43Z")

</div>

Hi Team,

For time being we have moved Heartbeat instance to another server where the public URL which we are trying to access is reachable with out proxy and it is working fine.

The problem comes when we are trying to access the public URL from the server where these urls are accessible via proxy.

As mentioned above, the proxy settings are configured at VM level and in heartbeat configuration file.

Please let me know in case any additional information is required from my side.

Thanks and Regards,  
Rakesh Chhabria

---

<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:** [September 28, 2020, 3:59pm UTC](https://discuss.elastic.co/t/heartbeat-not-able-to-connect-the-http-endpoint-via-proxy/246393/5 "2020-09-28T15:59:48Z")

</div>

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