-
Notifications
You must be signed in to change notification settings - Fork 252
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
nuget can't list packages in Artifactory source/repo from linux - timeout #7206
Comments
this looks like the issue #4538, it should be fixed in NuGet 5.0 by NuGet/NuGet.Client#2382 |
Could you try to restore with -DisableParallelProcessing? |
@zhili1208 thanks for the reply. That doesn't seem to help:
@zhili1208, I think it may be lack of TLS 1.2 support. Follow up comment shortly. |
Could the problem be that nuget does not support TLS 1.2? Hosted Artifactory requires TLS 1.2 as seen at https://www.ssllabs.com/ssltest/analyze.html?d=myorg.jfrog.io&s=34.233.72.116&hideResults=on. Related is this old nuget issue: #3947 I found that using the mono TLS certificate manager would also hang:
So I tried this TlsTest tool: https://github.com/duplicati/duplicati/tree/master/thirdparty/TlsTest
or:
unless you pass the tls11 or tls12 flags:
So I don't know what that TlsTest error message is about, but at least it doesn't hang. |
Side note: the tlstest tool that ships with mono doesn't currently support TLS 1.2: https://raw.githubusercontent.com/mono/mono/master/mcs/class/Mono.Security/Test/tools/tlstest/tlstest.cs |
thanks for your information, then it looks like a mono issue. @mrward any ideas? |
Not sure this is a Mono problem. It looks as though the same |
@mrward The |
Could this be related to the max http requests work you did Zhi? @chrishiestand Can you please try using --disable-parallel with dotnet? |
@nkolev92 Thanks for taking a look, unfortunately that's what @zhili1208 thought too but it doesn't seem to help: #7206 (comment) . |
oh I missed that part. |
So here are two parts of this issue:
|
@jainaashish That is a good breakdown. At the time of issue creation I wasn't sure to what degree mono and dotnet were separate. I finally figured out the problem when I learned that you can view the request logs from the artifactory side. Artifactory was showing 401 errors, even though the dotnet restore client was showing 500 errors. Learning it was an auth issue led me to to figure out how to properly configure the NuGet.Config for dotnet linux clients against Artifactory. So there's still a bug somewhere because dotnet should report a For anyone else with this problem with Artifactory here is how your <?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Artifactory" value="https://myorg.jfrog.io/myorg/api/nuget/nuget-local" />
</packageSources>
<packageSourceCredentials>
<Artifactory>
<add key="Username" value="username" />
<add key="ClearTextPassword" value="password" />
</Artifactory>
</packageSourceCredentials>
</configuration> And also be aware that by default dotnet expects the nuget configuration to live at $HOME/.nuget/NuGet/NuGet.Config whereas (via mono) nuget.exe expects $HOME/.config/NuGet/NuGet.Config. So if you use mono nuget.exe to write to the config file you'll want to also make that file accessible to dotnet restore by moving/symlinking/copying to $HOME/.nuget/NuGet/NuGet.Config or the local project directory. Lastly, with |
So in summary the 2 bugs are:
I'm fine with closing this issue now, or whatever you all would like to do. |
Will close the issue since @chrishiestand mentioned the underlying mono bug has already a tracking issue. |
Details about Problem
The big goal is to be able to
dotnet restore
using nuget packabges from a private artifactory repository, all inside a linux container. However I cannot get packages or list repository contents from the linux container using dotnet or nuget.NuGet product used: nuget.exe
NuGet version: 4.7.1.5393
dotnet.exe --version: 2.1.302
VS version: n/a
OS version: Linux 4.9.93-linuxkit-aufs, Docker container based on Debian Stretch
microsoft/dotnet:2.1-sdk
mono version: Debian 4.6.2.7+dfsg-1
Worked before? I have never attempted it before from the linux cli. However I can list the repository contents just fine from visual studio (on Mac or Windows).
Detailed repro steps so we can see the same problem
Run the container
docker run -it microsoft/dotnet:2.1-sdk /bin/bash
Install nuget and mono:
curl
ing the repo works fine (so the http connection is actually working fine). Also connecting to the repo works from Visual Studio.Other suggested things
Artifactory doesn't say whether the repo is v2 or v3. So I tried configurations for both. In the v3 configuration you put this into your nuget config:
And then add auth:
Listing the source causes the same hang:
Strangely
dotnet restore
doesn't timeout on the request, but instead returns a 500. Note that by defaultdotnet
expects the nuget configuration to live at/root/.nuget/NuGet/NuGet.Config
whereasnuget.exe
expects/root/.config/NuGet/NuGet.Config
. I just made a symlink from one to the other.Verbose Logs
Stracktrace for
mono /usr/local/bin/nuget.exe list -Source Artifactory -Verbosity detailed
:Stacktrace for v3 repository
mono /usr/local/bin/nuget.exe list -Source ArtifactoryNuGetV3 -Verbosity detailed
:The text was updated successfully, but these errors were encountered: