jdddog edited a comment on issue #17546:
URL: https://github.com/apache/airflow/issues/17546#issuecomment-925442262


   I had a similar issue with the apache/airflow:2.1.4-python3.8 Docker image:
   ```python
   WARNING:root:OSError while attempting to symlink the latest log directory
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.8/site-packages/MySQLdb/__init__.py", line 
18, in <module>
       from . import _mysql
   ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate 
memory in static TLS block
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/home/airflow/.local/bin/airflow", line 5, in <module>
       from airflow.__main__ import main
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/__init__.py", line 
46, in <module>
       settings.initialize()
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/settings.py", line 
445, in initialize
       configure_adapters()
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/settings.py", line 
325, in configure_adapters
       import MySQLdb.converters
     File 
"/home/airflow/.local/lib/python3.8/site-packages/MySQLdb/__init__.py", line 
24, in <module>
       version_info, _mysql.version_info, _mysql.__file__
   NameError: name '_mysql' is not defined
   Running command: airflow users create
   ```
   
   The LD_PRELOAD fix didn't work for me.
   
   In my case it occurred when using remote logging with Google Cloud Storage 
and the Google Cloud Secrets backend. With these two services off it didn't 
occur. Unfortunately I haven't had a chance to test it with one or the other 
off.
   
   What fixed it was removing all the Python packages installed by the Airflow 
Docker image, including the airflow providers, before re-installing Airflow and 
just installing a subset of the providers and required Python packages.
   ```bash
   RUN pip freeze | xargs pip uninstall -y
   RUN python -m pip install --upgrade pip
   RUN pip cache purge 
   ```
   I'm happy to give more details or investigate a little bit more if it is 
helpful.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to