Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Missing container logs when using docker-compose up #510

Open
abhaygupta97 opened this issue Sep 9, 2021 · 0 comments
Open

Missing container logs when using docker-compose up #510

abhaygupta97 opened this issue Sep 9, 2021 · 0 comments

Comments

@abhaygupta97
Copy link

abhaygupta97 commented Sep 9, 2021

I have a docker-compose.yml file which starts logspout container and other containers in my application. On doing docker-compose up, in some cases log files are not getting created for some containers.

When log files are not getting created, I saw in logspout logs that container log is getting created in pump.Run but not getting started. Eg: In following case for 2961bd4368e6, we see there is create log but no start log

2021/09/09 15:22:52 pump.Run() event: 6816c90083fc create
**2021/09/09 15:22:52 pump.Run() event: 2961bd4368e6 create**
2021/09/09 15:22:52 pump.Run() event: c5af90f76a7a create
2021/09/09 15:22:53 pump.Run() event: 6816c90083fc start
2021/09/09 15:22:53 pump.pumpLogs(): 6816c90083fc started, tail: all
2021/09/09 15:22:54 pump.Run() event: c5af90f76a7a start
2021/09/09 15:22:54 pump.pumpLogs(): c5af90f76a7a started, tail: all

Restarting the container for which logs are missing using sudo -E docker-compose -f <compose-file-path> restart <container-name> fixes the issue.

How to ensure that log files are not missing when doing docker-compose up?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant