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

`sudo apt-get update -q` fails on every single invocation #9037

Closed
JasonGross opened this Issue Jan 11, 2018 · 13 comments

Comments

Projects
None yet
@JasonGross

JasonGross commented Jan 11, 2018

See, e.g., https://travis-ci.org/mit-plv/fiat-crypto/jobs/327463403

At the top:

removed ‘/etc/apt/sources.list.d/basho_riak.list’
Executing: /tmp/tmp.2rKcyeNw0H/gpg.1.sh --keyserver
hkp://keyserver.ubuntu.com:80
--recv
EA312927
gpg: requesting key EA312927 from hkp server keyserver.ubuntu.com
gpg: key EA312927: public key "MongoDB 3.2 Release Signing Key <packaging@mongodb.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
W: GPG error: http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release: The following signatures were invalid: KEYEXPIRED 1515625755
W: The repository 'http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release' is not signed.
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)

and later:

$ sudo apt-get update -q
Ign:1 http://us-central1.gce.archive.ubuntu.com/ubuntu trusty InRelease
Hit:2 http://us-central1.gce.archive.ubuntu.com/ubuntu trusty-updates InRelease
Hit:3 http://us-central1.gce.archive.ubuntu.com/ubuntu trusty-backports InRelease
Hit:4 http://us-central1.gce.archive.ubuntu.com/ubuntu trusty Release
Ign:5 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 InRelease
Get:7 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release [2,495 B]
Get:9 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release.gpg [801 B]
Ign:10 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:11 http://dl.google.com/linux/chrome/deb stable Release
Ign:6 http://toolbelt.heroku.com/ubuntu ./ InRelease
Get:8 http://dl.bintray.com/apache/cassandra 39x InRelease [3,168 B]
Hit:13 http://security.ubuntu.com/ubuntu trusty-security InRelease
Hit:14 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu trusty InRelease
Hit:12 http://toolbelt.heroku.com/ubuntu ./ Release
Hit:16 http://apt.postgresql.org/pub/repos/apt trusty-pgdg InRelease
Hit:17 https://download.docker.com/linux/ubuntu trusty InRelease
Hit:18 https://dl.hhvm.com/ubuntu trusty InRelease
Ign:9 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release.gpg
Ign:19 http://ppa.launchpad.net/couchdb/stable/ubuntu trusty InRelease
Hit:20 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4/multiverse amd64 Packages
Hit:21 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4/multiverse i386 Packages
Ign:21 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4/multiverse i386 Packages
Hit:21 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4/multiverse i386 Packages
Err:21 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4/multiverse i386 Packages
  Empty files can't be valid archives
Hit:23 http://ppa.launchpad.net/git-core/ppa/ubuntu trusty InRelease
Get:25 http://ppa.launchpad.net/jgross-h/many-coq-versions/ubuntu trusty InRelease [16.0 kB]
Hit:26 https://packagecloud.io/computology/apt-backport/ubuntu trusty InRelease
Hit:27 https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease
Hit:28 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty InRelease
Hit:29 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu trusty InRelease
Hit:30 http://ppa.launchpad.net/pollinate/ppa/ubuntu trusty InRelease
Hit:31 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty InRelease
Hit:32 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease
Hit:33 http://ppa.launchpad.net/couchdb/stable/ubuntu trusty Release
Get:35 http://ppa.launchpad.net/jgross-h/many-coq-versions/ubuntu trusty/main amd64 Packages [23.7 kB]
Get:36 http://ppa.launchpad.net/jgross-h/many-coq-versions/ubuntu trusty/main i386 Packages [23.7 kB]
Get:37 http://ppa.launchpad.net/jgross-h/many-coq-versions/ubuntu trusty/main Translation-en [6,404 B]
Fetched 76.2 kB in 2s (27.6 kB/s)
Reading package lists...
W: GPG error: http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release: The following signatures were invalid: KEYEXPIRED 1515625755
W: The repository 'http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release' is not signed.
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
E: Failed to fetch store:/var/lib/apt/lists/partial/repo.mongodb.org_apt_ubuntu_dists_trusty_mongodb-org_3.4_multiverse_binary-i386_Packages  Empty files can't be valid archives
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command "sudo apt-get update -q" failed and exited with 100 during .
@marmarek

This comment has been minimized.

marmarek commented Jan 11, 2018

Same here, https://travis-ci.org/QubesOS/qubes-core-admin-client/jobs/327492881

+sudo apt-get -qq update
W: GPG error: http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release: The following signatures were invalid: KEYEXPIRED 1515625755
W: The repository 'http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release' is not signed.
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
E: Failed to fetch store:/var/lib/apt/lists/partial/repo.mongodb.org_apt_ubuntu_dists_trusty_mongodb-org_3.4_multiverse_binary-i386_Packages  Empty files can't be valid archives
E: Some index files failed to download. They have been ignored, or old ones used instead.
@jyaif

This comment has been minimized.

@amureki

This comment has been minimized.

amureki commented Jan 11, 2018

MongoDB repo has expired GPG key again.
#8554

marmarek added a commit to marmarek/qubes-builder that referenced this issue Jan 11, 2018

@iriberri

This comment has been minimized.

iriberri commented Jan 11, 2018

Thanks for reporting this issue!

As @amureki mentions, it appears that there has been an upstream issue where the PGP key of the mongo repository has been expired. We are, as we speak, working to update the build script to make this error disappear - we'll keep you posted as soon as this is resolved.

As a workaround in the meantime, you can also include the following command before sudo apt-get update in your .travis.yml to update the expired key:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

Note that, if you're using the apt-get addon, Travis will automatically run sudo apt-get update before the before_install section and it wouldn't be possible to use this workaround. In that case, I'd recommend moving the installation of the packages to the before_install section, if this is an option for you. For example:

before_install:
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
- sudo apt-get install [...]

Would you like to give this a try and let us know how this goes?

@iriberri

This comment has been minimized.

iriberri commented Jan 11, 2018

A hot fix has been deployed to update the expired GPG key and apt-get update commands should now succeed. If you're still experiencing issues, please let us know here or send us an email to support@travis-ci.com if you wouldn't like to share links to your private builds here.

Thank you.

@afturner

This comment has been minimized.

afturner commented Jan 12, 2018

This still occurred to me about 10 mins ago: https://travis-ci.org/afturner/heisenberg (build #33)

Added workaround to yaml, running now.

