# Telegraf request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

**URL:** <https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206>\
**Category:** Telegraf\
**Tags:** influxdb, telegraf, grafana\
**Created:** [June 19, 2019, 8:10am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206 "2019-06-19T08:10:48Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://community.influxdata.com/u/Grzegorz)\
**Post date:** [June 19, 2019, 8:10am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/1 "2019-06-19T08:10:48Z")

</div>

Hey,  
I want send metrics from server to the main server. And i have this error in telegraf: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers). Ping from cmd to main server is worrking. I am also add ports in firewalls. I searched a lot in the browser but I did not know the answer. Anybody can help me?

---

<div class="post-metadata">

**Author:** ![MarcV](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/marcv/32/7676_2.png) [@MarcV](https://community.influxdata.com/u/MarcV)\
**Post date:** [June 19, 2019, 9:30am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/2 "2019-06-19T09:30:16Z")

</div>

hi @Grzegorz welcome ! ,

can you try a telnet from the server where telegraf is running to the database server ?

```
telnet serverhostname influxdbport 

```

or ping the influxdatabase with

```
curl -sl -I http://yourdatabasehost:8086/ping

```

can you check on the database server if influxdb is listening with

```
netstat -ntlp |grep -i influxd
```

---

<div class="post-metadata">

**Author:** ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://community.influxdata.com/u/Grzegorz)\
**Post date:** [June 19, 2019, 11:29am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/3 "2019-06-19T11:29:47Z")

</div>

I am working on Windows servers. Normal ping like " ping mydatabasehost" is working. Telnet “Could not open connection to the host, on port 8086: Connect failed”

---

<div class="post-metadata">

**Author:** ![MarcV](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/marcv/32/7676_2.png) [@MarcV](https://community.influxdata.com/u/MarcV)\
**Post date:** [June 19, 2019, 11:33am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/4 "2019-06-19T11:33:57Z")

</div>

Hi , is influxd up and running ? Can you connect tot the database on the server using the influx commandline interface ?

---

<div class="post-metadata">

**Author:** ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://community.influxdata.com/u/Grzegorz)\
**Post date:** [June 19, 2019, 11:34am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/5 "2019-06-19T11:34:37Z")

</div>

Yes running and i can

---

<div class="post-metadata">

**Author:** ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://community.influxdata.com/u/Grzegorz)\
**Post date:** [June 19, 2019, 11:38am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/6 "2019-06-19T11:38:24Z")

</div>

I am new in Grafanam telegraf etc. I seted up other servers and there everything is working. But these server are in the same subnet like a main server. Now i want connect with server who is other in subnet, it is possible?

---

<div class="post-metadata">

**Author:** ![MarcV](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/marcv/32/7676_2.png) [@MarcV](https://community.influxdata.com/u/MarcV)\
**Post date:** [June 19, 2019, 11:40am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/7 "2019-06-19T11:40:47Z")

</div>

The telnet to port 8086 failed which means the port is probably not open ?  
Does a telnet to port 8086 work on the other server ?

---

<div class="post-metadata">

**Author:** ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://community.influxdata.com/u/Grzegorz)\
**Post date:** [June 19, 2019, 11:43am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/8 "2019-06-19T11:43:35Z")

</div>

Yes, on these other server working. On this server what i want connect right not. I add this port 8086 in firewall rules but still not working.

---

<div class="post-metadata">

**Author:** ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://community.influxdata.com/u/Grzegorz)\
**Post date:** [June 19, 2019, 11:46am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/9 "2019-06-19T11:46:36Z")

</div>

When i try “tracert mymainserver” on road are 3 servers, maybe that is a point?

---

<div class="post-metadata">

**Author:** ![MarcV](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/marcv/32/7676_2.png) [@MarcV](https://community.influxdata.com/u/MarcV)\
**Post date:** [June 19, 2019, 11:48am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/10 "2019-06-19T11:48:11Z")

</div>

I am afraid that I cannot help with network configurations , I don’t know much about it ☹

---

<div class="post-metadata">

**Author:** ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://community.influxdata.com/u/Grzegorz)\
**Post date:** [June 19, 2019, 11:50am UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/11 "2019-06-19T11:50:00Z")

</div>

so am I 😅 Maybe someone can help me? 😕

---

<div class="post-metadata">

**Author:** ![rdxmb](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/rdxmb/32/2602_2.png) [@rdxmb](https://community.influxdata.com/u/rdxmb)\
**Post date:** [June 25, 2019, 12:35pm UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/12 "2019-06-25T12:35:41Z")

</div>

Hello,

first try to

`curl -v http://YOURINFLUXHOST:8086/ping`

If this is not working, your influxdb is not reachable (off, network problems etc)  
If this is working, maybe your telegraf has problems with reconnects: [https://github.com/influxdata/telegraf/issues/5905](https://github.com/influxdata/telegraf/issues/5905)

Greetings.

---

<div class="post-metadata">

**Author:** ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://community.influxdata.com/u/Grzegorz)\
**Post date:** [June 25, 2019, 1:30pm UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/13 "2019-06-25T13:30:33Z")

</div>

After curl:  
curl : Unable to connect to the remote server  
At line:1 char:1

- curl -v [http://10.16.66.177:445/ping](http://10.16.66.177:445/ping)
- 

```auto
  + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
 eption
  + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
```

---

<div class="post-metadata">

**Author:** ![rdxmb](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/rdxmb/32/2602_2.png) [@rdxmb](https://community.influxdata.com/u/rdxmb)\
**Post date:** [June 25, 2019, 1:52pm UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/14 "2019-06-25T13:52:29Z")

</div>

If 445 is really the right port, influxdb is not available here. Are you sure this is the right port?

So you either influxdb is not running or you have a network problem.

Try to debug from your host on 10.16.66.177 with

```
curl -v http://127.0.0.1:445/ping

```

and stuff like that

---

<div class="post-metadata">

**Author:** ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://community.influxdata.com/u/Grzegorz)\
**Post date:** [July 3, 2019, 1:36pm UTC](https://community.influxdata.com/t/telegraf-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/10206/15 "2019-07-03T13:36:55Z")

</div>

Okey It is problem with no open ports. I can’t do nothing because i am not a administrator of these servers.  
We can end this post.  
Thanks for help guys!
