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

Paket doesn't work properly with Nexus(es) #1210

Closed
sideeffffect opened this issue Nov 11, 2015 · 10 comments
Closed

Paket doesn't work properly with Nexus(es) #1210

sideeffffect opened this issue Nov 11, 2015 · 10 comments

Comments

@sideeffffect
Copy link
Contributor

I use 2 Nexus instances nexus1 and nexus2.

nexus1 doesn't need credentials, nexus2 needs credentials.
I have these sources in paket.dependencies

source http://nexus1:8081/nexus/service/local/nuget/nuget-repo
source http://nexus2:8081/nexus/service/local/nuget/nuget-repo  username: "xxx" password: "yyy"

When Paket tries downloading packages from nexus1 it fails: The remote server returned an error: (401) Unauthorized.
If I delete the nexus2 line, downloading from nexus1 works. Is it possible this is a bug in Paket?

@forki
Copy link
Member

forki commented Nov 11, 2015

It probably is. Can you run it with -v flag to get stacktrace?
On Nov 11, 2015 5:32 PM, "Ondra Pelech" [email protected] wrote:

I use 2 Nexus instances nexus1 and nexus2.

nexus1 doesn't need credentials, nexus2 needs credentials.
I have these sources in paket.dependencies

source http://nexus1:8081/nexus/service/local/nuget/nuget-repo
source http://nexus2:8081/nexus/service/local/nuget/nuget-repo username: "xxx" password: "yyy"

When Paket tries downloading packages from nexus1 it fails: The remote
server returned an error: (401) Unauthorized.
If I delete the nexus2 line, downloading from nexus1 works. Is it
possible this is a bug in Paket?


Reply to this email directly or view it on GitHub
#1210.

@sideeffffect
Copy link
Contributor Author

to make the report more precise, the paket.dependencies sources look like this:

source http://nexus1:8081/nexus/service/local/nuget/nuget-repo
source http://nexus2:8081/nexus/service/local/nuget/nuget-repo  username: "xxx" password: "yyy"
source http://klondike:8081/api/odata

the trace:

# packages/Paket/tools/paket.exe -v restore
Paket version 2.21.3.0
found: C:\Users\user\Projects\tmp3\coolsoftware\src\paket.dependencies
Parsing C:\Users\user\Projects\tmp3\coolsoftware\src\paket.dependencies
Something went wrong while downloading Akka 1.0.3 - Trying again.

...

Response from http://klondike:8081/api/odata/Packages?$filter=Id eq 'Corporation.Department.Data.Common' and Version eq '1.0.0.231':

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xml:base="http://klondike:8081/api/odata/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Packages</title>
  <id>http://klondike:8081/api/odata/Packages</id>
  <updated>2015-11-12T08:58:48Z</updated>
  <link rel="self" title="Packages" href="Packages" />
  <entry>
    <id>http://klondike:8081/api/odata/Packages(Id='Corporation.Department.Data.Common',Version='1.0.0.231')</id>
    <title type="text">Corporation.Department.Data.Common</title>
    <summary type="text"></summary>
    <updated>2015-10-09T07:58:10Z</updated>
    <author>
      <name>Department</name>
    </author>
    <link rel="edit-media" title="DataServicePackage" href="Packages(Id='Corporation.Department.Data.Common',Version='1.0.0.231')/$value" />
    <link rel="edit" title="DataServicePackage" href="Packages(Id='Corporation.Department.Data.Common',Version='1.0.0.231')" />
    <category term="NuGet.Lucene.Web.DataServices.DataServicePackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/zip" src="http://klondike:8081/api/packages/Corporation.Department.Data.Common/1.0.0.231/content" />
    <m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
      <d:Version>1.0.0.231</d:Version>
      <d:Title>Corporation.Department.Data.Common</d:Title>
      <d:Owners>Corporation</d:Owners>
      <d:IconUrl m:null="true"></d:IconUrl>
      <d:LicenseUrl m:null="true"></d:LicenseUrl>
      <d:ProjectUrl m:null="true"></d:ProjectUrl>
      <d:DownloadCount m:type="Edm.Int32">882</d:DownloadCount>
      <d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance>
      <d:Description>Common classes for data</d:Description>
      <d:ReleaseNotes m:null="true"></d:ReleaseNotes>
      <d:Created m:type="Edm.DateTime">2015-10-09T08:58:04Z</d:Created>
      <d:Published m:type="Edm.DateTime">2015-10-09T07:58:10.1267923Z</d:Published>
      <d:Dependencies></d:Dependencies>
      <d:PackageHash>cLSvBsIBLSznmqG1oqZ3/BTPphQ6N T7Y5GU3fD7F mcGPzCNvEPqSss8tDpwKMwggOM7olzjZrEpvo6/xI73w==</d:PackageHash>
      <d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm>
      <d:PackageSize m:type="Edm.Int64">20446</d:PackageSize>
      <d:Copyright m:null="true"></d:Copyright>
      <d:Tags m:null="true"></d:Tags>
      <d:IsAbsoluteLatestVersion m:type="Edm.Boolean">false</d:IsAbsoluteLatestVersion>
      <d:IsLatestVersion m:type="Edm.Boolean">false</d:IsLatestVersion>
      <d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease>
      <d:Listed m:type="Edm.Boolean">true</d:Listed>
      <d:DevelopmentDependency m:type="Edm.Boolean">false</d:DevelopmentDependency>
      <d:VersionDownloadCount m:type="Edm.Int32">90</d:VersionDownloadCount>
      <d:Score m:type="Edm.Single">0</d:Score>
      <d:Summary m:null="true"></d:Summary>
    </m:properties>
  </entry>
</feed>

...

loaded details for '[email protected]' from url 'http://klondike:8081/api/odata'
loaded details for '[email protected]' from url 'http://klondike:8081/api/odata'
loaded details for '[email protected]' from url 'http://klondike:8081/api/odata'
Something went wrong while downloading Selenium.Support 2.44.0 - Trying again.
Downloading Corporation.Department.Data.Common 1.0.0.231
  to C:\Users\user\AppData\Local\NuGet\Cache\Corporation.Department.Data.Common.1.0.0.231.nupkg
Downloading Corporation.Squirrel2 1.2.0.45653
  to C:\Users\user\AppData\Local\NuGet\Cache\Corporation.Squirrel2.1.2.0.45653.nupkg
Downloading Corporation.Department.Team.Logging 1.1.0.205
  to C:\Users\user\AppData\Local\NuGet\Cache\Corporation.Department.Team.Logging.1.1.0.205.nupkg
Paket failed with:
        Could not retrieve data from http://nexus1:8081/nexus/service/local/nuget/nuget-public/odata/Packages(Id='Castle.Windsor',Version='3.3.0')
 Message: One or more errors occurred.
 Details: The remote server returned an error: (401) Unauthorized.
StackTrace:
     at [email protected](String message)
   at [email protected](Exception _arg2)
   at [email protected](AsyncParams`1 args)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.FSharp.Control.AsyncBuilderImpl.commit[a](Result`1 res)
   at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout)
   at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken)
   at Paket.RestoreProcess.Restore(String dependenciesFileName, Boolean force, FSharpOption`1 group, FSharpList`1 referencesFileNames)
   at <StartupCode$Paket-Core>[email protected](Unit unitVar0)
   at Paket.Utils.RunInLockedAccessMode[a](String rootFolder, FSharpFunc`2 action)
   at [email protected](ParseResults`1 results)
   at Paket.Program.processWithValidation[T](FSharpFunc`2 validateF, FSharpFunc`2 commandF, Command command, String[] args)
   at [email protected](Command command, String[] args)
   at Paket.Program.main()

is this trace helpful? what other information can I provide, or how do I make it more verbose?
thanks for looking into it!

@sideeffffect
Copy link
Contributor Author

paket.lock looks like this:

CONTENT: NONE
FRAMEWORK: NET40, NET45
NUGET
  remote: http://nexus1:8081/nexus/service/local/nuget/nuget-public
  specs:
    Akka (1.0.3) - framework: >= net45
      Newtonsoft.Json (>= 6.0.8)

    ...

  remote: http://klondike:8081/api/odata
  specs:
    Corporation.Department.Data.Common (1.0.0.231)

    ...

@sideeffffect
Copy link
Contributor Author

if sources look like this

source http://nexus1:8081/nexus/service/local/nuget/nuget-public
#source http://nexus2:8081/nexus/service/local/nuget/nuget-coolsoftware-releases username: "xxx" password: "yyy"
source http://klondike:8081/api/odata

the trace of # packages/Paket/tools/paket.exe -v restore is this (things work OK): https://gist.github.com/sideeffffect/63497a3f09e4f0394518

@forki
Copy link
Member

forki commented Nov 12, 2015

could you please upgrade paket and show the trace from the broken trial with new paket version?

@sideeffffect
Copy link
Contributor Author

# packages/Paket/tools/paket.exe -v restore > out 2>&1

Paket version 2.24.1.0
found: C:\Users\user\Projects\tmp3\coolsoftware\src\paket.dependencies
Parsing C:\Users\user\Projects\tmp3\coolsoftware\src\paket.dependencies
Response from http://klondike:8081/api/odata/Packages?$filter=Id eq 'Corporation.Department.Data.Common' and Version eq '1.0.0.231':

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xml:base="http://klondike:8081/api/odata/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Packages</title>
  <id>http://klondike:8081/api/odata/Packages</id>
  <updated>2015-11-12T10:22:07Z</updated>
  <link rel="self" title="Packages" href="Packages" />
  <entry>
    <id>http://klondike:8081/api/odata/Packages(Id='Corporation.Department.Data.Common',Version='1.0.0.231')</id>
    <title type="text">Corporation.Department.Data.Common</title>
    <summary type="text"></summary>
    <updated>2015-10-09T07:58:10Z</updated>
    <author>
      <name>Department</name>
    </author>
    <link rel="edit-media" title="DataServicePackage" href="Packages(Id='Corporation.Department.Data.Common',Version='1.0.0.231')/$value" />
    <link rel="edit" title="DataServicePackage" href="Packages(Id='Corporation.Department.Data.Common',Version='1.0.0.231')" />
    <category term="NuGet.Lucene.Web.DataServices.DataServicePackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/zip" src="http://klondike:8081/api/packages/Corporation.Department.Data.Common/1.0.0.231/content" />
    <m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
      <d:Version>1.0.0.231</d:Version>
      <d:Title>Corporation.Department.Data.Common</d:Title>
      <d:Owners>Corporation</d:Owners>
      <d:IconUrl m:null="true"></d:IconUrl>
      <d:LicenseUrl m:null="true"></d:LicenseUrl>
      <d:ProjectUrl m:null="true"></d:ProjectUrl>
      <d:DownloadCount m:type="Edm.Int32">889</d:DownloadCount>
      <d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance>
      <d:Description>Common classes for data</d:Description>
      <d:ReleaseNotes m:null="true"></d:ReleaseNotes>
      <d:Created m:type="Edm.DateTime">2015-10-09T08:58:04Z</d:Created>
      <d:Published m:type="Edm.DateTime">2015-10-09T07:58:10.1267923Z</d:Published>
      <d:Dependencies></d:Dependencies>
      <d:PackageHash>cLSvBsIBLSznmqG1oqZ3/BTPphQ6N T7Y5GU3fD7F mcGPzCNvEPqSss8tDpwKMwggOM7olzjZrEpvo6/xI73w==</d:PackageHash>
      <d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm>
      <d:PackageSize m:type="Edm.Int64">20446</d:PackageSize>
      <d:Copyright m:null="true"></d:Copyright>
      <d:Tags m:null="true"></d:Tags>
      <d:IsAbsoluteLatestVersion m:type="Edm.Boolean">false</d:IsAbsoluteLatestVersion>
      <d:IsLatestVersion m:type="Edm.Boolean">false</d:IsLatestVersion>
      <d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease>
      <d:Listed m:type="Edm.Boolean">true</d:Listed>
      <d:DevelopmentDependency m:type="Edm.Boolean">false</d:DevelopmentDependency>
      <d:VersionDownloadCount m:type="Edm.Int32">97</d:VersionDownloadCount>
      <d:Score m:type="Edm.Single">0</d:Score>
      <d:Summary m:null="true"></d:Summary>
    </m:properties>
  </entry>
</feed>

...

loaded details for '[email protected]' from url 'http://klondike:8081/api/odata'

...

Something went wrong while downloading Castle.Core 3.3.3
Message: Could not retrieve data from http://nexus1:8081/nexus/service/local/nuget/nuget-public/odata/Packages(Id='Castle.Core',Version='3.3.3')
 Message: One or more errors occurred.
 Details: The remote server returned an error: (401) Unauthorized.
  ==> Trying again.
Paket failed with:
    Could not retrieve data from http://nexus1:8081/nexus/service/local/nuget/nuget-public/odata/Packages(Id='Castle.Core',Version='3.3.3')
 Message: One or more errors occurred.
 Details: The remote server returned an error: (401) Unauthorized.

...

StackTrace:
     at [email protected](String message)
   at [email protected](Exception _arg2)
   at [email protected](AsyncParams`1 args)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.FSharp.Control.AsyncBuilderImpl.commit[a](Result`1 res)
   at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout)
   at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken)
   at Paket.RestoreProcess.Restore(String dependenciesFileName, Boolean force, FSharpOption`1 group, FSharpList`1 referencesFileNames)
   at <StartupCode$Paket-Core>[email protected](Unit unitVar0)
   at Paket.Utils.RunInLockedAccessMode[a](String rootFolder, FSharpFunc`2 action)
   at [email protected](ParseResults`1 results)
   at Paket.Program.processWithValidation[T](FSharpFunc`2 validateF, FSharpFunc`2 commandF, Command command, String[] args)
   at [email protected](Command command, String[] args)
   at Paket.Program.main()

@forki
Copy link
Member

forki commented Nov 12, 2015

ok I have a guess and found a potential bug.
but seems I can't push from this crappy wifi

forki added a commit that referenced this issue Nov 12, 2015
@forki
Copy link
Member

forki commented Nov 12, 2015

ok used a different wifi. please try 2.24.3

@sideeffffect
Copy link
Contributor Author

wow, thank you! the problem seems to be gone.
I will report back if I come across any issue like this again, but for now I think we're good.
Thanks again for being so responsive!

@forki forki closed this as completed Nov 12, 2015
@forki
Copy link
Member

forki commented Nov 12, 2015

Ok, I'm pretty sure it was the bug. That code was obviously broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants