Skip to main content
deleted 379 characters in body
Source Link
larsks
  • 38.4k
  • 6
  • 60
  • 78

I have a service defined via docker compose (see definition below). When I tried to start this service via docker-compose -f up --wait -d my_service, I get the error

Error response from daemon: failed to create task for container: failed to initialize logging driver: dial unix /dev/log: connect: protocol wrong type for socket

On my host server where I'm executing the docker compose cmd, I see the socket exists and my user has write perms:

srw-rw-rw-. 1 root root 0 Aug 29  2023 /dev/log

service definition:

  my_service:
    command: <omitted>
    ports:
     - <omitted>
    image: <omitted>
    user: <omitted>
    volumes:
      - <omitted>
      - <omitted>
      - <omitted>
      - "/dev/log:/dev/log"
    logging:
      driver: "syslog"
      options:
        syslog-address: "unix:///dev/log"
        tag: "my_service"
    environment:
      - <omitted>
      - <omitted>
      - <omitted>
    depends_on:
      another_service:
        condition: service_healthy
    healthcheck:
      test: ["CMD", <omitted>]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 30s

Does anyone know what could be causing this error?

I have a service defined via docker compose (see definition below). When I tried to start this service via docker-compose -f up --wait -d my_service, I get the error

Error response from daemon: failed to create task for container: failed to initialize logging driver: dial unix /dev/log: connect: protocol wrong type for socket

On my host server where I'm executing the docker compose cmd, I see the socket exists and my user has write perms:

srw-rw-rw-. 1 root root 0 Aug 29  2023 /dev/log

service definition:

  my_service:
    command: <omitted>
    ports:
     - <omitted>
    image: <omitted>
    user: <omitted>
    volumes:
      - <omitted>
      - <omitted>
      - <omitted>
      - "/dev/log:/dev/log"
    logging:
      driver: "syslog"
      options:
        syslog-address: "unix:///dev/log"
        tag: "my_service"
    environment:
      - <omitted>
      - <omitted>
      - <omitted>
    depends_on:
      another_service:
        condition: service_healthy
    healthcheck:
      test: ["CMD", <omitted>]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 30s

Does anyone know what could be causing this error?

I have a service defined via docker compose (see definition below). When I tried to start this service via docker-compose -f up --wait -d my_service, I get the error

Error response from daemon: failed to create task for container: failed to initialize logging driver: dial unix /dev/log: connect: protocol wrong type for socket

On my host server where I'm executing the docker compose cmd, I see the socket exists and my user has write perms:

srw-rw-rw-. 1 root root 0 Aug 29  2023 /dev/log

service definition:

  my_service:
    command: <omitted>
    image: <omitted>
    volumes:
      - "/dev/log:/dev/log"
    logging:
      driver: "syslog"
      options:
        syslog-address: "unix:///dev/log"
        tag: "my_service"

Does anyone know what could be causing this error?

Source Link

syslog logging driver giving the error protocol wrong type for socket

I have a service defined via docker compose (see definition below). When I tried to start this service via docker-compose -f up --wait -d my_service, I get the error

Error response from daemon: failed to create task for container: failed to initialize logging driver: dial unix /dev/log: connect: protocol wrong type for socket

On my host server where I'm executing the docker compose cmd, I see the socket exists and my user has write perms:

srw-rw-rw-. 1 root root 0 Aug 29  2023 /dev/log

service definition:

  my_service:
    command: <omitted>
    ports:
     - <omitted>
    image: <omitted>
    user: <omitted>
    volumes:
      - <omitted>
      - <omitted>
      - <omitted>
      - "/dev/log:/dev/log"
    logging:
      driver: "syslog"
      options:
        syslog-address: "unix:///dev/log"
        tag: "my_service"
    environment:
      - <omitted>
      - <omitted>
      - <omitted>
    depends_on:
      another_service:
        condition: service_healthy
    healthcheck:
      test: ["CMD", <omitted>]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 30s

Does anyone know what could be causing this error?