Sometimes can not run build with docker image coming from private dockerhub account (error: Cannot login to registry docker.io)
Ubuntu 20.04
I run TeamCity server and 3 agents in dockers by docker compose:
jetbrains/teamcity-server:2021.1.2
jetbrains/teamcity-agent:2021.1.2-linux-sudo
Docker version 20.10.18, build b40c2f6
docker-compose version 1.29.2, build 5becea4c
I have e2e tests running by timer in TeamCity 6 times per hour and I call my own docker image flasher2085/youwin-e2e-new:reporters-once (which is a private one, hosted in https://hub.docker.com/) to execute those tests. I used the same version of TeamCity server/agents and before it was working well. At some point I started to receive error message:
Cannot login to registry docker.io
An error occurred while executing 'docker login -u "flasher2085" --password-stdin ':
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
But it is happening like 1 time from 10 successful runs. Settings are always the same. When I go to settings and press Test connection it is working well. It looks like TeamCity tries to connect to dockerhub but sometimes server responds not instant and my build fails and goes to hanging mode which I need to restart by hands. This is very annoying as I can not leave server unattended for long time: all agents goes in hanging mode for days/weeks and at some point I do not have available agents to execute builds. I was checking in TeamCity is any setting to extend default timeout but did not manage to find
I checked myself different solutions for this issue but any solutions are related to local docker settings which I dont think can be applied for my setup with docker-compose or at least I do not know how.
Please find in attachment screenshot
Any suggestions are very appreciated
Please sign in to leave a comment.