Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Logs are not available through Docker API when running on AWS #19

Open
markbirbeck opened this issue Jun 18, 2018 · 2 comments
Open

Logs are not available through Docker API when running on AWS #19

markbirbeck opened this issue Jun 18, 2018 · 2 comments
Labels
question Further information is requested

Comments

@markbirbeck
Copy link
Owner

markbirbeck commented Jun 18, 2018

When working on #17 I discovered that something quirky happens at the point where we try to retrieve the logs:

$ dj --showlogs --ssh-hostname docker@ec2-[snip].amazonaws.com --ssh-identity-file ../docker-swarm.pem --ssh-remote /var/run/docker.sock hello-world
6jrmk4pm[snip]m27rt
About to get logs for container: e5afa446e1fa9c233c2[snip]542bba66593374c53085fd0719cdc42a4
kgeh0mfldrdpz85lc8lgx8m0e: (HTTP code 404) unexpected - No such container: e5afa446e1fa9c233c2[snip]542bba66593374c53085fd0719cdc42a4

Although the error message is a bit strange, it's almost certainly caused by AWS sending all logs to CloudWatch rather than Docker looking after them itself.

I'm not sure if it's possible to tell the Swarm to use a different log driver when running the service, or whether AWS just ignores those settings. It might mean trying to get the logs from CloudWatch which could be a right pain.

@markbirbeck markbirbeck added the question Further information is requested label Jun 18, 2018
@markbirbeck
Copy link
Owner Author

It might be best to move this issue down to the docker-engine module.

@markbirbeck
Copy link
Owner Author

Looks like it is possible to change the logging policy at the container level, at least, with something like:

docker -H localhost:2374 run --log-driver json-file hello-world

So we'll have to play around and see if we can do the same thing with a service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant