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

Checksum mismatch installing dotnet-sdk-3.1 from CentOS 7 Linux repository in some regions (mirror issue) #4236

Closed
dagood opened this issue Feb 7, 2020 · 6 comments
Labels
area-setup Issues related to installing .NET Core

Comments

@dagood
Copy link
Member

dagood commented Feb 7, 2020

@dagood Thanks for the response. I am following the exact instructions as per:
https://docs.microsoft.com/en-ie/dotnet/core/install/linux-package-manager-centos7

Specifically:

#> rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
#> yum install dotnet-sdk-3.1

The exact output of the above commands are:

#> rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
Retrieving https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:packages-microsoft-prod-1.0-1    ################################# [100%]

#> yum install dotnet-sdk-3.1
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                                                                                                      | 2.4 kB  00:00:00
packages-microsoft-com-prod                                                                                                                     | 2.9 kB  00:00:00
packages-microsoft-com-prod/primary_db                                                                                                          | 114 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package dotnet-sdk-3.1.x86_64 0:3.1.101-1 will be installed
--> Processing Dependency: netstandard-targeting-pack-2.1 >= 2.1.0 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Processing Dependency: dotnet-targeting-pack-3.1 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Processing Dependency: dotnet-apphost-pack-3.1 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Processing Dependency: dotnet-runtime-3.1 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Processing Dependency: aspnetcore-targeting-pack-3.1 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Processing Dependency: aspnetcore-runtime-3.1 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Running transaction check
---> Package aspnetcore-runtime-3.1.x86_64 0:3.1.1-1 will be installed
---> Package aspnetcore-targeting-pack-3.1.x86_64 0:3.1.0-1 will be installed
---> Package dotnet-apphost-pack-3.1.x86_64 0:3.1.1-1 will be installed
---> Package dotnet-runtime-3.1.x86_64 0:3.1.1-1 will be installed
--> Processing Dependency: dotnet-runtime-deps-3.1 >= 3.1.1 for package: dotnet-runtime-3.1-3.1.1-1.x86_64
--> Processing Dependency: dotnet-hostfxr-3.1 >= 3.1.1 for package: dotnet-runtime-3.1-3.1.1-1.x86_64
---> Package dotnet-targeting-pack-3.1.x86_64 0:3.1.0-1 will be installed
---> Package netstandard-targeting-pack-2.1.x86_64 0:2.1.0-1 will be installed
--> Running transaction check
---> Package dotnet-hostfxr-3.1.x86_64 0:3.1.1-1 will be installed
--> Processing Dependency: dotnet-host >= 3.1.1 for package: dotnet-hostfxr-3.1-3.1.1-1.x86_64
---> Package dotnet-runtime-deps-3.1.x86_64 0:3.1.1-1 will be installed
--> Running transaction check
---> Package dotnet-host.x86_64 0:3.1.1-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================
 Package                                             Arch                        Version                        Repository                                        Size
=======================================================================================================================================================================
Installing:
 dotnet-sdk-3.1                                      x86_64                      3.1.101-1                      packages-microsoft-com-prod                       63 M
Installing for dependencies:
 aspnetcore-runtime-3.1                              x86_64                      3.1.1-1                        packages-microsoft-com-prod                      7.5 M
 aspnetcore-targeting-pack-3.1                       x86_64                      3.1.0-1                        packages-microsoft-com-prod                      1.4 M
 dotnet-apphost-pack-3.1                             x86_64                      3.1.1-1                        packages-microsoft-com-prod                       67 k
 dotnet-host                                         x86_64                      3.1.1-1                        packages-microsoft-com-prod                       39 k
 dotnet-hostfxr-3.1                                  x86_64                      3.1.1-1                        packages-microsoft-com-prod                      148 k
 dotnet-runtime-3.1                                  x86_64                      3.1.1-1                        packages-microsoft-com-prod                       29 M
 dotnet-runtime-deps-3.1                             x86_64                      3.1.1-1                        packages-microsoft-com-prod                      2.8 k
 dotnet-targeting-pack-3.1                           x86_64                      3.1.0-1                        packages-microsoft-com-prod                      3.4 M
 netstandard-targeting-pack-2.1                      x86_64                      2.1.0-1                        packages-microsoft-com-prod                      2.1 M

Transaction Summary
=======================================================================================================================================================================
Install  1 Package (+9 Dependent packages)

Total download size: 107 M
Installed size: 107 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/2/packages-microsoft-com-prod/packages/aspnetcore-targeting-pack-3.1.0.rpm: Header V4 RSA/SHA256 Signature, key ID be1229cf: NOKEY
Public key for aspnetcore-targeting-pack-3.1.0.rpm is not installed
(1/10): aspnetcore-targeting-pack-3.1.0.rpm                                                                                                     | 1.4 MB  00:00:00
(2/10): aspnetcore-runtime-3.1.1-x64.rpm                                                                                                        | 7.5 MB  00:00:00
(3/10): dotnet-host-3.1.1-x64.rpm                                                                                                               |  39 kB  00:00:00
(4/10): dotnet-apphost-pack-3.1.1-x64.rpm                                                                                                       |  67 kB  00:00:00
(5/10): dotnet-hostfxr-3.1.1-x64.rpm                                                                                                            | 148 kB  00:00:00
(6/10): dotnet-runtime-deps-3.1.1-centos.7-x64.rpm                                                                                              | 2.8 kB  00:00:00
(7/10): dotnet-runtime-3.1.1-x64.rpm                                                                                                            |  29 MB  00:00:00
(8/10): dotnet-targeting-pack-3.1.0-x64.rpm                                                                                                     | 3.4 MB  00:00:00
netstandard-targeting-pack-2.1 FAILED
https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=packages-microsoft-com-prod clean metadata
Trying other mirror.
(9/10): dotnet-sdk-3.1.101-x64.rpm                                                                                                              |  63 MB  00:00:03


Error downloading packages:
  netstandard-targeting-pack-2.1-2.1.0-1.x86_64: [Errno 256] No more mirrors to try.
  • The SHA 256 checksum of the repo RPM is: 35f08f2b53ef355e07037e3e7b9660e479a64a605691ec96666b401e31a0f004

...per commands:

#> wget https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
--2020-02-07 11:58:32--  https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
Resolving packages.microsoft.com (packages.microsoft.com)... 13.74.252.37
Connecting to packages.microsoft.com (packages.microsoft.com)|13.74.252.37|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1999 (2.0K) [application/x-redhat-package-manager]
Saving to: ‘packages-microsoft-prod.rpm’

100%[=============================================================================================================================>] 1,999       --.-K/s   in 0s

2020-02-07 11:58:32 (252 MB/s) - ‘packages-microsoft-prod.rpm’ saved [1999/1999]

#> sha256sum packages-microsoft-prod.rpm
35f08f2b53ef355e07037e3e7b9660e479a64a605691ec96666b401e31a0f004  packages-microsoft-prod.rpm
  • The SHA 256 of the actual netstandard-targeting-pack-2.1.0-x64 RPM file is: 45e199caf1151a750d11d9c5c7669d6e23d8dbb33da54d1d90bde55745996480 as per:
#> wget https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm
--2020-02-07 12:07:22--  https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm
Resolving packages.microsoft.com (packages.microsoft.com)... 13.74.252.37
Connecting to packages.microsoft.com (packages.microsoft.com)|13.74.252.37|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2201944 (2.1M) [application/x-redhat-package-manager]
Saving to: ‘netstandard-targeting-pack-2.1.0-x64.rpm’

100%[=============================================================================================================================>] 2,201,944   --.-K/s   in 0.04s

2020-02-07 12:07:22 (47.5 MB/s) - ‘netstandard-targeting-pack-2.1.0-x64.rpm’ saved [2201944/2201944]

#> sha256sum netstandard-targeting-pack-2.1.0-x64.rpm
45e199caf1151a750d11d9c5c7669d6e23d8dbb33da54d1d90bde55745996480  netstandard-targeting-pack-2.1.0-x64.rpm

No proxies, firewall or Docker containers involved. Just a direct Yum download from the Internet.

Thanks.

Originally posted by @thecosmicfrog in #3853 (comment)

@dagood
Copy link
Member Author

dagood commented Feb 7, 2020

@thecosmicfrog thanks for the extra detail, copied it out to a new issue because the earlier one was resolved, and this doesn't repro for me on CentOS 7. Taking a look vs. the output of my install commands to see if I can spot any differences.

@dagood dagood added the area-setup Issues related to installing .NET Core label Feb 7, 2020
@dagood
Copy link
Member Author

dagood commented Feb 7, 2020

It looks like the mirror you're being routed to is broken! I get a different IP address 13.91.48.226 vs. your 13.74.252.37:

#> wget https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm
--2020-02-07 16:43:41--  https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm
Resolving packages.microsoft.com (packages.microsoft.com)... 13.91.48.226
Connecting to packages.microsoft.com (packages.microsoft.com)|13.91.48.226|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2201944 (2.1M) [application/x-redhat-package-manager]
Saving to: 'netstandard-targeting-pack-2.1.0-x64.rpm'

100%[==============================================================================>] 2,201,944   5.07MB/s   in 0.4s

2020-02-07 16:43:42 (5.07 MB/s) - 'netstandard-targeting-pack-2.1.0-x64.rpm' saved [2201944/2201944]

#> sha256sum netstandard-targeting-pack-2.1.0-x64.rpm
fa194a8c12913dcec85c8d24bfc91686a7b93128b4c05346df16e2c641e2ba41  netstandard-targeting-pack-2.1.0-x64.rpm

If I use 13.74.252.37 manually, I reproduce your results:

[root@e2cb5e3b3a62 /]# wget http://13.74.252.37/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm
--2020-02-07 16:45:22--  http://13.74.252.37/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm
Connecting to 13.74.252.37:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2201944 (2.1M) [application/x-redhat-package-manager]
Saving to: 'netstandard-targeting-pack-2.1.0-x64.rpm'

100%[==============================================================================>] 2,201,944    369KB/s   in 7.0s

2020-02-07 16:45:30 (307 KB/s) - 'netstandard-targeting-pack-2.1.0-x64.rpm' saved [2201944/2201944]

[root@e2cb5e3b3a62 /]# sha256sum netstandard-targeting-pack-2.1.0-x64.rpm
45e199caf1151a750d11d9c5c7669d6e23d8dbb33da54d1d90bde55745996480  netstandard-targeting-pack-2.1.0-x64.rpm

For now, as a workaround, you could use the IP I get routed to to acquire and install the correct RPM manually. I don't know how (or if it's possible) to specify the mirror to use for our repo.

We're filing a ticket with the team responsible for these package repositories to get them to investigate the apparent broken mirror.

/cc @NikolaMilosavljevic @dleeapho @leecow

@dagood
Copy link
Member Author

dagood commented Feb 7, 2020

I've filed https://icm.ad.msft.net/imp/v3/incidents/details/174421834/home for this problem. (Internal Msft link, posting here for our reference.)

@dagood dagood changed the title On Amazon Linux 2, checksum mismatch installing dotnet-sdk-3.1 from CentOS 7 Linux repository Checksum mismatch installing dotnet-sdk-3.1 from CentOS 7 Linux repository in some regions (mirror issue) Feb 7, 2020
@dagood
Copy link
Member Author

dagood commented Feb 7, 2020

The repo admins ran a manual copy between the mirrors to fix this, and the wget via the mirror's IP works for me. This should make the install command work, but please let us know if you still hit issues @thecosmicfrog.

@dagood dagood closed this as completed Feb 7, 2020
@thecosmicfrog
Copy link

Thanks @dagood - looks to be all working now. Appreciate your help!

@dagood
Copy link
Member Author

dagood commented Feb 11, 2020

Sweet, thanks for confirming (and again for the original report). Unfortunate that this is something we apparently need to be concerned about. 😕 I'm going to double-check that this is something we're tracking along with the overall reliability issues with the service. (#4167)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-setup Issues related to installing .NET Core
Projects
None yet
Development

No branches or pull requests

2 participants