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

Mods fail to download, fail to error - indefinite wait for interrupt. #1817

Closed
Blu3wolf opened this issue Jul 7, 2016 · 16 comments · Fixed by #3054
Closed

Mods fail to download, fail to error - indefinite wait for interrupt. #1817

Blu3wolf opened this issue Jul 7, 2016 · 16 comments · Fixed by #3054
Labels
Network Issues affecting internet connections of CKAN

Comments

@Blu3wolf
Copy link

Blu3wolf commented Jul 7, 2016

CKAN 0.18.0
Windows 7 SP1 x64
On installing a list of mods, partway through downloading, the download stops indefinitely. No error displayed, until clicking 'Cancel', when the following errors were displayed (sequentially).

Failed to download "https://github.com/Crzyrndm/B9-PWings-Fork/releases/download/0.40.7/B9-PWings-Fork.v0.40.7.zip" - error: An exception occurred during a WebClient request.

Failed to download "https://github.com/jrossignol/ContractPack-AnomalySurveyor/releases/download/1.6.0/ContractPack-AnomalySurveyor_1.6.0.zip" - error: The remote server returned an error: (403) Forbidden.

Failed to download "https://github.com/DaMichel/KerbalFlightData/releases/download/R21/KerbalFlightDataR21.zip" - error: The remote server returned an error: (403) Forbidden.

Ideally, under this circumstance it would be preferable to display an error message, rather than hanging indefinitely.

The list of mods was:

About to install...

  • Advanced Jet Engine v2.7.2
  • Asteroid Day 1.1.3
  • B9 Aerospace Procedural Wings - Fork 1:0.40.7
  • Community Tech Tree 1:2.4
  • Contract Pack: Anomaly Surveyor 1.6.0
  • Filter Extensions - Plugin 2.6.0.1
  • Filter Extensions - Stock Filter Rework 2.6.0.1
  • Hide Empty Tech Tree Nodes 0.4
  • IndicatorLights 0.10
  • Kerbal Construction Time 1.3.4
  • Kerbal Flight Data R21
  • Kerbal NRAP - Procedural Test Weights 1.5.1.1
  • Kerbal Inventory System 1.2.12.0
  • Near Future Construction 0.6.4(cached)
  • Near Future Electrical 0.7.5(cached)
  • Near Future Propulsion 0.7.3(cached)
  • Near Future Solar 0.6.2(cached)
  • Procedural Fairings v3.17
  • 6 Seat Mk3 Cockpit 1.1
  • Filter Extensions - Default Configuration 2.6.0.1
  • Solver Engines plugin v2.3
  • MagiCore 1.1.1
  • Near Future Electrical Core 0.7.5(cached)
  • Near Future Solar Core 0.6.2(cached)
@ayan4m1 ayan4m1 added the Support Issues that are support requests label Aug 3, 2016
@HebaruSan
Copy link
Member

GitHub sends 403 statuses when you're being throttled. Would be nice to support GitHub tokens, but I'm not sure you can use those outside the API.

@techman83
Copy link
Member

NetKAN uses a token to avoid being throttled. So the codebase has support for it somewhere.

@Blu3wolf
Copy link
Author

Blu3wolf commented Dec 3, 2017

Huh. Wondered why I was getting notifications for this Issue. Until I noticed that apparently, Im the author of it. Suffice to say, I dont have access to the specific data set to recreate this error at present. I might be able to try, but either way the Issue isnt a problem for me anymore.

@HebaruSan
Copy link
Member

HebaruSan commented Dec 7, 2017

Some corroboration that it's server-side, and that we're not the only ones to have this problem...

aws/aws-sdk-js#312 (comment) :

This is not an issue with the SDK but rather with general usage of S3. If you send many parallel requests, eventually S3 will throttle your access and kill your connection.

CKAN, of course, is built to "send many parallel requests," and that's precisely when users report these 403 statuses (and no user who says "it works fine if I download it separately" ever says "and I make sure to start 10+ downloads in parallel."). If you use curl -i to get the headers for a GitHub download, it turns out they're on S3 (excerpted for brevity):

Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/93901901/1b301c60-b8e6-11e7-96e4-b77af7075d32?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20171207%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171207T230941Z&X-Amz-Expires=300&X-Amz-Signature=8f32de5d1985f6bce0ac1bdf5f07ceb085143b5ed74d3b4f2e6a6f393318e59e&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DAVP.v.3.62.zip&response-content-type=application%2Foctet-stream

<html><body>You are being <a href="https://github-production-release-asset-2e65be.s3.amazonaws.com/93901901/1b301c60-b8e6-11e7-96e4-b77af7075d32?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20171207%2Fus-east-1%2Fs3%2Faws4_request&amp;X-Amz-Date=20171207T230941Z&amp;X-Amz-Expires=300&amp;X-Amz-Signature=8f32de5d1985f6bce0ac1bdf5f07ceb085143b5ed74d3b4f2e6a6f393318e59e&amp;X-Amz-SignedHeaders=host&amp;actor_id=0&amp;response-content-disposition=attachment%3B%20filename%3DAVP.v.3.62.zip&amp;response-content-type=application%2Foctet-stream">redirected</a>.</body></html>

