cloud foundry hosting on ubuntu fails - cloud-foundry

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.

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:
MD5 actual: 712391F77F24F2D9962FEE41CD41C55D, reported in InRelease: 54c730dd6a33c612b2ae3c23fe0cfcb7 for main/binary-amd64/Packages.gz
SHA256 actual: 28B8996AF9C6D5A3298F1EDC3427C1DED03E69D5EFCECF8469A075083AA01557, reported in InRelease: 179eb71f2afb4a72bf5b11180b4d4c9ccf1644076dd75f5a7bbf880ecefafbba for main/binary-amd64/Packages.gz
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

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

Related

The repository ... does not have a Release file (Maxmind)

I am following this tutorial: Maxmind GeoLite2 & GeoIP Database Auto-Update | 2020
I launched an Ec2 AWS instance with the mautic application (debian 10).
I'm trying to install Geolip Maximind on my instance but without success.
Here are the problems:
When I execute the command add-apt-repository ppa:maxmind/ppa
I get the result:
More info: https://launchpad.net/~maxmind/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keybox '/tmp/tmpxsjdtonq/pubring.gpg' created
gpg: /tmp/tmpxsjdtonq/trustdb.gpg: trustdb created
gpg: key DE1997DCDE742AFA: public key "Launchpad PPA for MaxMind" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: no valid OpenPGP data found.
When I execute the command apt update
I get the result:
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://cdn-aws.deb.debian.org/debian buster InRelease
Hit:3 http://cdn-aws.deb.debian.org/debian buster-updates InRelease
Hit:4 http://cdn-aws.deb.debian.org/debian buster-backports InRelease
Ign:5 http://ppa.launchpad.net/maxmind/ppa/ubuntu impish InRelease
Err:6 http://ppa.launchpad.net/maxmind/ppa/ubuntu impish Release
404 Not Found [IP: 91.189.95.85 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/maxmind/ppa/ubuntu impish Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I didn't think it was useful to continue the tutorial because of these errors. I need your precious help to correct them.
If you are running Debian then you just have to install geoip-bin and geoip-database and for the updates you install geoipupdate. They are all in the standard apt repository.
You do not need to add the maxmind repository.
apt install geoip-bin geoip-database geoipupdate
Note that depending what you plan to do you may need also other packages for your perl php lua apache lighttp etc ... Since you don't want to tell us what you have in mind, I can't tell you more than that.
There are several packages there ...
root#linux:~# apt policy geoipupdate
geoipupdate:
Installiert: 3.1.1-1
Installationskandidat: 3.1.1-1
Versionstabelle:
*** 3.1.1-1 500
500 http://ftp.debian.org/debian buster/contrib amd64 Packages
100 /var/lib/dpkg/status
2.5.0-1~bpo9+1 100
100 http://ftp.debian.org/debian stretch-backports/contrib amd64 Packages
2.3.1-1 500
500 http://ftp.debian.org/debian stretch/contrib amd64 Packages
The standard apt repositories are :
deb http://ftp.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.debian.org/debian/ buster main non-free
deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main non-free
deb http://ftp.debian.org/debian buster-backports main contrib
deb-src http://ftp.debian.org/debian buster-backports main contrib
add them to your /etc/apt/sources.list and then try again

WSO2 API Manager installation : Apt install unable to locate package wso2am-3.2.0

I used WSO2 in the past, v2.6.0. I installed it through their debian repository on a Debian 9 machine, and it worked well.
Now I want to install their new 3.2.0 stable version on a Debian 9 machine, so I followed their guidelines here : https://wso2.com/api-management/install/apt/get-started/
Unfortunately, the apt install command fails and I don't understand why :
apt update && apt install wso2am-3.2.0
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:2 http://security.debian.org/debian-security stretch/updates InRelease
Hit:3 http://deb.debian.org/debian stretch Release
Ign:4 https://dl.bintray.com/wso2/deb am_320 InRelease
Get:5 https://dl.bintray.com/wso2/deb am_320 Release [1,897 B]
Hit:5 https://dl.bintray.com/wso2/deb am_320 Release
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package wso2am-3.2.0
E: Couldn't find any package by glob 'wso2am-3.2.0'
E: Couldn't find any package by regex 'wso2am-3.2.0'
Here is my Debian version :
lsb_release -a
Distributor ID: Debian
Description: Debian GNU/Linux 9.13 (stretch)
Release: 9.13
Codename: stretch
And my /etc/apt/sources.list file :
cat /etc/apt/sources.list
deb http://deb.debian.org/debian stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb https://dl.bintray.com/wso2/deb am_320 release
I tried with http only, but I got the same error. Any idea?
Thanks.
Could you please try again these steps?
apt-get update
apt-get install wso2am-3.2.0
Now it will work since we fixed some problems with the installer and sorry for the inconvenience.

docker setup postgis error missing repository

setting up django with docker, the docker file looks like this
FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
RUN apt-get update
RUN apt-get install software-properties-common --yes
RUN add-apt-repository ppa:ubuntugis/ubuntugis-unstable
RUN apt-get update
RUN apt-get install postgis
WORKDIR /code
COPY . /code/
RUN pip install -r requirements.txt
among other things it sets up postgis using the ppa ubuntugis
however it throws this error while setting up
Step 5/11 : RUN apt-get install software-properties-common --yes
---> Using cache
---> 634a13159403
Step 6/11 : RUN add-apt-repository ppa:ubuntugis/ubuntugis-unstable
---> Using cache
---> 983fbcf8fd46
Step 7/11 : RUN apt-get update
---> Running in aaf66c98507c
Ign:1 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco InRelease
Hit:2 http://security.debian.org/debian-security stretch/updates InRelease
Ign:3 http://deb.debian.org/debian stretch InRelease
Ign:4 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco Release
Hit:5 http://deb.debian.org/debian stretch-updates InRelease
Hit:6 http://deb.debian.org/debian stretch Release
Ign:7 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main amd64 Packages
Ign:8 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main all Packages
Ign:7 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main amd64 Packages
Ign:8 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main all Packages
Ign:7 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main amd64 Packages
Ign:8 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main all Packages
Ign:7 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main amd64 Packages
Ign:8 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main all Packages
Ign:7 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main amd64 Packages
Ign:8 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main all Packages
Err:7 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main amd64 Packages
404 Not Found
Ign:8 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco/main all Packages
Reading package lists...
W: The repository 'http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu disco Release' does not have a Release file.
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu/dists/disco/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
ERROR: Service 'web' failed to build: The command '/bin/sh -c apt-get update' returned a non-zero code: 100
it fails to find the repo even though this is how it's intended to be installed without using docker.
This is using a django projects that works locally and now making it work through docker is the new challenge.

Is it possible to install freeswitch in Debian 9.4?

I tried to install freeswitch in Debian 9.4 but i get some error. its say keys are invalid.
root#.... :~# apt-get update
Hit:1 https://deb.nodesource.com/node_8.x jessie InRelease
Hit:2 http://128.30.2.26/debian testing InRelease
Get:3 http://files.freeswitch.org/repo/deb/freeswitch-1.6 jessie InRelease [4,628 B]
Ign:3 http://files.freeswitch.org/repo/deb/freeswitch-1.6 jessie InRelease
Get:4 http://files.freeswitch.org/repo/deb/freeswitch-1.6 jessie/main amd64 Packages [65.5 kB]
Fetched 70.1 kB in 2s (32.0 kB/s)
Reading package lists... Done
W: GPG error: http://files.freeswitch.org/repo/deb/freeswitch-1.6 jessie InRelease: The following signatures were invalid: 20B06EE621AB150D40F6079FD76EDC7725E010CF
W: The repository 'http://files.freeswitch.org/repo/deb/freeswitch-1.6 jessie InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Yes, you can install it with a FreeSWITCH apt repository or install it from source as described on their confluence page:
https://freeswitch.org/confluence/display/FREESWITCH/Debian+9+Stretch

Stackdriver agent installation failed

I am trying to install Stackdriver Agent. I am using the Google cloud instance (os Ubuntu) and followed the instruction given at google cloud docs for monitoring. Here, are the logs from my server console.
root#instance-1:~/opt# sudo bash stack-install.sh --write-gcm
Installing agents for Debian or Ubuntu.
curl: (22) The requested URL returned error: 404 Not Found
OK
Hit:1 http://asia-east1.gce.archive.ubuntu.com/ubuntu yakkety InRelease
Hit:2 http://asia-east1.gce.archive.ubuntu.com/ubuntu yakkety-updates InRelease
Get:3 http://asia-east1.gce.archive.ubuntu.com/ubuntu yakkety-backports InRelease [102 kB]
Ign:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 InRelease
Hit:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release
Hit:6 http://security.ubuntu.com/ubuntu yakkety-security InRelease
Hit:8 http://archive.canonical.com/ubuntu yakkety InRelease
Hit:9 https://deb.nodesource.com/node_6.x yakkety InRelease
Fetched 102 kB in 0s (111 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package stackdriver-agent
Installation failed.
root#instance-1:~/opt#
According to the list of documented OSs, the following are supported at present:
LTS 12.04 "Precise"
LTS 14.04 "Trusty"
LTS 16.04 "Xenial"
And it appears that only LTS releases are supported.
First you need to type this:
sudo apt-cache madison stackdriver-agent
To show the list of available versions of the agent in order to select which version to install.
Results:
stackdriver-agent | 6.0.2-1.bionic |
http://packages.cloud.google.com/apt
google-cloud-monitoring-bionic-all/main amd64 Packages
stackdriver-agent | 6.0.1-1.bionic |
http://packages.cloud.google.com/apt
google-cloud-monitoring-bionic-all/main amd64 Packages
stackdriver-agent | 6.0.0-1.bionic |
http://packages.cloud.google.com/apt
google-cloud-monitoring-bionic-all/main amd64 Packages
stackdriver-agent | 5.5.2-1002.bionic |
http://packages.cloud.google.com/apt
google-cloud-monitoring-bionic-all/main amd64 Packages
stackdriver-agent | 5.5.2-1001.bionic |
http://packages.cloud.google.com/apt
google-cloud-monitoring-bionic-all/main amd64 Packages
Then:
sudo apt-get install -y 'stackdriver-agent=[MAJOR_VERSION].*'
For example, to pin to the 6.0.2-1 bionic of the agent, run:
sudo apt-get install -y 'stackdriver-agent=6.0.2-1.bionic*'