我正在使用docker-compose来设置可扩展的气流群集.我的解决方案基于这个Dockerfile https://hub.docker.com/r/puckel/docker-airflow/
我的问题是将日志设置为从s3写入/读取.当一个dag完成后,我得到这样的错误
*** Log file isn't local.
*** Fetching here: http://ea43d4d49f35:8793/log/xxxxxxx/2017-06-26T11:00:00
*** Failed to fetch log file from worker.
*** Reading remote logs...
Could not read logs from s3://buckets/xxxxxxx/airflow/logs/xxxxxxx/2017-06-
26T11:00:00
Run Code Online (Sandbox Code Playgroud)
我在这个airflow.cfg文件中设置了一个新的部分
[MyS3Conn]
aws_access_key_id = xxxxxxx
aws_secret_access_key = xxxxxxx
aws_default_region = xxxxxxx
Run Code Online (Sandbox Code Playgroud)
然后在远程日志部分中指定s3路径 airflow.cfg
remote_base_log_folder = s3://buckets/xxxx/airflow/logs
remote_log_conn_id = MyS3Conn
Run Code Online (Sandbox Code Playgroud)
我是否正确设置了这个并且有错误?这里有成功的秘诀吗?
- 更新
我尝试以URI和JSON格式导出,似乎都不起作用.然后我导出了aws_access_key_id和aws_secret_access_key,然后气流开始捡起它.现在我在工作日志中得到了他的错误
6/30/2017 6:05:59 PMINFO:root:Using connection to: s3
6/30/2017 6:06:00 PMERROR:root:Could not read logs from s3://buckets/xxxxxx/airflow/logs/xxxxx/2017-06-30T23:45:00
6/30/2017 6:06:00 PMERROR:root:Could not write logs to s3://buckets/xxxxxx/airflow/logs/xxxxx/2017-06-30T23:45:00
6/30/2017 6:06:00 …Run Code Online (Sandbox Code Playgroud) 我正在通过此图像通过 docker 运行 Airflowapache/airflow:2.1.0
请参阅此线程以了解我遇到的初始错误。
目前我可以运行我以前现有的 DAG。但是,当我添加较新的 DAGS 时,我在日志文件中收到以下错误。我很确定这不是内存或计算的问题。
*** Log file does not exist: /opt/airflow/logs/my-task/my-task/2021-06-15T14:11:33.254428+00:00/1.log
*** Fetching from: http://:8793/log/my-task/my-task/2021-06-15T14:11:33.254428+00:00/1.log
*** Failed to fetch log file from worker. Unsupported URL protocol ''
Run Code Online (Sandbox Code Playgroud)
我已经尝试过的事情:
docker prune然后建造