I assume this means GitHub won't reply to my email asking about download throttling, because they don't host their own downloads and so don't know how they work. GitHub did reply, but the discussion is inconclusive so far. I'll post a fresh update if we reach a useful conclusion.

Also some really interesting (but probably unrelated) S3-related network debugging here:

https://www.snellman.net/blog/archive/2017-07-20-s3-mystery/

@HebaruSan
Copy link
Member

And some counter-evidence; I ran a script to fetch 21 big mod releases from GitHub in parallel, and it works just fine, with no 403 errors, even with retries turned off. I got a sustained 2 MB/s download rate across all of them, which is about the max for my connection.

So reports of S3 server throttling notwithstanding, WebClient must be doing something that wget doesn't do to trigger this.

@HebaruSan
Copy link
Member

@techman83, Netkan uses the token to access the API, but as far as I can tell it does not use it for downloads, which is what we would need to fix the client. Netkan's downloads are done by DownloadAttributeTransformer and CachingHttpService, which do not have any github-specific auth token logic.

@techman83
Copy link
Member

Oh, interesting. Guess we get by with caching. There is a job to clean up cache files older than 30 days, so downloads for all the github ones are likely to be well spread out.

@HebaruSan
Copy link
Member

I think it also helps that the bot only downloads one file at a time. I've always seen the 403 errors with many GitHub downloads happening in parallel.

@HebaruSan HebaruSan added the Network Issues affecting internet connections of CKAN label Dec 16, 2017
@pjf pjf removed Network Issues affecting internet connections of CKAN Support Issues that are support requests labels Dec 24, 2017
@HebaruSan
Copy link
Member

Hey! We're using this one!

@HebaruSan HebaruSan reopened this Dec 24, 2017
@HebaruSan HebaruSan added the Network Issues affecting internet connections of CKAN label Dec 24, 2017
@KSP-CKAN KSP-CKAN deleted a comment from netkan-bot Dec 24, 2017
@HebaruSan
Copy link
Member

HebaruSan commented Feb 23, 2018

@Blu3wolf , this stuff may be improved a bit in the 1.24 release, which everyone is effectively forced to install now due to #2293. Specifically:

  • Better error messages on failed downloads
  • App doesn't crash on failed downloads
  • Easier to retry failed downloads
  • Ability to fallback to Internet Archive downloads for open source mods

We still have an ongoing fix plan at #2210, involving migration of metadata URLs to use the GitHub API and auth tokens, but I'd be interested to know whether the user experience is better in general with the changes currently in place.

@ryanwaldron
Copy link

ryanwaldron commented Mar 30, 2018

I am seeing a similar issue. Everything fails to download. When I first installed, I could not even get the modlist to load, that was fixed by installing the libcurl4-openssl-dev package. Being that the app can now download the modlist, it obviously has what it needs to download a file from the net to the machine....not sure why all the mod downloads fail.

OS: Linux Mint 18
CKAN version v1.24.1+9712f94116e8
Mono Version: 5.10.1.20

Log:

141413348 [Threadpool worker] WARN CKAN.Curl (null) - Curl environment not pre-initialised, performing non-threadsafe init.
141685587 [1] ERROR CKAN.ErrorDialog (null) - One or more downloads were unsuccessful:

Error downloading ABCORS 0.5.0: An exception occurred during a WebClient request.
Error downloading AdjustableModPanel 1:1.4: An exception occurred during a WebClient request.
Error downloading AGExt 2.3.3: An exception occurred during a WebClient request.
Error downloading AlcubierreStandalone 0.10.0.0: An exception occurred during a WebClient request.
Error downloading AntaresCygnus 1:v1.3: An exception occurred during a WebClient request.
Error downloading AntennaHelper v1.0.1: An exception occurred during a WebClient request.
Error downloading AugmentedReality 0.2.1.3: An exception occurred during a WebClient request.
Error downloading B9PartSwitch v2.2.0: An exception occurred during a WebClient request.
Error downloading BargainRocketsCont 1.2.2.1: An exception occurred during a WebClient request.
Error downloading BasicOrbit 8.0: An exception occurred during a WebClient request.
Error downloading BetterBurnTime 1.6.1: An exception occurred during a WebClient request.
Error downloading BetterScienceLabsContinued 0.1.9.3: An exception occurred during a WebClient request.
Error downloading ModularLaunchPads 1.01: An exception occurred during a WebClient request.
Error downloading SixCrewScienceLab 1.1: An exception occurred during a WebClient request.
Error downloading SixSeatMk3cockpit 1.1: An exception occurred during a WebClient request.
Error downloading Toolbar 1.7.17.5: An exception occurred during a WebClient request.
Error downloading JanitorsCloset 0.3.4: An exception occurred during a WebClient request.
Error downloading KSP-AVC 1.2.0.1: An exception occurred during a WebClient request.
Error downloading ModuleManager 3.0.6: An exception occurred during a WebClient request.
Error downloading ClickThroughBlocker 0.1.6.1: An exception occurred during a WebClient request.
Error downloading ToolbarController 1:0.1.5.7: An exception occurred during a WebClient request.
Error downloading SpacetuxSA 0.3.12.3: An exception occurred during a WebClient request.

141846971 [1] ERROR CKAN.ErrorDialog (null) - One or more downloads were unsuccessful:

Error downloading ABCORS 0.5.0: An exception occurred during a WebClient request.
Error downloading AdjustableModPanel 1:1.4: An exception occurred during a WebClient request.
Error downloading AGExt 2.3.3: An exception occurred during a WebClient request.
Error downloading AlcubierreStandalone 0.10.0.0: An exception occurred during a WebClient request.
Error downloading AntaresCygnus 1:v1.3: An exception occurred during a WebClient request.
Error downloading AntennaHelper v1.0.1: An exception occurred during a WebClient request.
Error downloading AugmentedReality 0.2.1.3: An exception occurred during a WebClient request.
Error downloading B9PartSwitch v2.2.0: An exception occurred during a WebClient request.
Error downloading BargainRocketsCont 1.2.2.1: An exception occurred during a WebClient request.
Error downloading BasicOrbit 8.0: An exception occurred during a WebClient request.
Error downloading BetterBurnTime 1.6.1: An exception occurred during a WebClient request.
Error downloading BetterScienceLabsContinued 0.1.9.3: An exception occurred during a WebClient request.
Error downloading ModularLaunchPads 1.01: An exception occurred during a WebClient request.
Error downloading SixCrewScienceLab 1.1: An exception occurred during a WebClient request.
Error downloading SixSeatMk3cockpit 1.1: An exception occurred during a WebClient request.
Error downloading Toolbar 1.7.17.5: An exception occurred during a WebClient request.
Error downloading JanitorsCloset 0.3.4: An exception occurred during a WebClient request.
Error downloading KSP-AVC 1.2.0.1: An exception occurred during a WebClient request.
Error downloading ModuleManager 3.0.6: An exception occurred during a WebClient request.
Error downloading ClickThroughBlocker 0.1.6.1: An exception occurred during a WebClient request.
Error downloading ToolbarController 1:0.1.5.7: An exception occurred during a WebClient request.
Error downloading SpacetuxSA 0.3.12.3: An exception occurred during a WebClient request.

@HebaruSan
Copy link
Member

@ryanwaldron, do you also have mono-complete and ca-certificates-mono? The Ubuntu wiki page is probably the closest thing we have currently to a Mint help page.

@ryanwaldron
Copy link

ryanwaldron commented Mar 30, 2018

All that was required to be added was libmono-system-net-http-webrequest4.0-cil

Below is the list of Mono packages installed on my machine and the client now seems to be working. Installing mono-complete seems to want to install half of the internet on my machine, I run a pretty minimalist OS, so the required package set is better for me. I will share on the Wiki as well.

ca-certificates-mono/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-accessibility4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-addins-gui0.2-cil/stable,stable,now 1.1-0xamarin1 all [installed]
libmono-addins0.2-cil/stable,stable,now 1.1-0xamarin1 all [installed]
libmono-cairo4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-corlib4.5-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-data-tds4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-i18n-west4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-i18n4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-ldap4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-microsoft-csharp4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-posix4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-security4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-sharpzip4.84-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-sqlite4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-componentmodel-dataannotations4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-configuration4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-core4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-data4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-design4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-drawing4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-enterpriseservices4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-ldap4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-net-http-webrequest4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-net-http4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed,automatic]
libmono-system-numerics4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-runtime-serialization-formatters-soap4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-runtime-serialization4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-security4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-servicemodel-internals0.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-transactions4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-web-applicationservices4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-web-services4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-web4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-windows-forms4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-xml-linq4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system-xml4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-system4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-webbrowser4.0-cil/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
libmono-zeroconf1.0-cil/xenial,xenial,now 0.9.0-6 all [installed]
mono-4.0-gac/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
mono-gac/stable,stable,now 5.10.1.20-0xamarin1+debian7b1 all [installed]
mono-runtime/stable,now 5.10.1.20-0xamarin1+debian7b1 amd64 [installed]
mono-runtime-common/stable,now 5.10.1.20-0xamarin1+debian7b1 amd64 [installed]
mono-runtime-sgen/stable,now 5.10.1.20-0xamarin1+debian7b1 amd64 [installed]

@HebaruSan
Copy link
Member

You could try just the packages listed as dependencies in the .deb file, but only mono-complete is fully tested/supported/confirmed to work:

Depends: mono-runtime (>=5.0), ca-certificates-mono, libmono-microsoft-csharp4.0-cil, liblog4net1.2-cil, libnewtonsoft-json5.0-cil

@ryanwaldron

This comment has been minimized.

@HebaruSan
Copy link
Member

HebaruSan commented Mar 30, 2018

@ryanwaldron, can you please start a new issue for your problem? The OP here isn't about missing Linux dependencies.

EDIT: And if you want to preserve any of your comments here, copy/paste them to the new issue. I'll most likely be purging them to reduce confusion over what this issue is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Network Issues affecting internet connections of CKAN
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants