相关疑难解决方法(0)

为气流中的日志设置s3

我正在使用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)

python amazon-s3 airflow

33
推荐指数
3
解决办法
2万
查看次数

标签 统计

airflow ×1

amazon-s3 ×1

python ×1