Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Error: NameResolutionFailure #482

Closed
acastaner opened this issue Apr 24, 2015 · 2 comments
Closed

Getting Error: NameResolutionFailure #482

acastaner opened this issue Apr 24, 2015 · 2 comments

Comments

@acastaner
Copy link

I'm trying to build a docker image for this MVC6 project. However when building it, the kpm restore command fails:

[root@localhost acastaner_mvc6]# docker build -t acastaner-fr .
Sending build context to Docker daemon 1.474 MB
Sending build context to Docker daemon 
Step 0 : FROM microsoft/aspnet
 ---> 98b0320569c3
Step 1 : COPY . /app
 ---> Using cache
 ---> 1d3e8bd0091b
Step 2 : WORKDIR /app
 ---> Using cache
 ---> 2ffc05cd0da3
Step 3 : RUN kpm restore
 ---> Running in a923b78da5fb
Restoring packages for /app/project.json
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics'.
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc'.
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.WebListener'.
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.StaticFiles'.
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.DependencyInjection'.
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Kestrel'.
Warning: FindPackagesById: Microsoft.AspNet.Diagnostics
  Error: NameResolutionFailure
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics'.
Warning: FindPackagesById: Microsoft.AspNet.Mvc
  Error: NameResolutionFailure
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc'.
Warning: FindPackagesById: Microsoft.AspNet.Server.WebListener
  Error: NameResolutionFailure
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.WebListener'.
Warning: FindPackagesById: Microsoft.AspNet.Diagnostics
  Error: NameResolutionFailure
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics'.
Error: FindPackagesById: Microsoft.AspNet.Diagnostics
  Error: NameResolutionFailure

I'm running CentOS 7 and Docker 1.3 (the version available on the EPEL repository).

This is the Dockerfile (available on the Github repo):

FROM microsoft/aspnet

COPY . /app
WORKDIR /app
RUN ["kpm", "restore"]

EXPOSE 5004
ENTRYPOINT ["k", "kestrel"]

And this is the project.json:

{
    "webroot": "wwwroot",
    "version": "1.0.0-*",
    "dependencies": {
        "Microsoft.AspNet.Diagnostics": "1.0.0-beta3",
        "Microsoft.AspNet.Mvc": "6.0.0-beta3",
        "Microsoft.AspNet.Server.WebListener": "1.0.0-beta3",
        "Microsoft.AspNet.StaticFiles": "1.0.0.0-beta3",
        "Microsoft.Framework.DependencyInjection": "1.0.0.0-beta3",
        "Kestrel": "1.0.0-*"
    },
    "frameworks": {
        "dnx451": { },
        "dnxcore50": { }
    },
    "bundleExclude": [
        "node_modules",
        "bower_components",
        "**.kproj",
        "**.user",
        "**.vspscc"
    ],
    "exclude": [
        "wwwroot",
        "node_modules",
        "bower_components"
    ],
    "commands": {
        "web ": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
        "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
    }
}

I'm not very clear if the "NameResolutionFailure" is a DNS problem, or an indication that the package wasn't found by name, or if it's a more generic issue. How can I help troubleshoot this?

@acastaner
Copy link
Author

Full error output uploaded here: https://gist.github.com/acastaner/e29ff825136c55422bdd

@acastaner
Copy link
Author

Seems to be a local DNS issue, although it doesn't happen all the time. It's not related to ASP.NET.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant