Code Monkey home page Code Monkey logo

Comments (9)

idoop avatar idoop commented on September 10, 2024

@wmolyneux If you want use host network mode, please don't use -p option, it's doesn't work with host mode. Just docker run -d -e SERVER_PORT 81 --network host --rm --name nuget-server idoop/docker-nuget-server

from docker-nuget-server.

idoop avatar idoop commented on September 10, 2024

@wmolyneux If there are other problem, please reopen this issue.

from docker-nuget-server.

rugbbyli avatar rugbbyli commented on September 10, 2024

Hi @idoop , i occured same problem, this is my command:

docker run -d --name nuget-server -e SERVER_NAME="52.83.119.225" -e SERVER_PORT=5333 --network=host -e NUGET_API_KEY="flybot" idoop/docker-nuget-server

now i can push package, could show the package, but can not download it, as the download url missing port 5333.

image

from docker-nuget-server.

idoop avatar idoop commented on September 10, 2024

@rugbbyli Please show the container's log, use command docker logs nuget-server to get log. And What's your nuget package download command?
The nuget package download command juse like this:

nuget install  xxx  -source SERVER_NAME[:PORT]  -packagesavemode nupkg

from docker-nuget-server.

rugbbyli avatar rugbbyli commented on September 10, 2024

Hi @idoop , thanks for reply.
I add custom server in the NuGet.Config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="flybot" value="http://52.83.119.225:5333/"/>
  </packageSources>
</configuration>

and the packages.config file:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="HJD.Utils" version="0.0.1-rc0" />
</packages>

Then run nuget restore command, and this is the result log

Restoring NuGet package HJD.Utils.0.0.1-rc0.
  GET http://52.83.119.225:5333/Packages(Id='HJD.Utils',Version='0.0.1-rc0')
  OK http://52.83.119.225:5333/Packages(Id='HJD.Utils',Version='0.0.1-rc0') 145ms
  GET http://52.83.119.225/download/HJD.Utils/0.0.1-rc0
è­Šć‘Š: Error downloading 'HJD.Utils.0.0.1-rc0' from 'http://52.83.119.225/download/HJD.Utils/0.0.1-rc0'.
An error occurred while sending the request
  Error: ConnectFailure (Connection timed out)
  Connection timed out

And this is the docker log:

docker logs nuget-server
Using specified API key: flybot
Using default  max upload file size is 20M.
Using specified server name: 52.83.119.225
Using specified port: 5333
Using default nginx worker_processes: 1
Using default worker_connections: 65535
Starting Services.
2019/07/08 08:41:08 [warn] 28#28: 65535 worker_connections exceed open file resource limit: 1024
nginx: [warn] 65535 worker_connections exceed open file resource limit: 1024
103.73.96.179 - - [08/Jul/2019:08:41:13 +0000] "PUT /api/v2/package/ HTTP/1.1" 201 30 "-" "NuGet xplat/4.5.0 (Darwin 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64)" "-"
103.73.96.179 - - [08/Jul/2019:08:41:19 +0000] "GET / HTTP/1.1" 200 383 "-" "NuGet Command Line/4.3.0 (Unix 18.5.0.0)" "-"
103.73.96.218 - - [08/Jul/2019:08:41:19 +0000] "GET /Packages(Id='HJD.Utils',Version='0.0.1-rc0') HTTP/1.1" 200 2458 "-" "NuGet Command Line/4.3.0 (Unix 18.5.0.0)" "-"
103.73.96.218 - - [08/Jul/2019:08:41:44 +0000] "GET /Packages(Id='HJD.Utils',Version='0.0.1-rc0') HTTP/1.1" 200 2458 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" "-"
103.73.96.218 - - [08/Jul/2019:08:44:16 +0000] "GET /Packages(Id='HJD.Utils',Version='0.0.1-rc0') HTTP/1.1" 200 2458 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" "-"
103.73.96.218 - - [08/Jul/2019:08:44:31 +0000] "GET /Packages(Id='HJD.Utils',Version='0.0.1-rc0') HTTP/1.1" 200 2458 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" "-"
103.73.96.179 - - [08/Jul/2019:08:45:05 +0000] "GET /download/HJD.Utils/0.0.1-rc0 HTTP/1.1" 200 3707 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" "-"
103.73.96.218 - - [08/Jul/2019:08:52:46 +0000] "GET / HTTP/1.1" 200 383 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" "-"
120.229.60.241 - - [08/Jul/2019:08:58:29 +0000] "GET / HTTP/1.1" 200 383 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" "-"
2019/07/08 08:58:29 [error] 30#30: *17 open() "/var/www/simple-nuget-server/public/favicon.ico" failed (2: No such file or directory), client: 120.229.60.241, server: 52.83.119.225, request: "GET /favicon.ico HTTP/1.1", host: "52.83.119.225:5333", referrer: "http://52.83.119.225:5333/"
120.229.60.241 - - [08/Jul/2019:08:58:29 +0000] "GET /favicon.ico HTTP/1.1" 404 555 "http://52.83.119.225:5333/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" "-"
103.73.96.179 - - [09/Jul/2019:05:33:50 +0000] "GET /Packages(Id='HJD.Utils',Version='0.0.1-rc0') HTTP/1.1" 200 2458 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" "-"

from docker-nuget-server.

idoop avatar idoop commented on September 10, 2024

@rugbbyli Hi. I push package MailKit to your nuget server http://52.83.119.225:5333, and it's Ok.
Then I download it nuget install MailKit -source http://52.83.119.225:5333 -packagesavemode nupkg , It's also success. No errors have occurred.
I think the download failure may be caused by a network problem.
You can also test it.

from docker-nuget-server.

rugbbyli avatar rugbbyli commented on September 10, 2024

Hi @idoop i found where the problem is. When using Nuget from UI mode (such as in visual studio or other ide) and click 'install', it seems that not nuget install command invoke, instead it download the package using url the nuget-server return.

the config was pulling from here

http://52.83.119.225:5333/Packages(Id='HJD.Utils',Version='0.0.1-rc0')

this is the content:

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xml:base="https://www.nuget.org/api/v2/">
			<id>http://52.83.119.225/FindPackagesById</id><title type="text">FindPackagesById</title><updated>2019-07-09T08:06:09Z</updated><link rel="self" title="FindPackagesById" href="FindPackagesById"/><entry><id>https://www.nuget.org/api/v2/Packages(Id='HJD.Utils',Version='0.0.1-rc0')</id><category term="NuGetGallery.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link rel="edit" title="V2FeedPackage" href="Packages(Id='HJD.Utils',Version='0.0.1-rc0')"/><title type="text">HJD.Utils</title><summary type="text"/><updated>2019-07-08T08:41:13Z</updated><author><name>HJD.Utils</name></author><link rel="edit-media" title="V2FeedPackage" href="Packages(Id='HJD.Utils',Version='0.0.1-rc0')/$value"/><content type="application/zip" src="http://52.83.119.225/download/HJD.Utils/0.0.1-rc0"/><m:properties><d:Version>0.0.1-rc0</d:Version><d:NormalizedVersion>0.0.1-rc0</d:NormalizedVersion><d:Copyright/><d:Created m:type="Edm.DateTime">2019-07-08T08:41:13Z</d:Created><d:Dependencies>::netcoreapp20</d:Dependencies><d:Description>Package Description</d:Description><d:DownloadCount m:type="Edm.Int32">1</d:DownloadCount><d:GalleryDetailsUrl>http://52.83.119.225/details/HJD.Utils/0.0.1-rc0</d:GalleryDetailsUrl><d:IconUrl/><d:IsLatestVersion m:type="Edm.Boolean">true</d:IsLatestVersion><d:IsAbsoluteLatestVersion m:type="Edm.Boolean">true</d:IsAbsoluteLatestVersion><d:IsPrerelease m:type="Edm.Boolean">true</d:IsPrerelease><d:Language m:null="true"/><d:Published m:type="Edm.DateTime">2019-07-08T08:41:13Z</d:Published><d:PackageHash>qkiiIxKSY2Dhx+K9irc/lPNxysG+5xDsyiNbO1owuKwm186xXO2rA8T8V8Wo4dU4EIwjFGjhd7msBSQtOP6HVg==</d:PackageHash><d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm><d:PackageSize m:type="Edm.Int64">3707</d:PackageSize><d:ProjectUrl/><d:ReportAbuseUrl/><d:ReleaseNotes/><d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance><d:Summary m:null="true"/><d:Tags/><d:Title/><d:VersionDownloadCount m:type="Edm.Int32">1</d:VersionDownloadCount><d:MinClientVersion/><d:LastEdited m:type="Edm.DateTime" m:null="true"/><d:LicenseUrl/><d:LicenseNames/><d:LicenseReportUrl/></m:properties></entry></feed>

In the config the 'src' item is the download url, and the port is missing, so the problem is here.

As this config is generated by nuget-server, so maybe it is caused by some config missing?

from docker-nuget-server.

idoop avatar idoop commented on September 10, 2024

@rugbbyli Please replace SERVER_NAME such as HOST:PORT.

from docker-nuget-server.

rugbbyli avatar rugbbyli commented on September 10, 2024

@idoop It worked! Thanks again!

from docker-nuget-server.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.