I am trying to build my project and I get the following error:
/usr/share/dotnet/sdk/2.1.300/NuGet.targets(114,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/home/may/development/projetcs/core/EquinoxProject/Equinox.sln]
/usr/share/dotnet/sdk/2.1.300/NuGet.targets(114,5): error : The SSL connection could not be established, see inner exception. [/home/may/development/projetcs/core/EquinoxProject/Equinox.sln]
/usr/share/dotnet/sdk/2.1.300/NuGet.targets(114,5): error : error:2006D080:BIO routines:BIO_new_file:no such file [/home/may/development/projetcs/core/EquinoxProject/Equinox.sln]
Any idea how to sort this out?
`$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.300
Commit: adab45bf0c
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/2.1.300/
Host (useful for support):
Version: 2.1.0
Commit: caa7b7e2ba
.NET Core SDKs installed:
2.1.300 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
`
@may215 are you able to reproduce it 100%? On more than 1 machine?
Could it be related to proxy settings? (likely a long shot)
Can you please try collect Wireshark traces to see what is happening? (ideally minimize the repro to just nuget invocation first if at all possible)
Hey, I can reproduce this issue in other 2 machines with the same configuration on ubuntu 16.04. I don't have any proxy settings, but, I tried with 2, and I get the same results.
OK, that's useful information. Are both machines on the same local network? (i.e. same proxy/firewall settings)
Any luck with minimizing the repro and collecting Wireshark traces?
This may be a dup of https://github.com/dotnet/corefx/issues/29942.
How can we confirm? Would attaching debugger to nuget process & getting call stack help?
Certificates on Ubuntu 16.04 are in /usr/lib/ssl/certs. @may215 do you see unreadable files or broken links when you ls -lah /usr/lib/ssl/certs?
If that turns up empty, try running the repro program. You can publish it for netcoreapp2.1 on Windows and copy it to Ubuntu.
(Alternatively, you stay on your Ubuntu machine publish it using 2.1.201 sdk for netcoreapp2.0, then run it on a .NET Core 2.1 runtime (by uninstalling 2.0 runtime)).
I encountered the same error when building a project on Ubuntu 18.04 with the dotnet 2.1 SDK. Using the following option fixed the problem:
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 dotnet build found via dotnet/corefx#30388
@may215 @aerotog can you please follow @tmds's steps?
Another option is that this is duplication of https://github.com/dotnet/corefx/issues/30354#issuecomment-401876757 - can you please look at Fiddler/Wireshark traces to confirm? It would be VERY helpful. Thanks!
Seems to be addressed by @tmds's fix of dotnet/runtime#26294 (fixed in 2.1.3).
Most helpful comment
I encountered the same error when building a project on Ubuntu 18.04 with the dotnet 2.1 SDK. Using the following option fixed the problem:
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 dotnet buildfound via dotnet/corefx#30388