EDIT: It worked. (build #36 in case anyone cares)

@duane-talentsonar

This comment has been minimized.

duane-talentsonar commented Jan 12, 2018

The key for 3.2 is also expired. This fix only seems to help mongodb 3.4.

@dtlewis

This comment has been minimized.

dtlewis commented Jan 14, 2018

I'm seeing the same problem...

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release: The following signatures were invalid: KEYEXPIRED 1515625755
W: Failed to fetch http://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.4/Release.gpg The following signatures were invalid: KEYEXPIRED 1515625755
W: Some index files failed to download. They have been ignored, or old ones used instead.

@make

This comment has been minimized.

make commented Jan 19, 2018

@dtlewis try sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 && sudo apt-get update

@rashmani

This comment has been minimized.

rashmani commented Jan 24, 2018

@make It worked for me, thanks a ton!

cpu added a commit to cpu/streisand that referenced this issue Jan 24, 2018

Work around MongoDB APT key expiry.
CI builds are frequently failing with the error:
```
  GPG error: http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4
  Release: The following signatures were invalid: KEYEXPIRED 1515625755

To work around this we fetch an updated key before doing an apt-get update
See travis-ci/travis-ci#9037 for more information
@cpu

This comment has been minimized.

cpu commented Jan 25, 2018

If you're still experiencing issues, please let us know here

@iriberri I think there is still an instance of this problem affecting the trusty images that might merit reopening this issue (or creating a new one).

I've been seeing errors about an expired MongoDB GPG key in the Streisand Travis builds after an apt get update with some regularity over the past few days. The error is always short-lived, restarting the failed build task typically results in a green build. When the build tasks do fail the error is of the form:

  GPG error: http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4
  Release: The following signatures were invalid: KEYEXPIRED 1515625755

As a very rough field test I ran 5 builds and saw one build fail out of the 5 with this error.

Applying the workaround suggested by @make has so far prevented any further failures.

cpu added a commit to StreisandEffect/streisand that referenced this issue Jan 25, 2018

Work around MongoDB APT key expiry. (#1164)
CI builds are frequently failing with the error:
```
  GPG error: http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4
  Release: The following signatures were invalid: KEYEXPIRED 1515625755
```

To work around this we fetch an updated key before doing an apt-get update
See travis-ci/travis-ci#9037 for more information

pevik added a commit to pevik/ltp that referenced this issue Mar 15, 2018

travis: Remove MongoDB repository
As we don't need it and expired key of MongoDB repository was the reason
of problems with travis failures (travis-ci/travis-ci#9037).

W: GPG error: http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release: The following signatures were invalid: KEYEXPIRED 1515625755
E: The repository 'http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release' is not signed.
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.

Simplify apt update as failing connections to ppa.launchpad.net wasn't
propably the reason of our travis failures (travis-ci/travis-ci#9112).

Signed-off-by: Petr Vorel <pvorel@suse.cz>

pevik added a commit to pevik/ltp that referenced this issue Mar 15, 2018

travis: Remove MongoDB repository
As we don't need it and expired key of MongoDB repository was the reason
of problems with travis failures (travis-ci/travis-ci#9037).

W: GPG error: http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release: The following signatures were invalid: KEYEXPIRED 1515625755
E: The repository 'http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release' is not signed.
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.

Simplify apt update as failing connections to ppa.launchpad.net wasn't
propably the reason of our travis failures (travis-ci/travis-ci#9112).

Signed-off-by: Petr Vorel <pvorel@suse.cz>

pevik added a commit to pevik/ltp that referenced this issue Mar 15, 2018

travis: Remove MongoDB repository
As we don't need it and expired key of MongoDB repository was the reason
of problems with travis failures (travis-ci/travis-ci#9037).

W: GPG error: http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release: The following signatures were invalid: KEYEXPIRED 1515625755
E: The repository 'http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release' is not signed.
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.

Simplify apt update as failing connections to ppa.launchpad.net wasn't
propably the reason of our travis failures (travis-ci/travis-ci#9112).

Signed-off-by: Petr Vorel <pvorel@suse.cz>

pevik added a commit to linux-test-project/ltp that referenced this issue Mar 15, 2018

travis: Remove MongoDB repository
as we don't need it's expired key was the reason of common travis
failures (travis-ci/travis-ci#9037).

W: GPG error: http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release: The following signatures were invalid: KEYEXPIRED 1515625755
E: The repository 'http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release' is not signed.
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.

Simplify apt update as failing connections to ppa.launchpad.net wasn't
propably the reason of our travis failures (travis-ci/travis-ci#9112).

Signed-off-by: Petr Vorel <pvorel@suse.cz>

joeblau added a commit to joeblau/gitignore.io that referenced this issue Jun 24, 2018

rish9511 added a commit to ElucidataInc/ElMaven that referenced this issue Jul 6, 2018

@noloader

This comment has been minimized.

noloader commented Jul 15, 2018

I think this issue may still exist:

gpg: requesting key 0359A145 from hkp server keyserver.ubuntu.com
gpgkeys: key 0C49F3730359A145 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

rish9511 added a commit to ElucidataInc/ElMaven that referenced this issue Jul 25, 2018

rish9511 added a commit to ElucidataInc/ElMaven that referenced this issue Jul 25, 2018

add travis support on Mac
- make travis work on Mac

- make use of qt5.9.1 on linux
  use (http://ppa.launchpad.net/beineri/opt-qt591-trusty/ubuntu) ppa
  for Qt5.9.1

- fix expired mongo db key(travis-ci/travis-ci#9037)
@nathggns

This comment has been minimized.

nathggns commented Sep 13, 2018

This is still an issue.

rish9511 added a commit to ElucidataInc/ElMaven that referenced this issue Sep 25, 2018

add travis support on Mac
- make travis work on Mac

- make use of qt5.9.1 on linux
  use (http://ppa.launchpad.net/beineri/opt-qt591-trusty/ubuntu) ppa
  for Qt5.9.1

- fix expired mongo db key(travis-ci/travis-ci#9037)

rish9511 added a commit to ElucidataInc/ElMaven that referenced this issue Sep 26, 2018

add travis support on Mac
- make travis work on Mac

- make use of qt5.9.1 on linux
  use (http://ppa.launchpad.net/beineri/opt-qt591-trusty/ubuntu) ppa
  for Qt5.9.1

- fix expired mongo db key(travis-ci/travis-ci#9037)

rish9511 added a commit to ElucidataInc/ElMaven that referenced this issue Oct 22, 2018

add travis support on Mac
- make travis work on Mac

- make use of qt5.9.1 on linux
  use (http://ppa.launchpad.net/beineri/opt-qt591-trusty/ubuntu) ppa
  for Qt5.9.1

- fix expired mongo db key(travis-ci/travis-ci#9037)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment