Docker容器更改时,Elastic Beanstalk日志路径未更新 [英] Elastic Beanstalk Log Path Not Updating When Docker Container Changes

查看:125
本文介绍了Docker容器更改时,Elastic Beanstalk日志路径未更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用docker启动ElasticBeanstalk实例时,我将日志流传输到名为 / aws / elasticbeanstalk / {app_name} / var / log / eb-docker / containers / eb-current- app / stdouterr.log 。如果我将更新推送到该beantalk应用,则docker容器将终止,并在该位置启动一个新的docker容器。问题是,发生这种情况时,日志是在新的Docker容器ID下生成的,但它们没有流式传输到cloudwatch。

When I launch an ElasticBeanstalk instance with docker I get log streaming to cloudwatch in a group named /aws/elasticbeanstalk/{app_name}/var/log/eb-docker/containers/eb-current-app/stdouterr.log. If I push an update to this beanstalk app the docker container is terminated, and a new docker container is launched in it's place. The issue is that when this happens, logs are being generated under the new docker container id, but they are not streaming to cloudwatch.

如何更新我的Docker容器和继续将日志流传输到cloudwatch?

How can I update my docker container and continue streaming logs to cloudwatch?

推荐答案

这可能是由于您的日志消息具有相同的哈希值,因此Cloud Watch Agent正在获取困惑。请参阅在弹性监视日志组中未显示任何日志beantalk环境

It might be due to your log messages having the same hash so the Cloud Watch Agent is getting confused. See No logs appear on Cloudwatch log group for elastic beanstalk environment

这篇关于Docker容器更改时,Elastic Beanstalk日志路径未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