How to resolve the Docker “Timeout exceeded while awaiting headers” error


Jack Wallen found Docker commands failing to pull down images on various machines. The issue perplexed him, but the solution turned out to be very simple.

Computer error. Warnings unavailable page users, attention symbol alerts of problem, angry clients near monitor device, vector concept
Image: MicroOne/Adobe Stock

Recently, I’ve noticed several instances where I go to either pull down a Docker image or run the docker compose up -d command, only to see the following error:

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

I tried everything, from rebooting, logging in to Docker Hub and reinstalling Docker CE, but nothing worked to get around the error. It took me considerable troubleshooting, but I finally discovered the issue and I was shocked at the simplicity of the solution.

SEE: Hiring kit: Back-end Developer (TechRepublic Premium)

Most often, this issue is caused by the machine running the Docker command being behind a proxy. When that’s the case, the Docker command cannot successfully communicate to hub.docker.com. However, that was not the case with my instance. In fact, none of my servers are behind a proxy. So what gives?

How to resolve the Docker header timeout issue

The first thing you should try is to log in with the Docker command. To do that, you’ll need to first create an access token from within your DockerHub account:

  1. Log in to your DockerHub account.
  2. Click your profile image in the upper right corner.
  3. Click Account Settings.
  4. Go to the Security section.
  5. Click New Access Token.
  6. Give the new token a name and assign the Access Permissions.
  7. Click Generate.
  8. Copy the resultant access code to your clipboard.

Go to your terminal window on the machine running Docker and log in with the command:

docker login

You’ll be prompted for your DockerHub username followed by the access token. Paste the access token into the terminal and hit Enter on your keyboard. You should then be logged into DockerHub and are ready to go. Try and pull down an image such as with the command:

docker pull nginx

If that works, you’re good to go. If not, there’s one more thing you can try that will probably resolve the issue, as this is what did it for me.

It’s all about your DNS servers. I generally use the Cloudflare DNS servers of 1.0.0.1 and 1.1.1.1. With those DNS servers configured, the Docker pull commands have been failing me of late. To fix that issue, I simply switched to the Google DNS server of 8.8.8.8 and 8.8.4.4. Here’s how I made that change on Ubuntu Server 22.04.

Open your network device configuration file, such as with the command:

sudo nano /etc/netplan/00-installer-config.yml

In that file, make sure the nameservers entry looks like this:

nameservers:
addresses: [8.8.8.8,8.8.4.4]

Save and close the file. Apply the changes with:

sudo netplan apply

Once netplan has done its thing, attempt to pull down an image from DockerHub and you should see success.

It’s an incredibly simple solution to a problem that had vexed me for a while. Hopefully, this easy fix has Docker running as expected for you.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.



Source link

istanbul escort aksaray escort arnavutköy escort ataköy escort avcılar escort avcılar türbanlı escort avrupa yakası escort bağcılar escort bahçelievler escort bahçeşehir escort bakırköy escort başakşehir escort bayrampaşa escort beşiktaş escort beykent escort beylikdüzü escort beylikdüzü türbanlı escort beyoğlu escort büyükçekmece escort cevizlibağ escort çapa escort çatalca escort esenler escort esenyurt escort esenyurt türbanlı escort etiler escort eyüp escort fatih escort fındıkzade escort florya escort gaziosmanpaşa escort güneşli escort güngören escort halkalı escort ikitelli escort istanbul escort kağıthane escort kayaşehir escort küçükçekmece escort mecidiyeköy escort merter escort nişantaşı escort sarıyer escort sefaköy escort silivri escort sultangazi escort suriyeli escort şirinevler escort şişli escort taksim escort topkapı escort yenibosna escort zeytinburnu escort porno 1080p porno izle 4k porno izle 720p porno izle abella danger alman alman porno alman porno izle aloha tube porno amatör amatör porno amatör porno izle anal anal porno anal porno izle arap porno asa akira porno asyalı porno bangbros porno bangbros porno izle banyoda sikis başörtülü porno beeg porno izle beyaz tenli porno izle biseksuel porno izle bisexsuel porno brandi love porno brazzers brazzers porno izle canli porno canli porno izle çinli porno çinli porno izle ensest porno ensest porno izle ensest seks erotik porno erotik porno izle esmer porno esmer porno izle etek altı fake agent fake taxi fake taxi porno fantazi pornoları fantezi porno izle fetiş porno fetiş porno izle fetish fransız porno fransız porno izle full hd hg porno izle gangbang porno genç kız porno izle genç kız sikişi genç teen porno izle gizli çekim porno gizli çekim pornosu grup pornosu grup porno grup porno izle hd pornolar hd porno hd porno izle hemşire porno hemşire pornosu hizmetçi porno hizmetçi porno izle ingiliz porno japon pornoları japon porno kızlık bozma kızlık bozma porno izle konulu porno konulu porno izle koreli porno köylü pornoları kumral porno kumral porno izle latin pornoları latin porno latin porno izle lezbiyen pornoları lezbiyen porno lezbiyen porno izle lisa ann porno liseli pornoları liseli porno liseli porno izle manken porno manken porno izle masaj porno izle masturbasyon porno izle masturbasyon pornoları mature porno mia khalifa porno mia malkova porno milf porno izle mobil porno mobil porno izle öğrenci porno izle öğretmen porno izle okul porno izle olgun kadın pornosu olgun porno oral porno oral porno izle oral seks porna izle pornhub pornhub porno izle porno film izle porno indir porno izle porno resimler porno star porntube porno izle redtube redtube pornoları riley reid porno rokettube rus pornoları rus porno rus porno izle sakso blowjob porno izle sarışın pornoları sarışın porno sarışın porno izle sarışın pornoları sekreter porno shemale sikiş sikiş sikiş izle şişman porno siyahi pornoları suriyeli pornoları swinger porno tecavüz porno teen porn türbanlı pornoları türbanlı porno türk pornoları türk porno türk porno izle türkçe altyazılı porno türkçe altyazılı porno izle xhamster pornoları xhamster porno xhamster porno izle xnxx xnxx porno xnxx porno izle xvideos xvideos porno izle yaşlı porno yeşilçam porno izle youjizz youporn youporn porno izle zenci porno güvenilir bahis siteleri bahis siteleri casino deneme bonusu casino siteleri deneme bonusu para yatırma bonusu bahis siteleri casino siteleribahis sitesi para yatırma