ClientTimeout while awaiting headers

Hi Team,

I want to monitor one url https://abccc.com/acbs. I am using http ping method . But i am getting `Could not connect xx.xx.xx.xx:443 with error:dial tcp xx.xx.xx.xx:443:i/o timeout(Client.Timeout exceeds while awaiting headers)` . I have increased the timeout from 16 sec to 90s,but still i am getting this error.Although in browser i can open the url.

It seems that the domain is not available, right?
It's redirected to another URL.

Ya in browser it will redirect to some other.Is there any option in Synthetic monitoring for redirection .

Hello @Aniket_Pant

As per documentation i believe you need to update the max_redirects field :

max_redirects

Type: number

The total number of redirections Synthetics will follow.

By default, Synthetics will not follow redirects, but will report the status of the redirect. If set to a number greater than 0, Synthetics will follow that number of redirects.

When this option is set to a value greater than 0, the monitor.ip field will no longer be reported, as multiple DNS requests across multiple IPs may return multiple IPs. Fine-grained network timing data will also not be recorded, as with redirects that data will span multiple requests. Specifically the fields http.rtt.content.us, http.rtt.response_header.us, http.rtt.total.us, http.rtt.validate.us, http.rtt.write_request.us and dns.rtt.us will be omitted.

Default: 0

Thanks!!

1 Like

I have elastic cloud and in UI i have increased this parameter. No worries I will try again.

I just tried in cloud and no issue.

Which one did you try?

Hey @dadoonet thats not the url for privacy i have mentioned different url.

So if your URL is a private one, you need to define a private location:

Did you do that?

1 Like

nope

Have a look at Monitor resources on private networks | Elastic Docs

I have tried by selecting private location and in my case it was on-prem. I have increased the max redirect and increase the timeout also. But i don’t know , in browser i can open the url and it is not redirecting (for some url it is)

I don't understand. You initially said that you are running on Cloud. Then this.

Can you describe the full picture and what you did exactly please?

I checked that we have configured private location and we named as on-prem. The URLs i have it will be accessible from interanet and there are urls which i can do synthetic montoring and location i am using is on-prem.

What steps you did in this document? Which one does not work?

By reading this document I haven’t created a new private location, in my environment there are 2 private location that i have mention one and other I can’t remember the name .

I think i have to mention to new location but how would i know which location i need ?

Hello @Aniket_Pant

To summarize :

If the URL you are trying to access is Internet facing then we can use any location if it is Intranet URL then we need to use Private location.

About redirect if it redirects from base URL you can change the parameter max_redirects from 0 as per your requirement.

Now back to Private location, this location is created based on Policy which will have Agents. So when you are selecting a location , check the Policy from which the location was created , check the Agents Enrolled in that Policy. You can SSH (login) to this Agent(Host) under this Policy and see if the CURL is working for the URL which you want to monitor via Synthetics.

Another way will be check from where CURL to this URL is working , check this host is enrolled under which Policy and you can used Location related to this Policy for monitoring the URL.

Thanks!!

Hi @Tortoise ,

I came to know that connectivity is not there. We will fix this. Thanks for guiding @Tortoise @dadoonet

1 Like