Bobcares

How to fix “connection timed out” error during http-01 challenge propagation?

by | Sep 2, 2020

Connection timed out error during http-01 challenge propagation occurs due to incompatibilities with the Loadbalancer and the way Kubernetes works.

As a part of our Server Management Services, we help our Customers to fix similar Kubernetes related errors regularly.

Let us today discuss the possible causes and fixes for this error.

Connection timed out error during http-01 challenge propagation

Kubernetes Ingresses allow you to flexibly route traffic from outside your Kubernetes cluster to Services inside of your cluster.

Popular Ingress Controllers include Nginx, Contour, HAProxy, and Traefik. Ingresses provide a more efficient and flexible alternative to setting up multiple LoadBalancer services, each of which uses its own dedicated Load Balancer.

While trying to set up Nginx Ingress with Cert-Manager for the cluster on DigitalOcean, at times, the certificates may not get issued. The error message may show:

~~
Waiting for http-01 challenge propagation: failed to perform self-check GET request ‘http://cert-test.bobcares.com/.well-known/acme-challenge/kC9hDBr8qI898y1gqacU2BbytGBb21YfQHaCyUx1kEY’: Get http://cert-test.bobcares.com/.well-known/acme-challenge/kC9hDBr8qI898y1gqacU2BbytGBb21YfQHaCyUx1kEY: dial tcp 165.227.252.80:80: connect: connection timed out
~~

Cause for connection timed out error during http-01 challenge propagation

As we discussed earlier, incompatibility issues with the LoadBalancer and the way Kubernetes works could be a major factor that trigger the connection timeout error.

While using the LoadBalancer provided by DigitalOcean, Kubernetes may not route network through the LoadBalancer public interface.

Thus it does not add PROXY protocol header or SSL while setting it outside Kubernetes.

However, when the cert-manager tries to connect to the public domain name, it fails. It works from outside the cluster, but not within the cluster.

If we could add some switches where we can instruct the validator to add PROXY protocol or to disable validation for that domain it would help a lot.

How to fix connection timed out error during http-01 challenge propagation

A workaround to fix this error include the following steps:

Firstly, create a dedicated DNS entry pointing to the public IP address of the load balancer. we can check for EXTERNAL-IP via `kubectl get svc -n ingress-nginx command.

In the manifest used to create load balancer, add an annotation pointing to that newly created DNS entry. For instance, add the annotation as the one below:

service.beta.kubernetes.io/do-loadbalancer-hostname: “myhost.domain.com”

By default the Nginx Ingress LoadBalancer Service has service.spec.externalTrafficPolicy set to the value Local, which routes all load balancer traffic to nodes running Nginx Ingress Pods.

The other nodes will deliberately fail load balancer health checks so that Ingress traffic does not get routed to them.

Certificate-issuer will be on a different node than the load balancer, so it cannot talk to itself through the ingress. To fix this, in the manifest used to create load balancer, set externalTrafficPolicy to Cluster.

[Need any further assistance in fixing Kubernetes errors? – We’re available 24*7]

Conclusion

In short, connection timed out error during http-01 challenge propagation occurs due to incompatibilities with the Loadbalancer and the way Kubernetes works. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF