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

file DOWNLOAD HASH mismatch #153

Closed
saikatxdas opened this issue Dec 14, 2017 · 16 comments
Closed

file DOWNLOAD HASH mismatch #153

saikatxdas opened this issue Dec 14, 2017 · 16 comments

Comments

@saikatxdas
Copy link

I am trying to install the new version CRPropa3-3.1. While configuring from ccmake .. the download fails for data.tar.gz with the following error:

 CMake Error at CMakeLists.txt:264 (file):
  file DOWNLOAD HASH mismatch

 for file: [/home/saikat/CRPropa3-3.1/build/data.tar.gz]
   expected hash: [44aa223904fd896887672b32cead2d65]
     actual hash: [d41d8cd98f00b204e9800998ecf8427e]
          status: [7;"Couldn't connect to server"]

But when I try to install the previous version again it works fine. Are these data repositories removed? Also, I cannot access the crpropa.desy.de page from where I can download the tarball of the data file.

@adundovi
Copy link
Member

Hi Saikat. At the moment it seems that the crpropa.desy.de site is down (we are looking what is going on), but we already switched to a new location for the data files here. If you have updated your source CMake should already download the data file from the new location. Do you have the latest version and did you clear the cache in the build directory?

@saikatxdas
Copy link
Author

Thank you for the prompt reply. Yes, I have the latest version and have cleared the cache in the build directory. I am running the ccmake .. command after creating the build directory and this is the error that I get. Cmakefiles.txt has the location for the data file written in it, and it is trying to download data.tar.gz file from the same location. It seems the address provided in the make file is unreachable due to some reason.

But when I try to install the previous version (CRPropa3) and not CRPropa3-3.1, the data file is downloaded without any problem.

@saikatxdas
Copy link
Author

Now, none of the versions can be installed because cmake fails while downloading the data file because of Hash Mismatch

@TobiasWinchen
Copy link
Member

I just added an option to disable the download (commit 9491795). If you have a data file, please copy it to the corresponding build folder and use
Using cmake .. -DDOWNLOAD_DATA=OFF to compile CRpropa

@adundovi
Copy link
Member

adundovi commented Dec 15, 2017

This could also be a cmake issue. Which version of cmake do you have? I use cmake version 3.9.1 and the data download works fine, also the checksum.

You could verify the checksum manually with md5sum data.tar.gz and that will show you if the file is incorrectly downloaded or your version of cmake is doing something wrong.

@saikatxdas
Copy link
Author

@TobiasWinchen Yes, I have been compiling CRPropa by this procedure already. I have already disabled the download option and placed the data file manually. This way it works! But is there a problem because of which there is a Hash Mismatch

@saikatxdas
Copy link
Author

saikatxdas commented Dec 15, 2017

@adundovi I am using cmake version 3.5.1. Is that a problem?

With md5sum data.tar.gz the output is
e98d1284000afc97bb5d828243acf0e9

@adundovi
Copy link
Member

That is strange, mine is 44aa223904fd896887672b32cead2d65 data.tar.gz. And the same hash is also here. How did you download it? Did you use HTTPS protocol?

@saikatxdas
Copy link
Author

saikatxdas commented Dec 15, 2017

Yes, when I download the data file manually the md5sum is the one which I mentioned before. Whereas the one provided in the directory is exactly what you just said. They are not matching.

I have downloaded the data from https://www.desy.de/~crpropa/data/interaction_data/ by simply clicking on it. Am I doing something wrong?

@TobiasWinchen
Copy link
Member

Could you please just repeat the download and check the md5sum again? I manually downloaded the file using Firefox and received it with the expected md5sum. What you could also try is downloading the file with wget, curl or a different browser.

@adundovi
Copy link
Member

A different hash means that the file has been altered somehow in transition. Is could be due to browser, firewall, router, internet provider, DESY server... or just by some other network fluctuations / pure accident.

I can confirm that something is strange:

  • md5sum on the server: 44aa223904fd896887672b32cead2d65
  • md5sum when I download it with cmake: 44aa223904fd896887672b32cead2d65
  • md5sum when I download it with curl: 44aa223904fd896887672b32cead2d65
  • md5sum when I download it with wget: e98d1284000afc97bb5d828243acf0e9

Commands:
curl https://www.desy.de/~crpropa/data/interaction_data/data.tar.gz > data.tar.gz
wget https://www.desy.de/~crpropa/data/interaction_data/data.tar.gz

@adundovi
Copy link
Member

OK, I think I know what the issue is. The DESY server is misconfigured. It automatically uncompresses a gzip stream without checking its MIME type. Hence, when you download it with wget (or some other programs) you will get the uncompressed file (~112MB). This should not happen. I'll report the problem to the DESY IT office.

@saikatxdas
Copy link
Author

When I download the data file with wget or curl, I get the expected md5sum and the Hash matches. But while configuring CRPropa using ccmake .. the md5sum is different. So is there a problem with cmake? Also, the size of the data file varies when I download it just by clicking (~110 MB) compared to by using wget/curl (~45 MB)

@saikatxdas
Copy link
Author

@adundovi Okay then. Thank you very very much for the spontaneous help. Will check on again with this later then.
Once again, thank you

Saikat

@TobiasWinchen
Copy link
Member

I assume this issue is fixed by now? If not. please reopen.

@adundovi
Copy link
Member

Yes, I've tested it and it seems fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants