ubuntu@ubuntu:/media/SanDisk Cruzer$ aria2c --log-level=debug -Z -l wrong -c http://widehat.opensuse.org/distribution/11.3-Milestone7/iso/openSUSE-DVD-Build0625-i586.iso http://mirrors.nl.eu.kernel.org/opensuse/distribution/11.3-Milestone7/iso/openSUSE-DVD-Build0625-i586.iso
#1 SIZE:0B/0B CN:1 SPD:0Bs [TOTAL SPD:299.3KiBs]
2010-06-08 01:54:51.700796 ERROR - Exception caught
Exception: [HttpResponseCommand.cc:142] File /media/SanDisk Cruzer/openSUSE-DVD-Build0625-i586.iso is being downloaded by other command.
[#2 SIZE:3,712.8MiB/4,117.8MiB(90%) CN:5 SPD:386.5KiBs ETA:17m52s]^C
2010-06-08 01:54:54.052625 NOTICE - Shutdown sequence commencing... Press Ctrl-C again for emergency shutdown.
debug log
With the ISO at 90% completion, I backed up the .aria file and then commented out the exception check in the version I compiled myself, and completed the download. The sha1 checksum was wrong so whatever you're checking for in there must be important. I put the check back in, restored the .aria backup and the download resumed at 90% as I hoped it would.
The file finished downloading with the correct checksum.
If two URIs point to the same file and you want to download the file using these URIs, then -Z must not be used.
when using -Z like that, it is downloading the file but at the same time trying to write to it w/ the same file. the fact that it is the exact same file shouldn't matter? what if they were two files with different content, but the same name? shouldn't aria2 do something like other apps where it would be filename, filename(2), or some other scheme?
windsor-blue, since this is openSUSE & they use automatic metalinks, try this w/ aria2, it should pick up all the mirrors along with repair information. http://download.opensuse.org/distribution/11.3-Milestone7/iso/openSUSE-DVD-Build0625-i586.iso
The error occurs without -Z.
It seems pretty simple to me each download URL or other input feed provides a range of data to write, those ranges should not overlap and they can be downloaded from multiple places at once. I've not the time to acquire the skills to debug your code but it's a pretty bad error - I had multiple Internet connections available and had aria2 behaved as expected then I could have used ip route to make for very fast download.
I could not reproduce without -Z option.
Are you using ${home}/.aria2/aria2.conf? It may contain force-sequential=true.
rob@bob:~> test -f ${home}/.aria2/aria2.conf || echo no
no
rob@bob:~> # I am willing to try and help debug this problem but I am not a C++ programmer. Do have limited C and GDB.
Thank you for your help.
In the previous response, I was wrong. ${home}/.aria2/aria2.conf should be ${HOME}/.aria2/aria2.conf
To debug this problem, please use latest version 1.9.4 if possible.
First, please try
aria2c http://widehat.opensuse.org/distribution/11.3-Milestone7/iso/openSUSE-DVD-Build0625-i586.iso http://mirrors.nl.eu.kernel.org/opensuse/distribution/11.3-Milestone7/iso/openSUSE-DVD-Build0625-i586.iso --force-sequential=false
If you still encounters error, we need further investigation.
The code to identify -Z is used or not is in createRequestGroupForUri(...) function in download_helper.cc in src directory.
Could you put following line in the beginning of createRequestGroupForUri() and see what it prints?
std::cout << "PREF_FORCE_SEQUENTIAL=" << option->get(PREF_FORCE_SEQUENTIAL) << std::endl;