Posted by anarcat on June 23, 2009 at 3:31pm
| Project: | Drush |
| Version: | All-versions-4.x-dev |
| Component: | PM (dl, en, up ...) |
| Category: | bug report |
| Priority: | normal |
| Assigned: | msonnabaum |
| Status: | reviewed & tested by the community |
| Issue tags: | error message |
Issue Summary
I have seen this error a few times now:
File diff-5.x-2.1.tar.gz is corrupt (wrong md5 checksum). [error]... and I am not the only one. The checksum on the release page matches the checksum of the downloaded package for me (see http://drupal.org/node/302307) so I feel this is a drupal.org issue, but I am not certain.
This error does not happen all the time. I redownloaded the package just now and it worked without a flaw. Maybe it's the error message that is wrong?
Comments
#1
Just downloaded that version 10x without error. Maybe your network connection?
#2
As I said, the error come and goes. I've seen at least one other person report this in the #aegir channel. The workaround is to try the command again and sometimes it just works.
Maybe it is the network connexion, but in that case, the error message is still wrong: it's not a checksum error, it's a network error and should be marked as such.
#3
For me the checksum error does not happen - tried the same diff-5.x-2.1 ...
The error message seems right to me: drush dl compares the MD5 sum and sees that it does not match ...
File diff-5.x-2.1.tar.gz is corrupt (wrong md5 checksum). [error]
So it tells you that sth is not right...
Either way it maybe another's bug - of the packaging script or sth...
Most probably it is the network... Maybe the network arround drupal.org ?? :scared
How to reproduce this? Or else marking as fixed.
#4
it would be critical if many people suffer from it or it is proven to be a bug and reproducible...
#5
This just happened to me for the first time. First two tries didn't work, but the third try worked fine. Strange.
#6
any reports and ways to replicate are welcome... who knows whose bug this is...
#7
I receive this error as well. Most modules download with no problem. Other modules require a few attempts. Some modules don't seem to work at all.
#8
I am having the same problem. For me it does appear to be a network issue. The error message should be updated to be more clear depending on the actual issue. Perhaps, "Unable to download module." I think this would help users troubleshoot more effectively.
#9
Just to update what I found...
This is under windows that the problem occurs. I think it may be due to a buggy version of wget. Often it seems to freeze up and the wget process is hung.
#10
Presume this is not a drush issue. Please reopen with more information if needed.
#11
I'm still getting this error on attempting to upgrade my acquia core from 6.14 to 6.17. I'm using the latest drush 3.0 release. The exact error is:
File acquia-drupal-1.2.25.5250-update.tar.gz is corrupt (wrong md5 checksum).
I did upgrade all of my contrib modules with drush without any problems.
#12
I don't think this is a drush issue, but see the comments above for some things it might be.
Unless someone is interested in isolating the problem a bit more, there's nothing we can do here.
#13
Just adding my two cents into this issue...
I've used Drush for several months now, without any problem. Today, I tried to download several modules and received the md5 checksum error. Now, the weird thing is, I haven't changed anything since the last time I was on my hosting provider... Upon receiving the error, I decided to check for a newer version of drush (was on 3.0) and updated to 3.1. Same problem.
Now, the only time I have an issue, is when I attempt to download a dev version of a module. Invoking the drush dl command on a stable / supported release of a module, works just fine but produces the error when I attempt to download a dev version.
The only thing I can think of, is maybe something weird going on with the drupal repository of modules? Heck if I know... I just wish it was working properly :( I've become too spoiled with drush to go back to downloading the tar.gz file and extracting it manually...
#14
today's follies are a result of http://drupal.org/node/850340 ...
drush is uninvolved.
#15
I did a big drush download today. All the D7 modules, which was 950. drush failed with this error on 3 projects. I assumed it would be network and that I would be able to download them later, but they all continued to show the same error.
The three projects were:
block_morelink
commerce_cybersource
genes4all
I've attached a screenshot of the drush -d output if it helps.
#16
I've debugged "commerce_cybersource" project. The problem is that the package information doesn't match the file download.
At the time of writing the d.o package info shows a file size of 12636
http://updates.drupal.org/release-history/commerce_cybersource/7.x
The downloaded file size is 13878 (and is not corrupted AFAICT).
It's attached comparative screenshots. This looks like a package manager issue.
#17
Looked into another, "genes4all".
A d7 release is mentioned here:
http://updates.drupal.org/release-history/genes4all/7.x
But the project page shows no D7 releases
http://drupal.org/node/872874/release
Downloading the tar.gz file referenced in the xml I get an empty 4kb file
http://ftp.drupal.org/files/projects/genes4all-7.x-1.x-dev.tar.gz
So there might be a slightly different package management issue... but there is also the issue that Drush didn't handle the 404 gracefully. It gets a 404 from wget, and then switches to curl and thinks the empty file is success. See attached pic.
#18
Same problem with no matter which module I try to download
#19
Debug statements
#20
Perhaps the first and failed call to wget (503:Service unavailable) let a empty file around and the next call to curl do create a 2nd file but the md5 is done against the former?
If your willing to do your own tests, related code is at
commands/pm/package_handler/wget.inc#21
I tracked the error down to a corrupt working of wget it self. Installed latest update and problem was fixed. This happend on an ubuntu 10.4. Had nothing todo with drush. However when wget fails it indeed does the checksum on the failed download. When trying with curl the download succeeds but the md5 checksum comparison fails.
A possible sollution but this is untested since my wget is working now and I dont know how to simulate it would be to delete whatever is there? Like this:
//On line 56 of commands/pm/package_handler/wget.inc// Download the project.
if (!drush_shell_exec("wget -P . %s", $release['download_link'])) {
drush_op('unlink', $filename);
drush_op('chdir', $olddir);
drush_shell_exec("curl -O %s", $release['download_link']);
}
#22
Can you guys review and test the attached patch? I suspect a lot of those errors we're getting are not actual md5 checksum errors, but rather problems with the small window of time during which the release node exists but the tarball isn't created yet. When this happens, drush will try to download a non-existent file and the md5sum will catch that, but the warning is not quite informative....
The attached patch makes that cleaner.
note that the patch passes tests.
#23
Will be fixed by #1173776: Optionally cache release XML and tarballs for pm-download and pm-updatecode. If that does not get backported, this is a good idea for backport.
#24
sorry but i am new to Drush. thought i would finally try it out; but didnt think it worked for Win7 (although i see now there is better Win support than there used to be).. anyway.
i grabbed Quickstart which is a VirtualBox appliance with Ubuntu, D6, D7, Drush and a ton of other cool goodies. It installed perfectly. I can surf. D7 install works.
I cd to my D7 sites/all/modules and do drush dl [any module]
every module i have tried fails with checksum error. Quickstart came with 4.4. I upgraded to latest dev (simply untarred and dropped over drush intsall??) and drush status now says 4.5-dev
still get checksum errors.
a little surprised if this is simply a network issue as everything else network related i have tried does work fine.
i'll try the patch in #22
#25
hmm.. although i guess patch doesn't help the issue.. simply gives a better error msg :(
#26
i saw #21 - did updates that Ubuntu was suggesting. drush dl now works.. :)
#27
Still have this problem with the latest ctool 7.x dev, will try #21..
Greetings Wappie
#28
On Ubuntu 10.04 on Linode, first time this has ever happened: morning all my themes got the error
drush dl adaptivetheme
File adaptivetheme-7.x-2.1.tar.gz is corrupt (wrong md5 checksum).
for instance ....
UPDATE: osu's site dns issue is going on..flush dns cache
#29
Same here. It didn't work and then it did after 3-4 attempts.
Perhaps a better warning to check wget or DNS issues?
#30
from what I understand people tried this patch and it works. can we factor this in and backport to 4.x already?
#31
I guess this is 4.x-only.