Ubuntu上的Cloud Foundry托管失败

问题描述 投票:0回答:1

我正在尝试将我的Django应用程序托管在cloudfoundry中。

但是托管失败并出现以下错误:

 **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

以下是我的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

它一直工作到昨天晚上。但是今天突然停止工作了。我尝试使用cf-login重新登录并重新启动了系统。仍然没有运气。请帮助我解决它。

cloudfoundry ubuntu-18.04 apt
1个回答
1
投票

我没有足够高的代表来发表评论,但这可能与what-causes-failed-to-fetch-file-has-unexpected-size-mirror-sync-progress。似乎dist已于2019年12月13日01:34更新,因此您使用的镜像可能尚未更新。

尝试显式添加Microsoft注册表:

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

按照documentation

© www.soinside.com 2019 - 2024. All rights reserved.