setup-gcloud: docker-credential-gcloud + gcloud 298.0.0 + ubuntu-18.04: "OPENSSL_1_1_1 not found" error
TL;DR
Using GoogleCloudPlatform/github-actions/setup-gcloud@master
with ubuntu-latest
. Builds suddenly started failing overnight due to docker-credential-gcloud
throwing a version OPENSSL_1_1_1' not found
error.
Expected behavior
docker-credentials-gcloud should allow me to pull an image from my gcp repo
Observed behavior
docker-credentials-gcloud fails complaining about version OPENSSL_1_1_1' not found
and build fails.
https://github.com/austinpray/kaori/pull/134/checks?check_run_id=814820107#step:6:90
ERROR: gcloud failed to load: /tmp/_MEIhQjalI/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so)
👉 Reverting to version 297.0.1
as in https://github.com/austinpray/kaori/pull/133 makes the build pass again.
Reproduction
Here is me fixing it by pinning the gcloud version to an older one: https://github.com/austinpray/kaori/pull/133
Here is me reproducing the issue by unpinning the version: https://github.com/austinpray/kaori/pull/134 (https://github.com/austinpray/kaori/pull/134/checks?check_run_id=814820107#step:6:90)
Current runner version: '2.263.0'
Operating System
Ubuntu
18.04.4
LTS
Virtual Environment
Environment: ubuntu-18.04
Version: 20200621.1
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu18/20200621.1/images/linux/Ubuntu1804-README.md
Action YAML
name: CI
on:
push:
branches: [ master ]
paths-ignore:
- workloads/**
- fluxcd/**
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
service_account_key: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS}}
export_default_credentials: true
- run: gcloud auth configure-docker
- name: Create a .env file
env:
SLACK_API_TOKEN: ${{secrets.SLACK_API_TOKEN}}
SLACK_SIGNING_SECRET: ${{secrets.SLACK_SIGNING_SECRET}}
SLACK_VERIFICATION_TOKEN: ${{secrets.SLACK_VERIFICATION_TOKEN}}
GCLOUD_SERVICE_ACCOUNT_INFO: ${{secrets.GCLOUD_SERVICE_ACCOUNT_INFO}}
IMAGES_BUCKET_GCLOUD: ${{secrets.IMAGES_BUCKET_GCLOUD}}
run: ./scripts/create-dotenv-from.py .env.example > .env
- name: Build the Docker image
run: |
docker pull $CACHE_FROM_IMAGE || true
make
env:
CACHE_FROM_IMAGE: us.gcr.io/${{secrets.GCLOUD_PROJECT_ID}}/kaori/kaori:master
- name: Run the tests
run: ./tests/run.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run the card sim
run: make test-sims
- name: Push to GCR
if: github.ref == 'refs/heads/master'
run: |
docker tag austinpray/kaori/kaori us.gcr.io/${{secrets.GCLOUD_PROJECT_ID}}/kaori/kaori:master-${{github.sha}}
docker tag austinpray/kaori/kaori us.gcr.io/${{secrets.GCLOUD_PROJECT_ID}}/kaori/kaori:master
docker push us.gcr.io/${{secrets.GCLOUD_PROJECT_ID}}/kaori/kaori:master
docker push us.gcr.io/${{secrets.GCLOUD_PROJECT_ID}}/kaori/kaori:master-${{github.sha}}
Repository
https://github.com/austinpray/kaori/pull/133
If you want temporary access to this repo for debugging and such: I can give it to you. This is just a silly side project.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 46
- Comments: 55 (8 by maintainers)
Commits related to this issue
- Pin gcloud tools version to fix an error See https://github.com/GoogleCloudPlatform/github-actions/issues/128 — committed to neuro-inc/platform-registry-api by anayden 4 years ago
- Run tests via Github Workflows (#167) * Initial Workflows integration * Add make init * Remove make init * Secret migration * Secret migration 2 * Secret migration 3 * Secret migrat... — committed to neuro-inc/platform-registry-api by anayden 4 years ago
- [github-actions] use newest google-github-actions/setup-gcloud due to google-github-actions/setup-gcloud#128 — committed to feature-creeps/observability-workshop by TheAifam5 3 years ago
Confirming that this issue also exists in Ubuntu 20.04 with gcloud version 301.0.0.
To fix:
What worked for us was to use the env var:
The magical incantation
as described above, worked for me.
I was having this problem using the
google/cloud-sdk
image on CircleCI.My workaround was changing the docker-compose install method from the one recommended on the CircleCI docs to:
pip3 install docker-compose --upgrade
export LD_LIBRARY_PATH=/usr/local/lib
worked for me too.@jtrh getting the same error as you while doing
docker-compose build
. I tried prefixing it withCLOUDSDK_PYTHON=$(which python3)
didn’t work either, same error.System info:
EDIT: this fixed it for me https://github.com/openssl/openssl/issues/5845#issuecomment-378601109
I got the same error on Ubuntu 18.04 and
gcloud 304.0.0
export CLOUDSDK_PYTHON=/usr/bin/python
worked for me as well.@bharathkkb The issue I have with this new version is that it breaks
gcloud auth configure-docker
.Here is my use case below.
The error I get is:
Ran into this issue today using docker-compose to pull an image from GCR from my Ubuntu 20.10 WSL 2 distro.
I already had Python 3 installed (3.8.6 to be exact), but
export CLOUDSDK_PYTHON=/usr/bin/python3
didn’t work for me. The workaroundexport LD_LIBRARY_PATH=/usr/local/lib
worked for me.Thank you @sorliem. The solution you linked also worked for me (gcloud version 304).
Also remark that adding
LD_LIBRARY_PATH=/usr/local/lib;
in the command line didn’t worked. Variable has to be exported.
I get this error when, for example, I execute docker-compose build, but if I exectue this command with sudo it works.
I was able to reproduce this here. I was also able to fix it with the temporary workaround from https://github.com/openssl/openssl/issues/5845#issuecomment-378601109 suggest by @sorliem.
I will continue to look into a possible long term fix.
With newest version of gcloud (326.0.0) this no longer works 😦
297.0.1 for arm64 doesn’t seem to be available via apt-get anymore…
340.0.0-0 works with
I had the exact same problem. The above mentioned export worked for me.
Ubuntu 20.04 Google Cloud SDK 322.0.0
Thanks
I can confirm that @bharathkkb workaround mentioned with the
export LD_LIBRARY_PATH=/usr/local/lib
works for me !By the way, to make things a bit harder to debug,I am using https://github.com/asdf-vm/asdf to install my stuff. But the workaround works
So with
Debian 10 Buster
gcloud 308
export CLOUDSDK_PYTHON=/usr/bin/python
Worked for me too!Why is
LD_LIBRARY_PATH
set to/tmp/_MEI3WIF2B/
? Is this a bug with vendored python dependencies in docker-compose?None of the solutions mentioned above helped me.
Before finally finding my own workaround, I tried:
v297
v340
(it was330
initially)export CLOUDSDK_PYTHON=/usr/bin/python3
andexport LD_LIBRARY_PATH=/usr/local/lib
(both were already in my.zshrc
)pip3 install docker-compose --upgrade
3.7.10
which is the same asCPython
used by mydocker-compose
(inspired by this answer)For anyone using WSL, and probably future me:
What eventually helped me was realizing that because my Ubuntu runs
docker-compose
through WSL and the entire Docker runs on Windows, I might have some luck setting up the same container in Windows, and then just getting it back up from my usual WSL console and Ubuntu filesystem.I cloned my repo to Windows filesystem, installed
gcloud
for Windows, set up gcloud authentication, randocker-compose up
from cmd, and sure enough Docker pulled the images and the container built just fine. Now that my Docker for Windows has all the dependency images, I don’t have any trouble running the container from inside WSL.I ran into this problem using docker-compose on Ubuntu 20.10 WSL 2 distro.
This fixed it for me:
export CLOUDSDK_PYTHON=/usr/bin/python2
(That’s a 2 not a 3)
Same here. When running docker-compose with latest google SDK, showing the similiar message when pulling base image from gcr. The workaround by using 297.0.1 got it work.
Just ran into this today and the previously suggested fixes didn’t work for me. I ended up re-installing
docker-compose
which sorted out this issue (pip install docker-compose
)Config:
Thanks for the solutions posted in the comments.
In my case, what worked (gcloud sdk version from ~1st of October 2021) with Ubuntu 20.04 that had Python 3.8 installed, was:
app-engine-python
(if I’m correct, installs Python 2.7)export CLOUDSDK_PYTHON=/usr/bin/python2.7
Tried with to python 3 path but was still giving me the OPENSSL_1_1_1 not found error, but pinning/forcing to Python 2 is so far working without issues.
Just happened with github actions ubuntu:latest and command
gcloud auth configure-docker -q
Debian 10 here, with gcloud
v346
and python 3.7.3 (from debian packages). theexport
workaround didn’t worked: gcloud still tries to find libraries in /tmp/somethingI also got the OPENSSL_1_1_1 error when executing
docker-compose build
withgoogle-cloud-sdk
Debian package version302.0.0-0
. Reverting to version301.0.0-0
did not fix the problem, but reverting to300.0.0-0
did.System information:
apt-get
.Everyone here put their lucky number with this sdk. i will start from the most like answer
https://github.com/google-github-actions/setup-gcloud/issues/128#issuecomment-673864153
CLOUDSDK_PYTHON=/usr/bin/python
worked for me whileexport CLOUDSDK_PYTHON=$(which python3)
didn’t work.Same problem here. Is there any known fix for the gihub action as described by the OP ?
I’ve started getting this after updating docker-compose on my machine. It happens if I run
docker-compose pull
.I was previously on a much older version of docker-compose, which worked. I can’t remember which version, but it might have been installed as long ago as 2017.
EDIT:
LD_LIBRARY_PATH=/usr/lib docker-compose pull my_service
works. I suppose I shall use that as a workaround for now. Whygcloud
expects to find libssl in/tmp/...
is… not something I understand.Error:
The above is truncated. Full error here.
Relevant versions:
/usr/bin/python3 --version
Python 3.6.9I assume the Python executable being used is the one in
/usr/bin/python3
, since that’s what’s in the error message. However, for completeness:which python3
/home/thom/.pyenv/shims/python3python3 --version
Python 3.6.9gcloud version
Google Cloud SDK 319.0.0 alpha 2020.11.13 beta 2020.11.13 bq 2.0.62 core 2020.11.13 gsutil 4.55 kubectl 1.16.13lsb_release -d
Description: Ubuntu 18.04.5 LTSdocker-compose version
docker-compose version 1.27.4, build 40524192 docker-py version: 4.3.1 CPython version: 3.7.7 OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019openssl version
OpenSSL 1.1.1 11 Sep 2018which openssl
/usr/bin/openssllocate libssl.so.1.1
/snap/core18/1885/usr/lib/x86_64-linux-gnu/libssl.so.1.1 /snap/core18/1932/usr/lib/x86_64-linux-gnu/libssl.so.1.1 /snap/gnome-3-28-1804/128/usr/lib/x86_64-linux-gnu/libssl.so.1.1 /snap/gnome-3-28-1804/145/usr/lib/x86_64-linux-gnu/libssl.so.1.1 /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libssl.so.1.1 /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libssl.so.1.1@michaelr, that only works if you install python2 or add a symlink from
/usr/bin/python2
to/usr/bin/python3
(the latter not being recommended since it can lead to programs expecting Python 2 to crash because they’re actually running under Python 3).Ideally, this problem should be solved within the current state of modern Linux distros, which do not include Python 2.