Skip to content
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

MYSQL fails to install due to incorrect GPG Key #36231

Closed
1 of 2 tasks
potiuk opened this issue Dec 14, 2023 Discussed in #36230 · 77 comments
Closed
1 of 2 tasks

MYSQL fails to install due to incorrect GPG Key #36231

potiuk opened this issue Dec 14, 2023 Discussed in #36230 · 77 comments
Assignees
Labels
area:core kind:bug This is a clearly a bug

Comments

@potiuk
Copy link
Member

potiuk commented Dec 14, 2023

Discussed in #36230

Originally posted by furquan39 December 14, 2023

Apache Airflow version

Other Airflow 2 version (please specify below)

If "Other Airflow 2 version" selected, which one?

2.4.1

What happened?

When attempting to rebuild an apache airflow image, we are getting failures during our builds when trying to run apt-get update.

The error we see:
image

What you think should happen instead?

The airflow image should build successfully without any errors.

How to reproduce

Create a Dockerfile. Add the following lines to the Dockerfile:

`FROM apache/airflow:2.4.1-python3.8

ENV SSH_PASSWD "root:Docker!"

RUN pip3 install msal Authlib flask_oauthlib azure-storage-file-datalake apache-airflow-providers-databricks==3.1.0

USER root

RUN apt-get update
&& apt-get install -y --no-install-recommends
openssh-server
&& apt-get autoremove -yqq --purge
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*`

Operating System

Debian 11

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

Deployment details

No response

Anything else?

Seems like a similar issue to this: #20911

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@potiuk potiuk added kind:bug This is a clearly a bug area:core needs-triage label for new issues that we didn't triage yet labels Dec 14, 2023
@potiuk potiuk self-assigned this Dec 14, 2023
@potiuk potiuk removed the needs-triage label for new issues that we didn't triage yet label Dec 14, 2023
@potiuk
Copy link
Member Author

potiuk commented Dec 14, 2023

Looks like Oracle did it again and changed their key.

@potiuk
Copy link
Member Author

potiuk commented Dec 14, 2023

Similar to #20912

@potiuk
Copy link
Member Author

potiuk commented Dec 14, 2023

A quick workaround that should fix if anyone sees the problem (I can't reproduce it - likely due to timezone). I will come with some better fix also for historical images but this should fix it for now (add it to your Dockerfile).

USER root 
RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C
RUN apt-get update ...

@mycaule
Copy link

mycaule commented Dec 14, 2023

A quick workaround that should fix if anyone sees the problem (I can't reproduce it - likely due to timezone). I will come with some better fix also for historical images but this should fix it for now (add it to your Dockerfile).

I added both the lines suggested in the issues and keep getting the error with this image apache/airflow:slim-2.7.3-python3.10.

RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C
RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29

Even this which is not recommended doesn't pass the error

RUN apt update --allow-unauthenticated

@potiuk
Copy link
Member Author

potiuk commented Dec 14, 2023

A quick workaround that should fix if anyone sees the problem (I can't reproduce it - likely due to timezone). I will come with some better fix also for historical images but this should fix it for now (add it to your Dockerfile).

Is time set properly on your host ?

@mycaule
Copy link

mycaule commented Dec 14, 2023

I am in Europe just like you.

@potiuk
Copy link
Member Author

potiuk commented Dec 14, 2023

How about this:

RUN sudo gpg --recv-keys 3A79BD29

@potiuk
Copy link
Member Author

potiuk commented Dec 14, 2023

( and I am talking about time not timezone) - whether your time is set properly on your machine

@ltken123
Copy link

RUN sudo gpg --recv-keys 3A79BD29

This isn't working for me either, no so great workaround to get my builds to continue is just to remove mysql for now

@potiuk
Copy link
Member Author

potiuk commented Dec 14, 2023

Can anyone post the full log of failing installation in text form, please?

@adalbertjnr
Copy link

How about this:

RUN sudo gpg --recv-keys 3A79BD29

i think the new key version is: A8D3785C
https://dev.mysql.com/doc/refman/8.2/en/checking-gpg-signature.html
the thing is even if i set this before my apt-get update looks like it doesn't override the default 467B942D3A79BD29
I've tried
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys A8D3785C
&& gpg --export "A8D3785C" > "/etc/apt/trusted.gpg.d/mysql.gpg"

@adalbertjnr
Copy link

Can anyone post the full log of failing installation in text form, please?

Removing intermediate container 046364755c82
 ---> 191275aaf947
Step 18/31 : RUN apt-get -y update
 ---> Running in c4c4b8e81052
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://repo.mysql.com/apt/debian bullseye InRelease [17.9 kB]
Get:5 https://packages.microsoft.com/debian/11/prod bullseye InRelease [3649 B]
Get:6 http://deb.debian.org/debian bullseye/main amd64 Packages [8062 kB]
Get:7 https://apt.postgresql.org/pub/repos/apt bullseye-pgdg InRelease [123 kB]
Get:8 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [260 kB]
Get:9 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [17.7 kB]
Err:4 http://repo.mysql.com/apt/debian bullseye InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
Get:10 https://packages.microsoft.com/debian/11/prod bullseye/main armhf Packages [24.9 kB]
Get:11 https://packages.microsoft.com/debian/11/prod bullseye/main amd64 Packages [131 kB]
Get:12 https://packages.microsoft.com/debian/11/prod bullseye/main all Packages [1214 B]
Get:13 https://packages.microsoft.com/debian/11/prod bullseye/main arm64 Packages [27.5 kB]
Get:14 https://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 Packages [305 kB]
Reading package lists...
W: GPG error: http://repo.mysql.com/apt/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
E: The repository 'http://repo.mysql.com/apt/debian bullseye InRelease' is not signed.

@furquan39
Copy link

furquan39 commented Dec 14, 2023

Can anyone post the full log of failing installation in text form, please?

[error]#7 0.874 Get:12 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [260 kB]
[error]#7 0.981 Get:13 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [17.7 kB]
[error]#7 1.094 Get:14 https://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 Packages [305 kB]
[error]#7 2.444 W: GPG error: http://repo.mysql.com/apt/debian bullseye InRelease: The following signatures were invalid: EXPKEYSIG 467B942D3A79BD29 MySQL Release Engineering mysql-build@oss.oracle.com
[error]#7 2.444 E: The repository 'http://repo.mysql.com/apt/debian bullseye InRelease' is not signed.
[error]#7 ERROR: process "/bin/bash -o pipefail -o errexit -o nounset -o nolog -c apt-get update && apt-get install -y --no-install-recommends openssh-server && apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/" did not complete successfully: exit code: 100
[error]------
[error] > [ 3/10] RUN apt-get update && apt-get install -y --no-install-recommends openssh-server && apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/
:
[error]0.765 Get:8 https://packages.microsoft.com/debian/11/prod bullseye/main all Packages [1214 B]
[error]0.785 Get:9 https://packages.microsoft.com/debian/11/prod bullseye/main arm64 Packages [27.5 kB]
[error]0.794 Get:10 https://packages.microsoft.com/debian/11/prod bullseye/main armhf Packages [24.9 kB]
[error]0.795 Get:11 https://packages.microsoft.com/debian/11/prod bullseye/main amd64 Packages [131 kB]
[error]0.874 Get:12 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [260 kB]
[error]0.981 Get:13 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [17.7 kB]
[error]1.094 Get:14 https://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 Packages [305 kB]
[error]2.444 W: GPG error: http://repo.mysql.com/apt/debian bullseye InRelease: The following signatures were invalid: EXPKEYSIG 467B942D3A79BD29 MySQL Release Engineering mysql-build@oss.oracle.com
[error]2.444 E: The repository 'http://repo.mysql.com/apt/debian bullseye InRelease' is not signed.
[error]------
[error]Dockerfile:11
[error]--------------------
[error] 10 |
[error] 11 | >>> RUN apt-get update
[error] 12 | >>> && apt-get install -y --no-install-recommends
[error] 13 | >>> openssh-server
[error] 14 | >>> && apt-get autoremove -yqq --purge
[error] 15 | >>> && apt-get clean
[error] 16 | >>> && rm -rf /var/lib/apt/lists/*
[error] 17 |
[error]--------------------
[error]ERROR: failed to solve: process "/bin/bash -o pipefail -o errexit -o nounset -o nolog -c apt-get update && apt-get install -y --no-install-recommends openssh-server && apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

@potiuk
Copy link
Member Author

potiuk commented Dec 14, 2023

i think the new key version is: A8D3785C
https://dev.mysql.com/doc/refman/8.2/en/checking-gpg-signature.html
the thing is even if i set this before my apt-get update looks like it doesn't override the default 467B942D3A79BD29
I've tried
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys A8D3785C
&& gpg --export "A8D3785C" > "/etc/apt/trusted.gpg.d/mysql.gpg"

Dod it work @souzagmu ?

@adalbertjnr
Copy link

i think the new key version is: A8D3785C
https://dev.mysql.com/doc/refman/8.2/en/checking-gpg-signature.html
the thing is even if i set this before my apt-get update looks like it doesn't override the default 467B942D3A79BD29
I've tried
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys A8D3785C
&& gpg --export "A8D3785C" > "/etc/apt/trusted.gpg.d/mysql.gpg"

Dod it work @souzagmu ?
no, it doesn't.

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.3VoQnop4Cj/gpg.1.sh --keyserver pgp.mit.edu --recv-keys A8D3785C
gpg: key B7B3B788A8D3785C: public key "MySQL Release Engineering <mysql-build@oss.oracle.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: WARNING: nothing exported

and then got the

W: GPG error: http://repo.mysql.com/apt/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
E: The repository 'http://repo.mysql.com/apt/debian bullseye InRelease' is not signed.

@fdintino
Copy link

It looks as though the apt repository still has the old gpg key set: https://repo.mysql.com/apt/debian/conf/distributions

@potiuk
Copy link
Member Author

potiuk commented Dec 14, 2023

I think it might depend on which cache you hit

@acmarco
Copy link

acmarco commented Dec 14, 2023

It looks as though the apt repository still has the old gpg key set: https://repo.mysql.com/apt/debian/conf/distributions

For us we couldn't get the reference to the old key to go away. If it's hardcoded in the repo itself, this would explain it.

Right now, for us what works is to remove the mysql repo from the sources in our docker image based on apache/airflow:2.6.3-python3.10

so

RUN rm /etc/apt/sources.list.d/mysql.list

@potiuk
Copy link
Member Author

potiuk commented Dec 14, 2023

Yeah. That's a quick fix if you need no mysql. I still cannot reproduce it even if I run it from scratch . So I think it really depends which cache you hit ... I am afraid we have to wait until cache refreshes globally and then fix it.

@mycaule
Copy link

mycaule commented Dec 15, 2023

If you are not sure of the GPG signature or can't find the mysql.list file, you can also just do this until a fix is coming out.

RUN apt update --allow-insecure-repositories

@Taragolis
Copy link
Contributor

Taragolis commented Dec 15, 2023

I think the problem might be on Oracle side, packages are signed by expired key 3A79BD29 and new GPG key doesn't 3A79BD29, but according to the https://dev.mysql.com/doc/refman/8.0/en/checking-gpg-signature.html it should use new one:

Note

The 3A79BD29 key expires on 2023-12-14. A new replacement key (A8D3785C) will sign upcoming MySQL 8.0.36 and higher packages. Both keys are installed by the MySQL repository setup packages released with MySQL 8.0.35, and both keys are also available at https://repo.mysql.com/.

I've tried to reproduce on main and this also happen to me on x86_64, ARM64 not affected as usual because it use MariaDB client libraries

docker build . \
    --build-arg DOCKER_CONTEXT_FILES=./docker-context-files \
    --build-arg INSTALL_MYSQL_CLIENT="true" \
    --build-arg INSTALL_MYSQL_CLIENT_TYPE=mysql \
    --build-arg INSTALL_MSSQL_CLIENT="true" \
    --build-arg INSTALL_POSTGRES_CLIENT="true" \
    --tag "airflow-image:dec-15"

Then I've tried to replace

export_key "467B942D3A79BD29" "mysql"

By add both keys

    export_key "467B942D3A79BD29" "mysql-2022"
    export_key "A8D3785C" "mysql-2023"

then I've got

7.158 Reading package lists...
7.428 W: GPG error: http://repo.mysql.com/apt/debian bookworm InRelease: The following signatures were invalid: EXPKEYSIG 467B942D3A79BD29 MySQL Release Engineering <mysql-build@oss.oracle.com>
7.428 E: The repository 'http://repo.mysql.com/apt/debian bookworm InRelease' is not signed.
------
Dockerfile:1506
--------------------
 1505 |     # That also protects against AUFS Docker backend problem where changing the executable bit required sync
 1506 | >>> RUN bash /scripts/docker/install_mysql.sh prod \
 1507 | >>>     && bash /scripts/docker/install_mssql.sh prod \
 1508 | >>>     && bash /scripts/docker/install_postgres.sh prod \
 1509 | >>>     && adduser --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password \
 1510 | >>>            --quiet "airflow" --uid "${AIRFLOW_UID}" --gid "0" --home "${AIRFLOW_USER_HOME_DIR}" \
 1511 | >>> # Make Airflow files belong to the root group and are accessible. This is to accommodate the guidelines from
 1512 | >>> # OpenShift https://docs.openshift.com/enterprise/3.0/creating_images/guidelines.html
 1513 | >>>     && mkdir -pv "${AIRFLOW_HOME}" \
 1514 | >>>     && mkdir -pv "${AIRFLOW_HOME}/dags" \
 1515 | >>>     && mkdir -pv "${AIRFLOW_HOME}/logs" \
 1516 | >>>     && chown -R airflow:0 "${AIRFLOW_USER_HOME_DIR}" "${AIRFLOW_HOME}" \
 1517 | >>>     && chmod -R g+rw "${AIRFLOW_USER_HOME_DIR}" "${AIRFLOW_HOME}" \
 1518 | >>>     && find "${AIRFLOW_HOME}" -executable -print0 | xargs --null chmod g+x \
 1519 | >>>     && find "${AIRFLOW_USER_HOME_DIR}" -executable -print0 | xargs --null chmod g+x
 1520 |     
--------------------

When I keep only new one

    export_key "A8D3785C" "mysql"

then I've got

14.63 Reading package lists...
14.89 W: GPG error: http://repo.mysql.com/apt/debian bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
14.89 E: The repository 'http://repo.mysql.com/apt/debian bookworm InRelease' is not signed.
------
Dockerfile:1505
--------------------
 1504 |     # That also protects against AUFS Docker backend problem where changing the executable bit required sync
 1505 | >>> RUN bash /scripts/docker/install_mysql.sh prod \
 1506 | >>>     && bash /scripts/docker/install_mssql.sh prod \
 1507 | >>>     && bash /scripts/docker/install_postgres.sh prod \
 1508 | >>>     && adduser --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password \
 1509 | >>>            --quiet "airflow" --uid "${AIRFLOW_UID}" --gid "0" --home "${AIRFLOW_USER_HOME_DIR}" \
 1510 | >>> # Make Airflow files belong to the root group and are accessible. This is to accommodate the guidelines from
 1511 | >>> # OpenShift https://docs.openshift.com/enterprise/3.0/creating_images/guidelines.html
 1512 | >>>     && mkdir -pv "${AIRFLOW_HOME}" \
 1513 | >>>     && mkdir -pv "${AIRFLOW_HOME}/dags" \
 1514 | >>>     && mkdir -pv "${AIRFLOW_HOME}/logs" \
 1515 | >>>     && chown -R airflow:0 "${AIRFLOW_USER_HOME_DIR}" "${AIRFLOW_HOME}" \
 1516 | >>>     && chmod -R g+rw "${AIRFLOW_USER_HOME_DIR}" "${AIRFLOW_HOME}" \
 1517 | >>>     && find "${AIRFLOW_HOME}" -executable -print0 | xargs --null chmod g+x \
 1518 | >>>     && find "${AIRFLOW_USER_HOME_DIR}" -executable -print0 | xargs --null chmod g+x
 1519 |     
--------------------

Even latest provided by Oracle APT repo configurator (mysql-apt-config_0.8.28-1_all.deb) use RPM-GPG-KEY-mysql-2022 and not RPM-GPG-KEY-mysql-2023

@potiuk Maybe it is a good point to switch to MariaDB client libraries by default for x86_64? Because I guess we have a chance to get the same troubleshooting in the end of the 2024. And this is not first time when Oracle MySQL libraries have some problem when MariaDB not, e.g.:

@Taragolis
Copy link
Contributor

we have a chance to get the same troubleshooting in the end of the 2024

Clarification in the end of October 2025

pub   rsa4096 2023-10-23 [SC] [expires: 2025-10-22]
          BCA43417C3B485DD128EC6D4B7B3B788A8D3785C
uid           MySQL Release Engineering <mysql-build@oss.oracle.com>
sub   rsa4096 2023-10-23 [E] [expires: 2025-10-22]

@potiuk
Copy link
Member Author

potiuk commented Dec 15, 2023

Yes. That's a good point @Taragolis - i forgot the ARM vs. X86 difference.

There are two bugs already issued for MySQL - pretty much everyon who installs MySQL is affected. The problem is that a number of their repositories is still signed with the expired key and it's impossible to instally MySQL with either of the keys

https://bugs.mysql.com/bug.php?id=113427
https://bugs.mysql.com/bug.php?id=113428

Apparently there are people there who viciously keep on refreshing the repository configuration in the hopes that MySQL will resign the repos.

I commented on it. for now I will add both keys now hoping that they will fix it quickly AND switch to MariaDB fo CI as at the moment we change it, our CI will start failing (and we will test if all tests pass).

We already have our CI showing the same errors - our CI - docker production examples - started to fail with the same error https://github.com/apache/airflow/actions/runs/7216372073/job/19662473895

@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

Having same issue with airflow:2.5.3-python3.7

2.5.* are next to go.

@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

The 2.5.* images are patched @portoedu - let me know if it works for you (make sure to pull the images rather than using cache.

@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

The 2.4.* images are patched:. Again request to maintainer :)

@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

2.3.* images patched.

@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

@portoedu - let us know if your 2.5.3 images work

@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

2.2.* patched.

@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

2.1.* patched

@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

2.0.* patched.

@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

Everyone who watched it - all the past released images of Airflow should have been patched with the new keys (and they should be also resilient to 2025 changes of the key - the mysql repository has been removed from apt repos (mysql is still installed in the images.

Closing the issue now - finally.

@potiuk potiuk closed this as completed Dec 16, 2023
@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

I also commented on all the issues opened in MySQL for that one, because I believe the policy of MySQL on sigining their repositories is deeply flawed and suggested them to change it.

Here is the comment I made:

Thanks for the fix. I think however the policy of Oracle/MySQL to have expiry date for your software is deeply flawed.

We had to manually fix all ~50 images we released in the past of our for Apache Airflow because of the expiry date.

Nobody else does it. Postgres, MariaDB, even MsSQL put no expiry date on the keys that are used to sign repos.

By putting expiry key on your apt repository you basically put an expiry date on your software and this expiry date gets shorter and shorter.

A good example of that are your own images that are affected. We had a user asking us for help in Airflow repo #36231 (comment)

to help to fix the same issue with mysql:8.0.35-debian image of yours and we sent them to your support (as well, you should deal with your own problems).

This image has been released just 25 days ago. And due to the flawed policy of having an expiry date on your key, effectively lifetime of this image was 24 days. Not much. And likely you have a number of those images (similarly as what we had 50 of ours). Now I guess you need to retroactively rebuild/patch your images - which is something the flawed policy of yours made us to get 36 hours of scrambling and and answering support issues of our users (which we did despite our team is made of volunteers, not paid staff as is in the case of MySQL/Oracle).

We kinda lost faith in Oracle being a good steward of MySQL apt repos and we decided in Apache Airflow in accelerated discussion and (currently running) lazy consensus, to switch to MariaDB clients for all our future releases (including the 2.8.0 release that was actually delayed by at least 2 days because of this bug).

Lazy consensus thread here: https://lists.apache.org/list.html?dev@airflow.apache.org

I hope - for the sake of your users loosing days due to such issues, you will reconsider your policies around signing your APT repos.

@pilipe-ar
Copy link

pilipe-ar commented Dec 18, 2023

Hi there, for those using Debian, and having the apt-key is deprecated. Manage keyring files in trusted.gpg.d instead. You should save a file in the trusted.gpg.d folder with the new key:

sudo wget https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 -O /etc/apt/trusted.gpg.d/mysql2023
sudo gpg --dearmor /etc/apt/trusted.gpg.d/mysql2023
sudo rm /etc/apt/trusted.gpg.d/mysql2023

Then update and upgrade as usual.

Edit: added the gpg --dearmor as it need to be binary for apt to read.

@potiuk
Copy link
Member Author

potiuk commented Dec 18, 2023

sudo wget https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 /etc/apt/trusted.gpg.d/mysql2023.gpg

Yep. Not needed anymore for Airflow images (you can just re-pull the images and the key is added there as well as mysql Repo removed, but for generic debian-based images the above should work (after Oracle/MySQL resigned they repos that is).

@portoedu
Copy link

@portoedu - let us know if your 2.5.3 images work

It works for me!
Thanks @potiuk

@henry-ht
Copy link

henry-ht commented Dec 19, 2023

any solution for mysql:5.7-debian?

my Dockerfile:

FROM mysql:5.7-debian

# http://mirrors.aliyun.com/debian
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29

RUN apt-get update && apt-get install -y --no-install-recommends \
        iputils-ping \
        vim-tiny \
        telnet \
        net-tools \
        pv \
        wget \
      && rm -rf /var/lib/apt/lists/*

COPY ./db-init.sql /docker-entrypoint-initdb.d/

EXPOSE 3306

@potiuk
Copy link
Member Author

potiuk commented Dec 19, 2023

Well. I can just repeat what I already wrote in #36231 (comment)

No idea. Look in your image documentation. It's mysql team that get us all into that mess, they shoudl fix their s*t and if they are poor in communicating where to look for help, then it's bad thing for them.

They are aware about the issue, they were told that their bad policy made their own images unusable, and we told them that they need to regenerate their images. If they did not (you might try to pull them again and see if they did) then you need to ask them how to fix it. I don't think anyone here is going to spend their time on fixing MySQL images in Airflow discussion.

We are all here volunteers and MySQL/Oracle has paid staff that should take care about fixing the problem they created in the first place.

@Taragolis
Copy link
Contributor

In additional MySQL 5.7 is End Of Life since end of the October 2023

@Taragolis Taragolis unpinned this issue Dec 20, 2023
@thewriteway
Copy link

thewriteway commented Dec 20, 2023

gpg --keyserver pgp.mit.edu --recv-keys B7B3B788A8D3785C
&& gpg --export B7B3B788A8D3785C > "/etc/apt/trusted.gpg.d/mysql.gpg"

pgp.mit.edu has been decommissioned saltstack/salt#63806 (comment) is there another server to replace it that holds the key?

Edit: Tried same other servers and it retrieves it but still failed with no public key available.
Edit2: in my case the issue was the mysql sources list file pointed directly at an invalid gpg name so once I removed that, it correctly picked up the key.
Edit3: the key source that worked was https://repo.mysql.com/RPM-GPG-KEY-mysql-2023

@potiuk
Copy link
Member Author

potiuk commented Dec 20, 2023

Any - look it up in comments. I think most people in the discussions above (including Airlfow image) use keyserver.ubuntu.com and fallback to pgp.surf.nl - but look it up in general GPG docs and google, there are some keyserver pools and the like, It's up to you to pick up the right servers following the distributed nature of GPG.

@Taragolis
Copy link
Contributor

# Please note that not all servers could be used for retrieve keys
# sks-keyservers.net: Unmaintained and DNS taken down due to GDPR requests.
# keys.openpgp.org: User ID Mandatory, not suitable for APT repositories
# keyring.debian.org: Only accept keys in Debian keyring.
# pgp.mit.edu: High response time.
local keyservers=(
"hkps://keyserver.ubuntu.com"
"hkps://pgp.surf.nl"
)

denyeart added a commit to denyeart/fabric-ca that referenced this issue Dec 20, 2023
Workaround for docker-library/mysql#1016
as provided in apache/airflow#36231.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
1natsu172 added a commit to 1natsu172/forked-isucon13 that referenced this issue Dec 31, 2023
patch: aptでmysqlの署名キー期限切れが発生しておりインストールでコケるのをパッチする apache/airflow#36231
@henry-ht
Copy link

henry-ht commented Jan 12, 2024

any solution for mysql:5.7-debian?

my Dockerfile:

FROM mysql:5.7-debian

# http://mirrors.aliyun.com/debian
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29

RUN apt-get update && apt-get install -y --no-install-recommends \
        iputils-ping \
        vim-tiny \
        telnet \
        net-tools \
        pv \
        wget \
      && rm -rf /var/lib/apt/lists/*

COPY ./db-init.sql /docker-entrypoint-initdb.d/

EXPOSE 3306

my solution

FROM mysql:5.7-debian

# http://mirrors.aliyun.com/debian
RUN rm /etc/apt/sources.list.d/mysql.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29

RUN apt-get update && apt-get install -y --no-install-recommends \
        iputils-ping \
        vim-tiny \
        telnet \
        net-tools \
        pv \
        wget \
      && rm -rf /var/lib/apt/lists/*

COPY ./db-init.sql /docker-entrypoint-initdb.d/

EXPOSE 3306

@medamin001
Copy link

sudo rm /etc/apt/trusted.gpg.d/mysql2023

This fixed the issue, thank you @pilipe-ar

sudo wget https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 -O /etc/apt/trusted.gpg.d/mysql2023
sudo gpg --dearmor /etc/apt/trusted.gpg.d/mysql2023
sudo rm /etc/apt/trusted.gpg.d/mysql2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests