Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WARNING: no logs are available with the 'none' log driver

I am following below url for logging driver

https://docs.docker.com/engine/admin/logging/overview/#configure-the-default-logging-driver

now, I want to remove this logging driver

I have remove file(daemon.json) from /etc/docker folder too.

But when I build container, system should always showing me warning

WARNING: no logs are available with the 'none' log driver

How can I get rid of this warning?

like image 215
Niko Jojo Avatar asked Jul 19 '17 06:07

Niko Jojo


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.

How do I run a container using 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.

How to get rid of warning “no logs available”?

To get rid of the warning WARNING: no logs are available with the 'none' log driver you should comment or remove those 2 lines. Show activity on this post. By default /etc/docker/daemon.json does not exist. The default driver is json-file. To verify current driver use

How to get rid of Docker service warning-no logs available?

Finally solved. 1) Delete daemon.json file from /etc/docker folder. 2) Restart docker service. Show activity on this post. My case. To get rid of the warning WARNING: no logs are available with the 'none' log driver you should comment or remove those 2 lines.

How do I find the logging driver for a running container?

To find the current logging driver for a running container, if the daemon is using the json-file logging driver, run the following docker inspect command, substituting the container name or ID for <CONTAINER>: Docker provides two modes for delivering messages from the container to the log driver:

Does the Docker log Loki driver actually work?

@tam481: no, the docker log loki driver works fine, it is just that since it is sitting on the host network, it does not have automatic access to the loki container running within a docker-compose project.


3 Answers

Finally solved.

1) Delete daemon.json file from /etc/docker folder.

2) Restart docker service.

like image 90
Niko Jojo Avatar answered Oct 08 '22 21:10

Niko Jojo


My case.

In file docker-compose.yml it is very possible that you have:

logging:
    driver: none

To get rid of the warning WARNING: no logs are available with the 'none' log driver you should comment or remove those 2 lines.

like image 38
Justice Bringer Avatar answered Oct 08 '22 20:10

Justice Bringer


By default /etc/docker/daemon.json does not exist. The default driver is json-file. To verify current driver use

docker info | grep Logging

Logging Driver: fluentd

I use fluentd (td-agent) so my /etc/docker/daemon.json

{
   "log-driver": "fluentd",
   "log-opts": {
   "fluentd-address": "127.0.0.1:24224"
              }
}

For details about logging, divers see https://docs.docker.com/config/containers/logging/

like image 1
zirf Avatar answered Oct 08 '22 21:10

zirf