Docker compose reports an error when deploying citus, hope to get help

Problem

I’m trying to deploy citus via docker compose, but some problems occurred。

my fedora version

                                         emt@fedora 
             .',;::::;,'.                ---------- 
         .';:cccccccccccc:;,.            OS: Fedora Linux 41 (Workstation Edition) x86_64 
      .;cccccccccccccccccccccc;.         Host: MS-7C94 1.0 
    .:cccccccccccccccccccccccccc:.       Kernel: 6.11.4-300.fc41.x86_64 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Uptime: 12 mins 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Shell: bash 5.2.32 
.:ccccccccccccc;KMMc;cc;xMMc;ccccccc:.   Resolution: 2560x1440 
,cccccccccccccc;MMM.;cc;;WW:;cccccccc,   DE: GNOME 47.0 (wayland) 
:cccccccccccccc;MMM.;cccccccccccccccc:   WM: Mutter 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   WM Theme: Adwaita 
cccccc;0MMKxdd:;MMMkddc.;cccccccccccc;   Theme: Adwaita [GTK2/3] 
ccccc;XM0';cccc;MMM.;cccccccccccccccc'   Icons: Adwaita [GTK2/3] 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Terminal: goland 
ccccc;0MNc.ccc.xMMd;ccccccccccccccc;     CPU: AMD Ryzen 5 5600G (12) @ 4.464GHz 
cccccc;dNMWXXXWM0:;cccccccccccccc:,      GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series 
cccccccc;.:odl:.;cccccccccccccc:,.       Memory: 4862.71 MiB / 13856.97 MiB 
:cccccccccccccccccccccccccccc:'.      
.:cccccccccccccccccccccc:;,..                                    
  '::cccccccccccccc::;,.                                         

my docker info

emt@fedora:~/GolandProjects/docker$ sudo docker info
Client:
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  0.17.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  2.29.7
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 23
  Running: 0
  Paused: 0
  Stopped: 23
 Images: 30
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: btrfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: /usr/bin/tini-static
 containerd version: 2.fc41
 runc version: 
 init version: 
 Security Options:
  seccomp
   Profile: builtin
  selinux
  cgroupns
 Kernel Version: 6.11.4-300.fc41.x86_64
 Operating System: Fedora Linux 41 (Workstation Edition)
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 13.53GiB
 Name: fedora
 ID: 0d2bc89d-7526-494b-bfd5-7921f570f493
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

my docker compose version

Docker Compose version 2.29.7

my docker-compose.yml file,the file is from here

# This file is auto generated from it's template,
# see citusdata/tools/packaging_automation/templates/docker/latest/docker-compose.tmpl.yml.
version: "3"

services:
  master:
    container_name: "${COMPOSE_PROJECT_NAME:-citus}_master"
    image: "citusdata/citus:12.1.3"
    ports: ["${COORDINATOR_EXTERNAL_PORT:-5432}:5432"]
    labels: ["com.citusdata.role=Master"]
    environment: &AUTH
      POSTGRES_USER: "${POSTGRES_USER:-postgres}"
      POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-example}"
      PGUSER: "${POSTGRES_USER:-postgres}"
      PGPASSWORD: "${POSTGRES_PASSWORD:-example}"
      POSTGRES_HOST_AUTH_METHOD: "${POSTGRES_HOST_AUTH_METHOD:-trust}"
  worker:
    image: "citusdata/citus:12.1.3"
    labels: ["com.citusdata.role=Worker"]
    depends_on: [manager]
    environment: *AUTH
    command: "/wait-for-manager.sh"
    volumes:
      - healthcheck-volume:/healthcheck
  manager:
    container_name: "${COMPOSE_PROJECT_NAME:-citus}_manager"
    image: "citusdata/membership-manager:0.3.0"
    volumes:
      - "${DOCKER_SOCK:-/var/run/docker.sock}:/var/run/docker.sock"
      - healthcheck-volume:/healthcheck
    depends_on: [master]
    environment: *AUTH
volumes:
  healthcheck-volume:

wait-for-manager.sh is here , same in the project

#!/bin/bash
# wait-for-manager.sh

set -e

until test -f /healthcheck/manager-ready ; do
  >&2 echo "Manager is not ready - sleeping"
  sleep 1
done

>&2 echo "Manager is up - starting worker"

exec gosu postgres "/usr/local/bin/docker-entrypoint.sh" "postgres"

when i try to use this command

sudo docker compose -p citus up --scale worker=3

here is the result

 sudo docker compose -p citus up --scale worker=3
WARN[0000] /home/emt/GolandProjects/docker/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Running 5/5
 ✔ Container citus_manager   Recreated                                                                                                                                                     0.2s 
 ✔ Container citus_master    Recreated                                                                                                                                                     0.1s 
 ✔ Container citus-worker-3  Recreated                                                                                                                                                     0.1s 
 ✔ Container citus-worker-1  Recreated                                                                                                                                                     0.1s 
 ✔ Container citus-worker-2  Recreated                                                                                                                                                     0.1s 
Attaching to worker-1, worker-2, worker-3, citus_manager, citus_master
citus_master   | 
citus_master   | PostgreSQL Database directory appears to contain a database; Skipping initialization
citus_master   | 
citus_master   | 2024-10-21 15:20:18.786 UTC [1] LOG:  number of prepared transactions has not been configured, overriding
citus_master   | 2024-10-21 15:20:18.786 UTC [1] DETAIL:  max_prepared_transactions is now set to 200
citus_master   | 2024-10-21 15:20:18.803 UTC [1] LOG:  starting PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
citus_master   | 2024-10-21 15:20:18.804 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
citus_master   | 2024-10-21 15:20:18.804 UTC [1] LOG:  listening on IPv6 address "::", port 5432
citus_master   | 2024-10-21 15:20:18.806 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
citus_master   | 2024-10-21 15:20:18.809 UTC [29] LOG:  database system was interrupted; last known up at 2024-10-21 15:10:44 UTC
citus_master   | 2024-10-21 15:20:18.822 UTC [29] LOG:  database system was not properly shut down; automatic recovery in progress
citus_master   | 2024-10-21 15:20:18.824 UTC [29] LOG:  invalid record length at 0/17856F8: expected at least 24, got 0
citus_master   | 2024-10-21 15:20:18.824 UTC [29] LOG:  redo is not required
citus_master   | 2024-10-21 15:20:18.827 UTC [27] LOG:  checkpoint starting: end-of-recovery immediate wait
citus_master   | 2024-10-21 15:20:18.834 UTC [27] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.003 s, total=0.010 s; sync files=2, longest=0.002 s, average=0.002 s; distance=0 kB, estimate=0 kB; lsn=0/17856F8, redo lsn=0/17856F8
citus_master   | 2024-10-21 15:20:18.838 UTC [1] LOG:  database system is ready to accept connections
citus_manager  | connected to master
citus_manager  | Traceback (most recent call last):
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
citus_manager  |     httplib_response = self._make_request(
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 392, in _make_request
citus_manager  |     conn.request(method, url, **httplib_request_kw)
citus_manager  |   File "/usr/local/lib/python3.8/http/client.py", line 1230, in request
citus_manager  |     self._send_request(method, url, body, headers, encode_chunked)
citus_manager  |   File "/usr/local/lib/python3.8/http/client.py", line 1276, in _send_request
citus_manager  |     self.endheaders(body, encode_chunked=encode_chunked)
citus_manager  |   File "/usr/local/lib/python3.8/http/client.py", line 1225, in endheaders
citus_manager  |     self._send_output(message_body, encode_chunked=encode_chunked)
citus_manager  |   File "/usr/local/lib/python3.8/http/client.py", line 1004, in _send_output
citus_manager  |     self.send(msg)
citus_manager  |   File "/usr/local/lib/python3.8/http/client.py", line 944, in send
citus_manager  |     self.connect()
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/docker/transport/unixconn.py", line 43, in connect
citus_manager  |     sock.connect(self.unix_socket)
citus_manager  | PermissionError: [Errno 13] Permission denied
citus_manager  | 
citus_manager  | During handling of the above exception, another exception occurred:
citus_manager  | 
citus_manager  | Traceback (most recent call last):
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
citus_manager  |     resp = conn.urlopen(
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 724, in urlopen
citus_manager  |     retries = retries.increment(
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment
citus_manager  |     raise six.reraise(type(error), error, _stacktrace)
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise
citus_manager  |     raise value.with_traceback(tb)
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
citus_manager  |     httplib_response = self._make_request(
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 392, in _make_request
citus_manager  |     conn.request(method, url, **httplib_request_kw)
citus_manager  |   File "/usr/local/lib/python3.8/http/client.py", line 1230, in request
citus_manager  |     self._send_request(method, url, body, headers, encode_chunked)
citus_manager  |   File "/usr/local/lib/python3.8/http/client.py", line 1276, in _send_request
citus_manager  |     self.endheaders(body, encode_chunked=encode_chunked)
citus_manager  |   File "/usr/local/lib/python3.8/http/client.py", line 1225, in endheaders
citus_manager  |     self._send_output(message_body, encode_chunked=encode_chunked)
citus_manager  |   File "/usr/local/lib/python3.8/http/client.py", line 1004, in _send_output
citus_manager  |     self.send(msg)
citus_manager  |   File "/usr/local/lib/python3.8/http/client.py", line 944, in send
citus_manager  |     self.connect()
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/docker/transport/unixconn.py", line 43, in connect
citus_manager  |     sock.connect(self.unix_socket)
citus_manager  | urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
citus_manager  | 
citus_manager  | During handling of the above exception, another exception occurred:
citus_manager  | 
citus_manager  | Traceback (most recent call last):
citus_manager  |   File "./manager.py", line 114, in <module>
citus_manager  |     main()
citus_manager  |   File "./manager.py", line 110, in main
citus_manager  |     docker_checker()
citus_manager  |   File "./manager.py", line 78, in docker_checker
citus_manager  |     this_container = client.containers.get(my_hostname)
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/docker/models/containers.py", line 880, in get
citus_manager  |     resp = self.client.api.inspect_container(container_id)
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/docker/utils/decorators.py", line 19, in wrapped
citus_manager  |     return f(self, resource_id, *args, **kwargs)
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/docker/api/container.py", line 758, in inspect_container
citus_manager  |     self._get(self._url("/containers/{0}/json", container)), True
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/docker/utils/decorators.py", line 46, in inner
citus_manager  |     return f(self, *args, **kwargs)
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/docker/api/client.py", line 230, in _get
citus_manager  |     return self.get(url, **self._set_request_timeout(kwargs))
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 543, in get
citus_manager  |     return self.request('GET', url, **kwargs)
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
citus_manager  |     resp = self.send(prep, **send_kwargs)
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
citus_manager  |     r = adapter.send(request, **kwargs)
citus_manager  |   File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
citus_manager  |     raise ConnectionError(err, request=request)
citus_manager  | requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
worker-2       | Manager is not ready - sleeping
citus_manager exited with code 1
worker-3       | Manager is not ready - sleeping
worker-1       | Manager is not ready - sleeping
worker-2       | Manager is not ready - sleeping
worker-3       | Manager is not ready - sleeping
worker-1       | Manager is not ready - sleeping
worker-2       | Manager is not ready - sleeping
worker-3       | Manager is not ready - sleeping
worker-1       | Manager is not ready - sleeping
^CGracefully stopping... (press Ctrl+C again to force)
[+] Stopping 5/5
 ✔ Container citus-worker-1  Stopped                                                                                                                                                       0.4s 
 ✔ Container citus-worker-2  Stopped                                                                                                                                                       0.4s 
 ✔ Container citus-worker-3  Stopped                                                                                                                                                       0.4s 
 ✔ Container citus_manager   Stopped                                                                                                                                                       0.0s 
 ✔ Container citus_master    Stopped                                                                                                                                                       0.0s 
canceled

i have been search for some link,but it dosen’t work

now this is my /var/run/docker.sock

ls -l /var/run/docker.sock
srwxrwxrwx. 1 root docker 0 10月21日 23:04 /var/run/docker.sock

i have been use

sudo chmod 777 /var/run/docker.sock

even i change to root,it have the same error

i am new from docker.do i need to offer more info? Thanks for all the help

Cause

Not yet known.

Related Issues

Bugzilla report: #NNNN

Workarounds

None yet.

@ffgan When you try to create a new post in Proposed Common Issues , there’s a long template pre-filled starting with this:

This is NOT a place to report bugs. If you want to discuss a problem with other Fedora users, select the “Ask Fedora” category (without any subcategory) in the drop-down list above.

So, moving this topic to Ask Fedora

1 Like

From Proposed Common Issues to Ask Fedora

I finally solved it by re-doing docker compose up after deleting all the containers. I guess it was because the old containers were not added to the current docker group.