You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ianbuss (via GitHub)" <gi...@apache.org> on 2025/04/03 17:44:04 UTC

[I] Log serving fails for Celery with InvalidKeyError [airflow]

ianbuss opened a new issue, #48759:
URL: https://github.com/apache/airflow/issues/48759

   ### Apache Airflow version
   
   3.0.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   When running a task and viewing the live logs in the UI, the following is seen:
   
   ```
   Could not read served logs: Expecting a EllipticCurvePrivateKey/EllipticCurvePublicKey. Wrong key provided for EdDSA algorithms
   ```
   
   ![Image](https://github.com/user-attachments/assets/2e5b44a7-1ea6-4f2a-ad89-0dcd47e5b5e5)
   
   The apiserver logs the following stack trace:
   
   ```
   [2025-04-03T17:31:27.300+0000] {file_task_handler.py:590} ERROR - Could not read served logs
   Traceback (most recent call last):
     File "/usr/local/lib/python3.12/site-packages/airflow/utils/log/file_task_handler.py", line 567, in _read_from_logs_server
       response = _fetch_logs_from_service(url, rel_path)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.12/site-packages/airflow/utils/log/file_task_handler.py", line 112, in _fetch_logs_from_service
       headers={"Authorization": generator.generate({"filename": log_relative_path})},
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.12/site-packages/airflow/api_fastapi/auth/tokens.py", line 458, in generate
       return jwt.encode(claims, self.signing_arg, algorithm=self.algorithm, headers=headers)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.12/site-packages/jwt/api_jwt.py", line 78, in encode
       return api_jws.encode(
              ^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.12/site-packages/jwt/api_jws.py", line 170, in encode
       key = alg_obj.prepare_key(key)
             ^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.12/site-packages/jwt/algorithms.py", line 738, in prepare_key
       raise InvalidKeyError(
   jwt.exceptions.InvalidKeyError: Expecting a EllipticCurvePrivateKey/EllipticCurvePublicKey. Wrong key provided for EdDSA algorithms
   ```
   
   ### What you think should happen instead?
   
   The apiserver should be able to read logs from the worker using the pre-shared secret in `webserver.secret_key`
   
   ### How to reproduce
   
   Create an Airflow 3 Celery instance, run a task that runs for a while, and view the live logs in the UI.
   
   ### Operating System
   
   Linux
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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-unsubscribe@airflow.apache.org.apache.org

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


Re: [I] Log serving fails for Celery with InvalidKeyError [airflow]

Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish closed issue #48759: Log serving fails for Celery with InvalidKeyError
URL: https://github.com/apache/airflow/issues/48759


-- 
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-unsubscribe@airflow.apache.org

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