Issue with Circleci and api.nuget.org

Hello,

Do you know it there is an issue between circleci containers and some website (resolver,…) ?

I’m facing :

curl: (6) Could not resolve host: api.nuget.org

When I try to reach : https://api.nuget.org/v3/index.json

And sometimes it’s ok.

On my laptop I dont have any issue …

I saw the degraded status, but it seems to be related to mailgun and I dont see the link between my problem and mailgun.

On our side, it’s a blocker, our builds are failing randomly.

Thank you in advance.

4 Likes

Which environment(s) are you seeing the issue in?

Docker had its own network layer with its own DNS service layer so additional detail from you may help CircleCI staff track down the issue as they are the only people who know how the underlying systems have been configured.

I Also have the same issue when I run dotnet restore but weird is that for one service image is build without issue but for second I have this problem with resolving api.nuget.org docker file looks similar in both cases. On the local machine, docker is built properly.

We are sorry to hear the api.nuget.org resolution is not working as expected.

It looks like there is an issue with alpine image and AWS us-east-1. CircleCI machine are running on us-east-1I believe this is causing issue. More details can be found on the GitHub issue linked below. It seems like it is happening to us and other services as well (whoever user AWS us-east-1).

We’ve found an issue where running an Alpine based dotnet image inside of AWS us-east-1 (e.g running an image on an EC2 instance with Docker) causes DNS lookups to api.nuget.org to fail, breaking many tools that integrate with Nuget.
DNS lookups fail for api.nuget.org using Alpine based dotnet Docker images in AWS us-east-1 · Issue #9396 · NuGet/NuGetGallery · GitHub

There are two recommendation that we found are working.

  1. Define the host name directly in to /etc/hosts. If you can modify the /etc/resolv.conf that will also work.

    - run: echo '152.199.40.167 api.nuget.org' >> /etc/hosts
    
  2. If you are using alpine image change to non-alpine image. For example if you are using mcr.microsoft.com/dotnet/sdk:7.0-alpine please change it to mcr.microsoft.com/dotnet/sdk:7.0.

We will update if there is new workaround available.

Thank you for your update.

I saw the same message on GitlabCi also.

I have to see if we can move to debian image. I’m not sure.

Thank you for your reply and workaround. We’ll keep you posted.

1 Like

We had some similar network resolution problems recently and it had me looking at the CircleCI dashboard.

I see that AWS us-east-1 EC2 is a dependency, but then CircleCI also depends on Google Cloud Compute Engine. Do jobs run on Google Cloud as well?