ant-bl opened a new issue, #36715:
URL: https://github.com/apache/airflow/issues/36715

   ### Apache Airflow version
   
   2.8.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   The libmariadb.so.3 is missing from the airflow Docker image leading to 
failure of mysql connections.
   
   ### What you think should happen instead?
   
   The package must be installed inside the Docker image.
   
   ### How to reproduce
   
   ```
   docker run -it --entrypoint  /bin/bash apache/airflow
   airflow@e6f8c457c3ee:/opt/airflow$ python3
   Python 3.8.18 (default, Nov 29 2023, 06:14:45) 
   [GCC 12.2.0] on linux
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import MySQLdb
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File 
"/home/airflow/.local/lib/python3.8/site-packages/MySQLdb/__init__.py", line 
17, in <module>
       from . import _mysql
   ImportError: libmariadb.so.3: cannot open shared object file: No such file 
or directory
   
   ldd 
/home/airflow/.local/lib/python3.8/site-packages/MySQLdb/_mysql.cpython-38-x86_64-linux-gnu.so
        linux-vdso.so.1 (0x00007fff5138d000)
        libmariadb.so.3 => not found
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd958b6f000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd958d65000)
   ```
   The mysql connection fails
   
   ```
   'Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/common/sql/hooks/sql.py",
 line 569, in test_connection
       if self.get_first(self._test_connection_sql):
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/common/sql/hooks/sql.py",
 line 264, in get_first
       return self.run(sql=sql, parameters=parameters, 
handler=fetch_one_handler)
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/common/sql/hooks/sql.py",
 line 385, in run
       with closing(self.get_conn()) as conn:
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/mysql/hooks/mysql.py",
 line 192, in get_conn
       import MySQLdb
     File 
"/home/airflow/.local/lib/python3.8/site-packages/MySQLdb/__init__.py", line 
17, in <module>
       from . import _mysql
   ImportError: libmariadb.so.3: cannot open shared object file: No such file 
or directory
   ```
   
   ### Operating System
   
   Ubuntu
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-amazon==8.13.0
   apache-airflow-providers-celery==3.5.0
   apache-airflow-providers-cncf-kubernetes==7.11.0
   apache-airflow-providers-common-sql==1.9.0
   apache-airflow-providers-docker==3.8.2
   apache-airflow-providers-elasticsearch==5.3.0
   apache-airflow-providers-ftp==3.7.0
   apache-airflow-providers-google==10.12.0
   apache-airflow-providers-grpc==3.4.0
   apache-airflow-providers-hashicorp==3.6.0
   apache-airflow-providers-http==4.8.0
   apache-airflow-providers-imap==3.5.0
   apache-airflow-providers-microsoft-azure==8.4.0
   apache-airflow-providers-mysql==5.5.0
   apache-airflow-providers-odbc==4.2.0
   apache-airflow-providers-openlineage==1.3.0
   apache-airflow-providers-postgres==5.9.0
   apache-airflow-providers-redis==3.5.0
   apache-airflow-providers-sendgrid==3.4.0
   apache-airflow-providers-sftp==4.8.0
   apache-airflow-providers-slack==8.5.0
   apache-airflow-providers-snowflake==5.2.0
   apache-airflow-providers-sqlite==3.6.0
   apache-airflow-providers-ssh==3.9.0
   
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to