geek
geek

Reputation: 816

cloud foundry hosting on ubuntu fails

I am trying to host my django application in cloudfoundry.

But hosting is failing with following error:

 **ERROR** Error running supply: failed to apt-get update Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
      Get:2 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease [3,959 B]
      Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
      Get:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [166 kB]
      Err:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
        File has unexpected size (93512 != 165979). Mirror sync in progress? [IP: 13.91.48.226 443]
        Hashes of expected file:
         - Filesize:165979 [weak]
         - SHA512:ce0cd5497cdc9242a0e841113b3c280aa381555b20cde125fb1ded717ba89d936f004d0e64c83b3b6d5e2ef42756352975feb16ae5c7271cdcf631ffe6c3872a
         - SHA256:179eb71f2afb4a72bf5b11180b4d4c9ccf1644076dd75f5a7bbf880ecefafbba
         - SHA1:381a8321619083a4063fa8381bf3aa12a2dac5a3 [weak]
         - MD5Sum:54c730dd6a33c612b2ae3c23fe0cfcb7 [weak]
        Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
      Get:5 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
      Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
      Get:7 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
      Get:8 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
      Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,322 kB]
      Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,057 kB]
      Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [10.5 kB]
      Get:12 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [795 kB]
      Get:13 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [6,781 B]
      Get:14 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [761 kB]
      rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied
      Fetched 17.2 MB in 3s (5,576 kB/s)
      Reading package lists...
      W: Conflicting distribution: https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease (expected bionic but got stable)
      E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.gz  File has unexpected size (93512 != 165979). Mirror sync in progress? [IP: 13.91.48.226 443]
         Hashes of expected file:
          - Filesize:165979 [weak]
          - SHA512:ce0cd5497cdc9242a0e841113b3c280aa381555b20cde125fb1ded717ba89d936f004d0e64c83b3b6d5e2ef42756352975feb16ae5c7271cdcf631ffe6c3872a
          - SHA256:179eb71f2afb4a72bf5b11180b4d4c9ccf1644076dd75f5a7bbf880ecefafbba
          - SHA1:381a8321619083a4063fa8381bf3aa12a2dac5a3 [weak]
          - MD5Sum:54c730dd6a33c612b2ae3c23fe0cfcb7 [weak]
         Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
      E: Some index files failed to download. They have been ignored, or old ones used instead.


      exit status 100
   Failed to run all supply scripts: exit status 14
   Exit status 225
   Cell c33058db-3c05-4f3f-99db-d13037e2f2d7 stopping instance f82bda74-79bc-4110-9495-161830f18ffd
   Cell c33058db-3c05-4f3f-99db-d13037e2f2d7 destroying container for instance f82bda74-79bc-4110-9495-161830f18ffd
   Cell c33058db-3c05-4f3f-99db-d13037e2f2d7 successfully destroyed container for instance f82bda74-79bc-4110-9495-161830f18ffd
Error staging application: Staging error: staging failed
FAILED

following is my apt.yml:

---
keys:
- https://packages.microsoft.com/keys/microsoft.asc
repos:
- deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main
packages:
- msodbcsql17
- mssql-tools
- unixodbc-dev

It was working till yesterday evening. But today suddenly stopped working. i tried to re login using cf-login and rebooted my system. still no luck. please help me resolve it.

Upvotes: 0

Views: 586

Answers (2)

geek
geek

Reputation: 816

Did nothing, no changes, but tried after 2 days. it worked.

Upvotes: 0

MFK
MFK

Reputation: 35

Original Response

This may be related to what-causes-failed-to-fetch-file-has-unexpected-size-mirror-sync-progress. It appears the dist was updated at 13-Dec-2019 01:34, so what ever mirror you're using might not be up to date yet.

Try to explicitly add the Microsoft registry:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod
sudo apt-get update

as per the documentation.

New Response (Fixed by developers)

Has been resolved see: https://github.com/dotnet/core/issues/3995

It wasn't the mirror, it was a repository issue.

It looked like the InRelease file wasn't up to date given that the distro was updated in the morning (2019-12-13) and the release updated the previous day.

For instance if you did a manual check of the MD5, SHA256 and file size, for Packages.gz, you would have found that there were discrepancies:

  1. MD5 actual: 712391F77F24F2D9962FEE41CD41C55D, reported in InRelease: 54c730dd6a33c612b2ae3c23fe0cfcb7 for main/binary-amd64/Packages.gz
  2. SHA256 actual: 28B8996AF9C6D5A3298F1EDC3427C1DED03E69D5EFCECF8469A075083AA01557, reported in InRelease: 179eb71f2afb4a72bf5b11180b4d4c9ccf1644076dd75f5a7bbf880ecefafbba for main/binary-amd64/Packages.gz
  3. File size actual: 93512 bytes, expected: 165979.

After the fix, though, the values reported in the InRelease corresponded with manual checks.

There were (2019-12-13) issues open for something similar: https://github.com/dotnet/core/issues/3988

https://github.com/dotnet/core/issues/2731

https://github.com/microsoft/vscode/issues/86925

Upvotes: 2

Related Questions