Home > database >  dial tcp: lookup: device or resource busy
dial tcp: lookup: device or resource busy

Time:07-03

There is an intermittent issue while downloading docker images in a Linux VM. As per docker service journalctl logs I can see below error-

level=error msg="Handler for POST /images/create returned error: Get "https://<containerregistry>": dial tcp: lookup https://<containerregistry>: device or resource busy".

Initialy I thought it could be intermittent connectivity issue with container registry (Azure Container Registry) but that is not the case since even with retries at different time periods I got the same error.

I have checked the docker daemon.json config and don't see any issue with that. I also verified DNS servers in systemd-resolve and can see the expected IPs as required. Interestingly, another VM with same configs works fine.

I am using .Net Client for Docker Remote API (https://github.com/dotnet/Docker.DotNet) to trigger docker image updates. The client is hosted in a Linux VM which is triggered by via socket as an RPC call. It reaches the client and executes the API ImageOperation.CreateImageAsync.

Can someone help with this? Please let me know if I can add more details.

CodePudding user response:

• Regarding the error that you are encountering, I would suggest you to please check the azure container registry health first by executing the below command: -

az acr check-health --name registryname --vnet virtualnetworkname

Then, check the internet upload and download speed through ‘AzureSpeed’ tool to the container registry which hosts the images layers. Also, it may be that the image size may not be supported for the registry service tier due to which it is not available.

• Ensure that both your ‘docker client’ and ‘docker daemon’ are configured for proxy behavior behind HTTPS proxy. If you have changed or updated any proxy settings, kindly ensure to restart the daemon service.

Check the ‘Registry resource logs in the ContainerRegistryLoginEvents table’ for further diagnosis of an attempted connection. Also, check whether the registry is accessible over the internet and allow access to the public registry endpoints from all networks. If the container registry is configured for selected virtual network with a service endpoint, then disabling public network access also disables access over the service endpoint.

• If a private endpoint is configured for the container registry, confirm that the DNS resolves the registry's public FQDN such as myregistry.azurecr.io to the registry's private IP address. Use a network utility such as ‘dig’ or ‘nslookup’ for DNS lookup. Ensure that DNS records are configured for the registry FQDN and for each of the data endpoint FQDNs as per the below documentation link: -

https://docs.microsoft.com/en-us/azure/container-registry/container-registry-private-link#dns-configuration-options

• If a service endpoint to the registry is configured, confirm that a network rule is added to the registry that allows access from that network subnet. Also, ensure that the resource provider for Azure Container Registry is registered.

For more details regarding the further steps to take to perform regarding the error that you have encountered, kindly refer to the documentation link below: -

https://docs.microsoft.com/en-us/azure/container-registry/container-registry-troubleshoot-access#configure-service-access

  • Related