Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

configured logging driver does not support reading : Docker

I am running my docker container in AWS ECS. When i try to execute the below command to read the logs from container, i am facing the below error.

command: docker logs -f "Container ID"

Error response from daemon: configured logging driver does not support reading.

Any feasible solutions are welcome.

like image 951
palani.p Avatar asked Sep 14 '18 06:09

palani.p


People also ask

How do you change the default logging driver for the docker daemon in Linux?

To configure the Docker daemon to default to a specific logging driver, set the value of log-driver to the name of the logging driver in the daemon. json configuration file. Refer to the “daemon configuration file” section in the dockerd reference manual for details.

What is docker daemon logging?

Docker daemon logs are generated by the Docker platform and located on the host. Depending on the host operating system, daemon logs are written to the system's logging service or to a log file. If you were to collect only container logs you'd get insight into the state of your services.

How can you run a container that uses a json-file driver?

To use the json-file driver as the default logging driver, set the log-driver and log-opts keys to appropriate values in the daemon. json file, which is located in /etc/docker/ on Linux hosts or C:\ProgramData\docker\config\ on Windows Server. If the file does not exist, create it first.


1 Answers

According to information commented by David Maze, you must have your container run with a awslogs log driver.

Here is the setting introduction.

After changing log driver to json-file, you could get log by executing docker logs container-id/name.

But still note this:

If using the Fargate launch type, the only supported value is awslogs.

like image 183
Light.G Avatar answered Sep 27 '22 01:09

Light.G