-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Getting several errorCode=8 Invalid range header results #1344
Comments
Encountered the same problem. But a modified version of aria2 was found in a software called PanDownload, which does not have this problem. However, the author of the software did not disclose the source code of the modified aria2, which violated the GPL license. |
I get the same error sometimes, but not always, when using aria2 as the external downloader to youtube-dl for videos on YouTube. My logs, etc would show the equivalent to those above. |
I get the same problem, from time to time.... But when it happens it breaks my whole logic afterwards. The log info is the same as described above. Do you have any suggestion if some of the aria2c options from here https://aria2.github.io/manual/en/html/aria2c.html will maybe solve this problem? Any help is appreciated |
I'm seeing the same thing:
|
same problem, first request is for the whole file, response:
Something is missing, there is no "Accept-Ranges" header returned! second request for the second half ignores this fact and plows on:
and the response doesnt match
comparing same file in a browser, browser actually sends
subsequent requests also include If-Range: "2888719043" Aria2 should probably start sending "Range: bytes=0-" with first request, and "If-Range" |
CUID#369 - Download aborted. URI=https://209zy.youkutv.cc/2020/12/02/bL5esVcJCK0BaZ97/out205.ts |
Same problem. Now that two and a half years have passed, doesn't seem this problem is about to be fixed. |
lighttpd 1.4.28 was released Aug 2010, almost 11 years ago. Please use the most recent lighttpd 1.4.59, which has better Range support than does lighttpd 1.4.28. |
This is probably a good idea to avoid other issues @gstrauss, but I doubt for example YouTube would consider moving from Google's own ESF server to the most recent lighttpd and unless Google's proprietary software would secretly be an outdated version of lighttpd, that does seem extremely unlikely to have any relevance to this aria2 issue. |
@gstrauss i demonstrated the issue with an nginx 1.16.1 server. this isn't limited to old versions of lighttpd. |
I have reproduced the issue with aira2c build from the master branch. |
where do I download this PanDownload app? can't find it in google |
You probably can't because it violated their silly little loicense, because fuck us who experience this issue. |
bug still happens 🙄 |
aria2 does not handle Range responses that are not an exact match to what is sent in the request. Recovering properly can be difficult when requests have been pipelined. (Using HTTP/2 has much better control recovering than HTTP/1.1 using pipelining.) Modifying Here is a completely UNTESTED guess. I am not a developer of aria2. caveat emptor. If you test this, make backups and do not test on important files! This code is a kludge and makes a modification inside a function beginning "is...", which is not expected from the function name and is generally not considered good practice.
The above (commented out line) would VERY LIKELY corrupt files when the start of the range in the response does not match the exact start of the range requested because the write position in |
Still happens with 1.36.0 from time to time. I have a Linux server running nginx as a file server, when downloading from it and the task is almost finished, aria2 fails occasionally:
But if I restart the task, it will finish soon. |
I had the issue with vanilla aria2 (1.36.0-1) from Ubuntu 22.04. After applying the patch #1869 and rebuilding the package, I was able to get 100+GB zip file without errors (with 10 threads and 1MB chunks). |
Hi would you mind sharing the compiled version for windows? |
@Maherz123 , Sorry I have no windows computer neither any experience in building things in windows. You could try dpkg-buldpackage in wsl2 in windows... |
It's ok I already found the version with this fix |
@Maherz123 Where did you find the version with fix applied? |
I see the same error ( |
You maybe visiting the cloudflare website, just turn off the cache. |
Same error today, torrent from archive.org, I did cancel with
Aria does not support archive.org torrents or what?
$ pacman -Qi aria2
Name : aria2
Version : 1.37.0-1
Description : Download utility that supports HTTP(S), FTP, BitTorrent, and Metalink
Architecture : x86_64
URL : https://aria2.github.io
Licenses : GPL
Groups : None
Provides : None
Depends On : gnutls libxml2 sqlite c-ares ca-certificates libssh2
Optional Deps : None
Required By : None
Optional For : yt-dlp
Conflicts With : None
Replaces : None
Installed Size : 5.34 MiB
Packager : Felix Yan <felixonmars@archlinux.org>
Build Date : Tue 21 Nov 2023 06:18:23 AM -03
Install Date : Wed 22 Nov 2023 10:32:40 AM -03
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
03/18 09:29:27 [ERROR] CUID#20 - Download aborted. URI=https://archive.org/download/shiki-jitsu-2000-eng-subs-hd/.____padding_file/0
Exception: [AbstractCommand.cc:351] errorCode=8 URI=https://ia902608.us.archive.org/33/items/shiki-jitsu-2000-eng-subs-hd/.____padding_file/0
-> [HttpResponse.cc:81] errorCode=8 Invalid range header. Request: 0-1442461/1442462, Response: 0-1442461/8388608
03/18 09:29:27 [ERROR] CUID#27 - Download aborted. URI=http://ia902608.us.archive.org/33/items/shiki-jitsu-2000-eng-subs-hd/.____padding_file/0
Exception: [AbstractCommand.cc:351] errorCode=8 URI=http://ia902608.us.archive.org/33/items/shiki-jitsu-2000-eng-subs-hd/.____padding_file/0
-> [HttpResponse.cc:81] errorCode=8 Invalid range header. Request: 0-1442461/1442462, Response: 0-1442461/8388608 distro: Arch Linux x86_64
kernel: 6.1.52-1-lts
shell: bash 5.2.26
term: tmux
cpu: Intel i7-4790 (8) @ 3.600GHz
gpu: AMD ATI Radeon RX 470/480/570/570X/580/580X/590 |
can you tell me how to do it. Noob here! |
If it's your own site, turn off caching. |
@beck-8 Sadly not mine. |
@tatsuhiro-t this issue seems to have gotten buried. aria2 has a deficient and incorrect implementation of HTTP Range. I posted a partial patch above in #1344 (comment) Please review. The patch I posted lists some limitations documented, and unfortunately, those limitations are what recent posters have hit. Changes are likely needed elsewhere to fix aria2 deficient HTTP Range handling. |
If anyone needs the windows build for this patch, I built it using github actions. Download it at the artifacts section. |
I have been using aria2 to download several large files (90-18Mb) from a server, and every time a few files return an error like the one below:
The command issued to download is:
I have tried re-downloading the files with error by limiting aria2c to a single connection and segment (-x 1 -s 1 -j 1), have tried using http instead of https, and have enabled / disabled -c and --auto-file-renaming=false, to no avail.
I am attaching two txt files, one with the pided terminal output and the other a logfile generated by aria2. My script loops over three different aria2c calls with different server API parameters, and the log file pertains to the first call. But the errors happen in every call, for a few files. Bear in mind that this was a re-run of the script, so aria skipped over the complete files, but was still not able to finish downloading the files that returned an error.
Any help is appreciated. Thank you.
output.txt
log.txt
The text was updated successfully, but these errors were encountered: