Geoffrey VL
Geoffrey VL

Reputation: 181

DNU restore failed, https GET timed out

I'm having some problems with restoring nuget packages using 'dnu restore'.

root@esomimx6s:~/TestASP5/src/TestASP5# dnu -v restore
Could not determine OS version information. Defaulting to the empty string.
Microsoft .NET Development Utility Mono-arm-1.0.0-rc1-16231

  GET https://api.nuget.org/v3/index.json
Restoring packages for /home/root/TestASP5/src/TestASP5/project.json
Attempting to resolve dependency TestASP5 >= 1.0.0
Attempting to resolve dependency Microsoft.AspNet.Server.Kestrel >= 1.0.0-rc1-final
  GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Server.Kestrel'
Attempting to resolve dependency TestASP5 >= 1.0.0
Attempting to resolve dependency Microsoft.AspNet.Server.Kestrel >= 1.0.0-rc1-final
Warning: FindPackagesById: Microsoft.AspNet.Server.Kestrel
  HTTP request timed out. Retrying.
  GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Server.Kestrel'
Warning: FindPackagesById: Microsoft.AspNet.Server.Kestrel
  HTTP request timed out. Retrying.
  GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Server.Kestrel'
Error: FindPackagesById: Microsoft.AspNet.Server.Kestrel
  HTTP request timed out. Exiting.
----------
System.Threading.Tasks.TaskCanceledException: A task was canceled.
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00078> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at System.Net.Http.HttpClientHandler+<SendAsync>c__async0.MoveNext () <0x7484c988 + 0x010af> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x7414d6f0 + 0x0001b> in <filename unknown>:0
  at System.Net.Http.HttpClient+<SendAsyncWorker>c__async0.MoveNext () <0x74863400 + 0x00343> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.Restore.NuGet.HttpSource+<GetAsync>d__11.MoveNext () <0x748ef960 + 0x00813> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.Restore.NuGet.NuGetv2Feed+<FindPackagesByIdAsyncCore>d__25.MoveNext () <0x73e53e50 + 0x00617> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RemoteWalkProvider+<FindLibrary>d__6.MoveNext () <0x73e530c8 + 0x0018b> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RestoreOperations+<FindLibrary>d__9.MoveNext () <0x73e6dae0 + 0x003eb> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RestoreOperations+<FindLibraryByVersion>d__8.MoveNext () <0x73e6c908 + 0x007d3> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RestoreOperations+<FindLibraryMatch>d__6.MoveNext () <0x73e60d38 + 0x00a57> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RestoreOperations+<FindLibraryEntry>d__5.MoveNext () <0x741114b8 + 0x0029f> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RestoreOperations+<CreateGraphNode>d__2.MoveNext () <0x7410fd28 + 0x0055f> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RestoreOperations+<CreateGraphNode>d__2.MoveNext () <0x7410fd28 + 0x00adf> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RestoreCommand+<CreateGraphNode>d__71.MoveNext () <0x7410f418 + 0x0015b> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7485ee40 + 0x0001b> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RestoreCommand+<RestoreForProject>d__69.MoveNext () <0x74133ad8 + 0x01b5f> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x73e40098 + 0x00017> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RestoreCommand+<>c__DisplayClass68_0+<<Execute>b__2>d.MoveNext () <0x741331a8 + 0x001bb> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7414dfc0 + 0x00024> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7414d960 + 0x00053> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7414d780 + 0x0008b> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x748f16e0 + 0x0003f> in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x748f1698 + 0x00017> in <filename unknown>:0
  at Microsoft.Dnx.Tooling.RestoreCommand+<Execute>d__68.MoveNext () <0x7498cde8 + 0x009bf> in <filename unknown>:0
----------
Restore failed
A task was canceled.

Feeds used:
    https://api.nuget.org/v3/index.json

I'm on a custom Linux image and I have Mono 4.2.2 installed:

root@esomimx6s:~/TestASP5/src/TestASP5# mono --version
Mono JIT compiler version 4.2.2 (Stable 4.2.2.10/7b87787 Sun Dec 20 18:22:52 CET 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       normal
    Notifications: epoll
    Architecture:  armel,vfp+hard
    Disabled:      none
    Misc:          softdebug
    LLVM:          supported, not enabled.
    GC:            sgen
root@esomimx6s:~/TestASP5/src/TestASP5# dnvm --version
 1.0.0-rc2-15546
root@esomimx6s:~/TestASP5/src/TestASP5# dnu --version
Could not determine OS version information. Defaulting to the empty string.
Microsoft .NET Development Utility
 Version:      1.0.0-rc1-16231
 Type:         Mono
 Architecture: arm
 OS Name:      Linux
 Runtime Id:   linux-arm

When I look for the IP address of the nuget feed, it doesn't seem to be blocked:

root@esomimx6s:~/TestASP5/src/TestASP5# resolveip api.nuget.org
IP address of api.nuget.org is 68.232.34.200
root@esomimx6s:~/TestASP5/src/TestASP5# ping 68.232.34.200
PING 68.232.34.200 (68.232.34.200): 56 data bytes
64 bytes from 68.232.34.200: seq=0 ttl=53 time=28.921 ms
64 bytes from 68.232.34.200: seq=1 ttl=53 time=28.859 ms
^C
--- 68.232.34.200 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 28.859/28.890/28.921 ms

When I issue the same commands on a BeagleBone Black (in the same LAN) all goes well. What else can I try to further debug what's going wrong?

Upvotes: 3

Views: 347

Answers (2)

Lian
Lian

Reputation: 141

Had the same issue as described on Fedora 23. The error messages are indeed misleading and running the sync using mozroots fixes the issue.

mono /usr/lib/mono/4.5/mozroots.exe --import --sync

The output from running that is:

Importing certificates into user store...
140 new root certificates were added to your trust store.
Import process completed.

p/s: would have placed this as a comment but I don't have enough reputation.

Upvotes: 1

Geoffrey VL
Geoffrey VL

Reputation: 181

I found the solution to my problem. I'm aware that the HTTPS GET request needs some amount of certificates to be installed. But because the errors do not state that authentication was the problem, I was assuming this was not the issue. However, it was indeed the root of my problem...

If fixed it by running:

mono /usr/lib/mono/4.5/certmgr.exe -ssl -m https://go.microsoft.com
mono /usr/lib/mono/4.5/certmgr.exe -ssl -m https://nuget.org
mono /usr/lib/mono/4.5/certmgr.exe -ssl -m https://api.nuget.org
mono /usr/lib/mono/4.5/mozroots.exe --import --sync

Upvotes: 1

Related Questions