Connection hello-world refused

I’m new about docker. I’m trying to use docker on debian trixie with kernel
Docker version is 24.0.6, build ed223bc.
I’m trying to launch hello-world image

docker images
hello-world   latest    9c7a54a9a43c   4 months ago   13.3kB

docker ps -a

When i try to launch hello world I’ve this answer

docker run hello-world
docker: Error response from daemon: failed to create task for container: failed to initialize logging driver: dial tcp connect: connection refused.
ERRO[0002] error waiting for container:

There are not processes on port 514

netstat -tulpn |grep :514

What am i wronging?

How did you install Docker? Did you change the settings? By default Docker logs to file, it seems it tries to connect with syslog here.

By docker’s repository

apt-cache policy docker-ce
  Installato: 5:24.0.6-1~debian.12~bookworm
  Candidato:  5:24.0.6-1~debian.12~bookworm
  Tabella versione:
 *** 5:24.0.6-1~debian.12~bookworm 500
        500 bookworm/stable amd64 Packages


I do not know. If u want some logs, tell me what do u need

Check daemon.json file, usually found in /etc/docker/.


  "log-driver": "syslog",
  "log-opts": {
    "syslog-address": "tcp://",
    "syslog-facility": "daemon",
    "tag": "{{.Name}}"

Your overall Docker installation is custom configured to use syslog on port 514, as you can see in your posted config.

Maybe that syslog service is not available at that port or blocked by firewall.

I found this guide for configure docker for send logs to syslog.
I arrived at this point

Modify (or create it, as I did) the Docker daemon configuration (“/etc/docker/daemon.json”) with sudo permissions, and add the following content:

  "log-driver": "syslog",
  "log-opts": {
    "tag": "container_name/{{.Name}}",
    "labels": "dev",
    "syslog-facility": "daemon"

After restarted docker, I runned my hello-world image.

ls -la /var/log/docker/
totale 108
drwxr-xr-x  2 root root  4096 15 set 00.06 .
drwxr-xr-x 17 root root  4096 15 set 00.00 ..
-rw-r-----  1 root adm  19235 15 set 00.06 daemon.log
-rw-r-----  1 root adm   2177 14 set 23.51 debian-acer_gallant_dubinsky.log
-rw-r-----  1 root adm  26070 14 set 23.53 debian-acer_modest_shockley.log
-rw-r-----  1 root adm   2145 14 set 23.55 debian-acer_peaceful_chaum.log
-rw-r-----  1 root adm  24970 14 set 23.53 debian-acer_reverent_solomon.log
-rw-r-----  1 root adm   2161 15 set 00.06 debian-acer_vigilant_bouman.log
# tail -f /var/log/docker/daemon.log
2023-09-14T23:54:55.560411+02:00 debian-acer dockerd[111321]: time="2023-09-14T23:54:55.560351053+02:00" level=info msg="Loading containers: start."
2023-09-14T23:54:57.567229+02:00 debian-acer dockerd[111321]: time="2023-09-14T23:54:57.565649674+02:00" level=info msg="Default bridge (docker0) is assigned with an IP address Daemon option --bip can be used to set a preferred IP address"
2023-09-14T23:54:57.780489+02:00 debian-acer dockerd[111321]: time="2023-09-14T23:54:57.780378732+02:00" level=info msg="Loading containers: done."
2023-09-14T23:54:57.984754+02:00 debian-acer dockerd[111321]: time="2023-09-14T23:54:57.984646927+02:00" level=info msg="Docker daemon" commit=1a79695 graphdriver=overlay2 version=24.0.6
2023-09-14T23:54:57.984996+02:00 debian-acer dockerd[111321]: time="2023-09-14T23:54:57.984714159+02:00" level=info msg="Daemon has completed initialization"
2023-09-14T23:54:58.172002+02:00 debian-acer dockerd[111321]: time="2023-09-14T23:54:58.171840181+02:00" level=info msg="API listen on /run/docker.sock"
2023-09-14T23:55:05.534520+02:00 debian-acer dockerd[111321]: time="2023-09-14T23:55:05.533016671+02:00" level=info msg="Configured log driver does not support reads, enabling local file cache for container logs" container=7651b4dd88d396912023d5504815460cc76a0f1423b03683943d499e2ff0b7cf driver=syslog
2023-09-14T23:55:06.459081+02:00 debian-acer dockerd[111321]: time="2023-09-14T23:55:06.458717363+02:00" level=info msg="ignoring event" container=7651b4dd88d396912023d5504815460cc76a0f1423b03683943d499e2ff0b7cf module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
2023-09-15T00:06:40.166375+02:00 debian-acer dockerd[111321]: time="2023-09-15T00:06:40.164914369+02:00" level=info msg="Configured log driver does not support reads, enabling local file cache for container logs" container=41bdb3fee1a7cf6ebb105293da4a885c1ff5e7291978c860693b068797aaf7d9 driver=syslog
2023-09-15T00:06:40.569800+02:00 debian-acer dockerd[111321]: time="2023-09-15T00:06:40.569525992+02:00" level=info msg="ignoring event" container=41bdb3fee1a7cf6ebb105293da4a885c1ff5e7291978c860693b068797aaf7d9 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"

But what was wrong in the previous configuration?

Your previous config was using a TCP address to connect to syslog, it seems that syslog itself wasn’t configured for that address.