I install everything and it works smootly I can create repository and push the code etc. but after I restart to docke it can not connect to database anymore and I keep in the loop for restarting gitlab-ce.
OS
macstudio m2 max
I don’t have dns configuration or firewall settings to block docker
I have checked postgres is up and runing
PostgreSQL Database directory appears to contain a database; Skipping initialization 2024-04-22 11:48:58.018 -05 [1] LOG: starting PostgreSQL 13.6 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027, 64-bit LOG: listening on IPv4 address "0.0.0.0", port 5432 LOG: listening on IPv6 address "::", port 5432 LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" LOG: database system was shut down at 2024-04-22 11:48:17 -05 LOG: database system is ready to accept connections
docker-compose I use
gitlab: image: 'yrzr/gitlab-ce-arm64v8:latest' restart: unless-stopped hostname: 'gitlab.local' container_name: gitlab-ce privileged: true depends_on: - postgresql links: - postgresql:postgresql environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://gitlab.local'; postgresql['enable'] = true; gitlab_rails['db_adapter'] = 'postgresql'; gitlab_rails['db_encoding'] = 'utf8'; gitlab_rails['db_host'] = 'postgresql'; gitlab_rails['db_port'] = '5432'; gitlab_rails['db_username'] = 'gitlab'; gitlab_rails['db_password'] = 'gitlab'; gitlab_rails['db_database'] = 'gitlabhq_production'; ports: - "8929:80" - "8443:443" - "8022:22" volumes: - ./gitlab-ce-conf:/etc/gitlab - ./gitlab-ce-logs:/var/log/gitlab - ./gitlab-ce-data:/var/opt/gitlab networks: - mynetwork postgresql: restart: unless-stopped image: postgres:13.6-alpine container_name: gitlab-postgres environment: - POSTGRES_USER=gitlab - POSTGRES_PASSWORD=gitlab - POSTGRES_DB=gitlabhq_production - TZ=America/Bogota - PGDATA=/data volumes: - ./gitlab-db-data:/data ports: - "5432:5432" networks: - mynetwork
After restart docker and restart compose file again and check the docker-ce
gitlab-ctl status shows
root@gitlab:/# gitlab-ctl status run: alertmanager: (pid 340) 85s; run: log: (pid 334) 85s run: gitaly: (pid 347) 85s; run: log: (pid 337) 85s run: gitlab-exporter: (pid 353) 85s; run: log: (pid 333) 85s down: gitlab-kas: 1s, normally up, want up; run: log: (pid 324) 85s down: gitlab-workhorse: 1s, normally up, want up; run: log: (pid 329) 85s run: logrotate: (pid 344) 85s; run: log: (pid 328) 85s run: nginx: (pid 338) 85s; run: log: (pid 313) 85s run: postgres-exporter: (pid 351) 85s; run: log: (pid 325) 85s down: postgresql: 1s, normally up, want up; run: log: (pid 330) 85s run: prometheus: (pid 339) 85s; run: log: (pid 327) 85s run: puma: (pid 2208) 12s; run: log: (pid 326) 85s down: redis: 1s, normally up, want up; run: log: (pid 314) 85s run: redis-exporter: (pid 348) 85s; run: log: (pid 332) 85s run: sidekiq: (pid 2474) 1s; run: log: (pid 331) 85s run: sshd: (pid 66) 90s; run: log: (pid 65) 90s
Then I restart the gitlab-ctl but no luck
root@gitlab:/# gitlab-ctl restart gitlab-kas gitlab-workhorse postgresql redis timeout: down: gitlab-kas: 0s, normally up, want up root@gitlab:/# gitlab-ctl status run: alertmanager: (pid 340) 151s; run: log: (pid 334) 151s run: gitaly: (pid 347) 151s; run: log: (pid 337) 151s run: gitlab-exporter: (pid 353) 151s; run: log: (pid 333) 151s down: gitlab-kas: 0s, normally up, want up; run: log: (pid 324) 151s down: gitlab-workhorse: 0s, normally up, want up; run: log: (pid 329) 151s run: logrotate: (pid 344) 151s; run: log: (pid 328) 151s run: nginx: (pid 338) 151s; run: log: (pid 313) 151s run: postgres-exporter: (pid 351) 151s; run: log: (pid 325) 151s down: postgresql: 0s, normally up, want up; run: log: (pid 330) 151s run: prometheus: (pid 339) 151s; run: log: (pid 327) 151s run: puma: (pid 3996) 5s; run: log: (pid 326) 151s down: redis: 0s, normally up, want up; run: log: (pid 314) 151s run: redis-exporter: (pid 348) 151s; run: log: (pid 332) 151s run: sidekiq: (pid 4118) 0s; run: log: (pid 331) 151s run: sshd: (pid 66) 156s; run: log: (pid 65) 156s
Logs in gitlab-ce container
==> /var/log/gitlab/postgresql/current <== 2024-04-22_17:14:08.73421 LOG: starting PostgreSQL 14.11 on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit 2024-04-22_17:14:08.73466 LOG: could not bind Unix address "/var/opt/gitlab/postgresql/.s.PGSQL.5432": Operation not supported 2024-04-22_17:14:08.73473 WARNING: could not create Unix-domain socket in directory "/var/opt/gitlab/postgresql" 2024-04-22_17:14:08.73480 FATAL: could not create any Unix-domain sockets 2024-04-22_17:14:08.73550 LOG: database system is shut down ==> /var/log/gitlab/gitlab-workhorse/current <== 2024-04-22T17:14:09Z INF build_time=20240327.093505 msg=Starting version=v16.10.1 2024-04-22T17:14:09Z fatal error=remove /var/opt/gitlab/gitlab-workhorse/sockets/socket: operation not supported msg=shutting down ==> /var/log/gitlab/sidekiq/current <== 2024-04-22T17:14:09.195Z A worker terminated, shutting down the cluster | severity=INFO ==> /var/log/gitlab/redis/current <== 2024-04-22_17:14:08.99538 36295:C 22 Apr 2024 17:14:08.995 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 2024-04-22_17:14:08.99546 36295:C 22 Apr 2024 17:14:08.995 # Redis version=7.0.15, bits=64, commit=f35f36a2, modified=1, pid=36295, just started 2024-04-22_17:14:08.99553 36295:C 22 Apr 2024 17:14:08.995 # Configuration loaded 2024-04-22_17:14:08.99560 36295:M 22 Apr 2024 17:14:08.995 * monotonic clock: POSIX clock_gettime 2024-04-22_17:14:08.99574 36295:M 22 Apr 2024 17:14:08.995 # Failed opening Unix socket: bind: Operation not supported ==> /var/log/gitlab/gitlab-kas/current <== 2024-04-22_17:14:09.02092 {"level":"info","time":"2024-04-22T17:14:09.020Z","msg":"Running KAS gitlab-kas/v16.10.1/8892127a"} 2024-04-22_17:14:09.02158 Program aborted: redis client: dial unix /var/opt/gitlab/redis/redis.socket: connect: operation not supported ==> /var/log/gitlab/postgresql/current <== 2024-04-22_17:14:09.75128 LOG: starting PostgreSQL 14.11 on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit 2024-04-22_17:14:09.75173 LOG: could not bind Unix address "/var/opt/gitlab/postgresql/.s.PGSQL.5432": Operation not supported 2024-04-22_17:14:09.75179 WARNING: could not create Unix-domain socket in directory "/var/opt/gitlab/postgresql" 2024-04-22_17:14:09.75186 FATAL: could not create any Unix-domain sockets 2024-04-22_17:14:09.75265 LOG: database system is shut down ==> /var/log/gitlab/gitlab-workhorse/current <== 2024-04-22T17:14:10Z INF build_time=20240327.093505 msg=Starting version=v16.10.1 2024-04-22T17:14:10Z fatal error=remove /var/opt/gitlab/gitlab-workhorse/sockets/socket: operation not supported msg=shutting down ==> /var/log/gitlab/puma/current <== 2024-04-22_17:14:10.00772 bundler: failed to load command: puma (/opt/gitlab/embedded/bin/puma) 2024-04-22_17:14:10.00827 /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/puma-6.4.0/lib/puma/binder.rb:186:in
realdirpath’: Operation not supported @ realpath_rec – /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket (Errno::ENOTSUP)
2024-04-22_17:14:09.99881 36320:C 22 Apr 2024 17:14:09.998 # Redis version=7.0.15, bits=64, commit=f35f36a2, modified=1, pid=36320, just started
2024-04-22_17:14:09.99890 36320:C 22 Apr 2024 17:14:09.998 # Configuration loaded
2024-04-22_17:14:09.99898 36320:M 22 Apr 2024 17:14:09.998 * monotonic clock: POSIX clock_gettime
2024-04-22_17:14:09.99915 36320:M 22 Apr 2024 17:14:09.999 # Failed opening Unix socket: bind: Operation not supported
==> /var/log/gitlab/gitlab-kas/current <==
2024-04-22_17:14:10.02786 {“level”:”info”,”time”:”2024-04-22T17:14:10.027Z”,”msg”:”Running KAS gitlab-kas/v16.10.1/8892127a”}
2024-04-22_17:14:10.02892 Program aborted: redis client: dial unix /var/opt/gitlab/redis/redis.socket: connect: operation not supported
==> /var/log/gitlab/postgresql/current <==
2024-04-22_17:14:10.76768 LOG: starting PostgreSQL 14.11 on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit
2024-04-22_17:14:10.76813 LOG: could not bind Unix address “/var/opt/gitlab/postgresql/.s.PGSQL.5432”: Operation not supported
2024-04-22_17:14:10.76820 WARNING: could not create Unix-domain socket in directory “/var/opt/gitlab/postgresql”
2024-04-22_17:14:10.76827 FATAL: could not create any Unix-domain sockets
2024-04-22_17:14:10.76907 LOG: database system is shut down
==> /var/log/gitlab/gitlab-workhorse/current <==
2024-04-22T17:14:11Z INF build_time=20240327.093505 msg=Starting version=v16.10.1
2024-04-22T17:14:11Z fatal error=remove /var/opt/gitlab/gitlab-workhorse/sockets/socket: operation not supported msg=shutting down
==> /var/log/gitlab/puma/current <==
2024-04-22_17:14:10.70972 {“timestamp”:”2024-04-22T17:14:10.706Z”,”pid”:36334,”message”:”Puma starting in cluster mode…”}
2024-04-22_17:14:10.70988 {“timestamp”:”2024-04-22T17:14:10.709Z”,”pid”:36334,”message”:”* Puma version: 6.4.0 (ruby 3.1.4-p223) (“The Eagle of Durango”)”}
2024-04-22_17:14:10.70998 {“timestamp”:”2024-04-22T17:14:10.709Z”,”pid”:36334,”message”:”* Min threads: 4″}
2024-04-22_17:14:10.71006 {“timestamp”:”2024-04-22T17:14:10.709Z”,”pid”:36334,”message”:”* Max threads: 4″}
2024-04-22_17:14:10.71014 {“timestamp”:”2024-04-22T17:14:10.709Z”,”pid”:36334,”message”:”* Environment: production”}
2024-04-22_17:14:10.71021 {“timestamp”:”2024-04-22T17:14:10.709Z”,”pid”:36334,”message”:”* Master PID: 36334″}
2024-04-22_17:14:10.71029 {“timestamp”:”2024-04-22T17:14:10.709Z”,”pid”:36334,”message”:”* Workers: 2″}
2024-04-22_17:14:10.71037 {“timestamp”:”2024-04-22T17:14:10.709Z”,”pid”:36334,”message”:”* Restarts: (✔) hot (✖) phased”}
2024-04-22_17:14:10.71046 {“timestamp”:”2024-04-22T17:14:10.709Z”,”pid”:36334,”message”:”* Preloading application”}
==> /var/log/gitlab/redis/current <==
2024-04-22_17:14:11.00481 36350:C 22 Apr 2024 17:14:11.004 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2024-04-22_17:14:11.00492 36350:C 22 Apr 2024 17:14:11.004 # Redis version=7.0.15, bits=64, commit=f35f36a2, modified=1, pid=36350, just started
2024-04-22_17:14:11.00500 36350:C 22 Apr 2024 17:14:11.004 # Configuration loaded
2024-04-22_17:14:11.00508 36350:M 22 Apr 2024 17:14:11.005 * monotonic clock: POSIX clock_gettime
2024-04-22_17:14:11.00525 36350:M 22 Apr 2024 17:14:11.005 # Failed opening Unix socket: bind: Operation not supported
==> /var/log/gitlab/gitlab-kas/current <==
2024-04-22_17:14:11.03642 {“level”:”info”,”time”:”2024-04-22T17:14:11.036Z”,”msg”:”Running KAS gitlab-kas/v16.10.1/8892127a”}
2024-04-22_17:14:11.03724 Program aborted: redis client: dial unix /var/opt/gitlab/redis/redis.socket: connect: operation not supported
==> /var/log/gitlab/redis-exporter/current <==
2024-04-22_17:14:11.11998 time=”2024-04-22T17:14:11Z” level=error msg=”Couldn’t connect to redis instance (unix:///var/opt/gitlab/redis/redis.socket)”
==> /var/log/gitlab/postgresql/current <==
2024-04-22_17:14:11.78506 LOG: starting PostgreSQL 14.11 on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit
2024-04-22_17:14:11.78552 LOG: could not bind Unix address “/var/opt/gitlab/postgresql/.s.PGSQL.5432”: Operation not supported
2024-04-22_17:14:11.78559 WARNING: could not create Unix-domain socket in directory “/var/opt/gitlab/postgresql”
2024-04-22_17:14:11.78565 FATAL: could not create any Unix-domain sockets
2024-04-22_17:14:11.78647 LOG: database system is shut down
==> /var/log/gitlab/gitlab-workhorse/current <==
2024-04-22T17:14:12Z INF build_time=20240327.093505 msg=Starting version=v16.10.1
2024-04-22T17:14:12Z fatal error=remove /var/opt/gitlab/gitlab-workhorse/sockets/socket: operation not supported msg=shutting down
==> /var/log/gitlab/redis/current <==
2024-04-22_17:14:12.00996 36375:C 22 Apr 2024 17:14:12.009 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2024-04-22_17:14:12.01006 36375:C 22 Apr 2024 17:14:12.009 # Redis version=7.0.15, bits=64, commit=f35f36a2, modified=1, pid=36375, just started
2024-04-22_17:14:12.01012 36375:C 22 Apr 2024 17:14:12.009 # Configuration loaded
2024-04-22_17:14:12.01019 36375:M 22 Apr 2024 17:14:12.010 * monotonic clock: POSIX clock_gettime
2024-04-22_17:14:12.01038 36375:M 22 Apr 2024 17:14:12.010 # Failed opening Unix socket: bind: Operation not supported
==> /var/log/gitlab/gitlab-kas/current <==
2024-04-22_17:14:12.04419 {“level”:”info”,”time”:”2024-04-22T17:14:12.044Z”,”msg”:”Running KAS gitlab-kas/v16.10.1/8892127a”}
2024-04-22_17:14:12.04480 Program aborted: redis client: dial unix /var/opt/gitlab/redis/redis.socket: connect: operation not supported
==> /var/log/gitlab/postgresql/current <==
2024-04-22_17:14:12.80278 LOG: starting PostgreSQL 14.11 on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit
2024-04-22_17:14:12.80324 LOG: could not bind Unix address “/var/opt/gitlab/postgresql/.s.PGSQL.5432”: Operation not supported
2024-04-22_17:14:12.80331 WARNING: could not create Unix-domain socket in directory “/var/opt/gitlab/postgresql”
2024-04-22_17:14:12.80338 FATAL: could not create any Unix-domain sockets
2024-04-22_17:14:12.80419 LOG: database system is shut down
==> /var/log/gitlab/gitlab-workhorse/current <==
2024-04-22T17:14:13Z INF build_time=20240327.093505 msg=Starting version=v16.10.1
2024-04-22T17:14:13Z fatal error=remove /var/opt/gitlab/gitlab-workhorse/sockets/socket: operation not supported msg=shutting down
==> /var/log/gitlab/redis/current <==
2024-04-22_17:14:13.01497 36402:C 22 Apr 2024 17:14:13.014 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2024-04-22_17:14:13.01510 36402:C 22 Apr 2024 17:14:13.014 # Redis version=7.0.15, bits=64, commit=f35f36a2, modified=1, pid=36402, just started
2024-04-22_17:14:13.01517 36402:C 22 Apr 2024 17:14:13.014 # Configuration loaded
2024-04-22_17:14:13.01525 36402:M 22 Apr 2024 17:14:13.015 * monotonic clock: POSIX clock_gettime
2024-04-22_17:14:13.01541 36402:M 22 Apr 2024 17:14:13.015 # Failed opening Unix socket: bind: Operation not supported
==> /var/log/gitlab/gitlab-kas/current <==
2024-04-22_17:14:13.05194 {“level”:”info”,”time”:”2024-04-22T17:14:13.051Z”,”msg”:”Running KAS gitlab-kas/v16.10.1/8892127a”}
2024-04-22_17:14:13.05341 Program aborted: redis client: dial unix /var/opt/gitlab/redis/redis.socket: connect: operation not supported
==> /var/log/gitlab/gitlab-exporter/current <==
2024-04-22_17:14:12.65308 – -> /sidekiq
==> /var/log/gitlab/postgresql/current <==
2024-04-22_17:14:13.81989 LOG: starting PostgreSQL 14.11 on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit
2024-04-22_17:14:13.82081 LOG: could not bind Unix address “/var/opt/gitlab/postgresql/.s.PGSQL.5432”: Operation not supported
2024-04-22_17:14:13.82095 WARNING: could not create Unix-domain socket in directory “/var/opt/gitlab/postgresql”
2024-04-22_17:14:13.82104 FATAL: could not create any Unix-domain sockets
2024-04-22_17:14:13.82191 LOG: database system is shut down
==> /var/log/gitlab/gitlab-workhorse/current <==
2024-04-22T17:14:14Z INF build_time=20240327.093505 msg=Starting version=v16.10.1
2024-04-22T17:14:14Z fatal error=remove /var/opt/gitlab/gitlab-workhorse/sockets/socket: operation not supported msg=shutting down
==> /var/log/gitlab/redis/current <==
2024-04-22_17:14:14.02093 36426:C 22 Apr 2024 17:14:14.020 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2024-04-22_17:14:14.02104 36426:C 22 Apr 2024 17:14:14.020 # Redis version=7.0.15, bits=64, commit=f35f36a2, modified=1, pid=36426, just started
2024-04-22_17:14:14.02112 36426:C 22 Apr 2024 17:14:14.020 # Configuration loaded
2024-04-22_17:14:14.02119 36426:M 22 Apr 2024 17:14:14.021 * monotonic clock: POSIX clock_gettime
2024-04-22_17:14:14.02132 36426:M 22 Apr 2024 17:14:14.021 # Failed opening Unix socket: bind: Operation not supported
==> /var/log/gitlab/gitlab-kas/current <==
2024-04-22_17:14:14.06056 {“level”:”info”,”time”:”2024-04-22T17:14:14.060Z”,”msg”:”Running KAS gitlab-kas/v16.10.1/8892127a”}
2024-04-22_17:14:14.06117 Program aborted: redis client: dial unix /var/opt/gitlab/redis/redis.socket: connect: operation not supported
==> /var/log/gitlab/nginx/gitlab_error.log <==
2024/04/22 17:14:14 [crit] 404#0: *2 connect() to unix:/var/opt/gitlab/gitlab-workhorse/sockets/socket failed (95: Operation not supported) while connecting to upstream, client: 192.168.65.1, server: gitlab.local, request: “GET /root/-project HTTP/1.1”, upstream: “http://unix:/var/opt/gitlab/gitlab-workhorse/sockets/socket:/root/project”, host: “localhost:8929”, referrer: “http://localhost:8929/root/project”
2024/04/22 17:14:14 [crit] 404#0: *2 connect() to unix:/var/opt/gitlab/gitlab-workhorse/sockets/socket failed (95: Operation not supported) while connecting to upstream, client: 192.168.65.1, server: gitlab.local, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://unix:/var/opt/gitlab/gitlab-workhorse/sockets/socket:/favicon.ico”, host: “localhost:8929”, referrer: “http://localhost:8929/root/project”
==> /var/log/gitlab/nginx/gitlab_access.log <==
��
192.168.65.1 – – [22/Apr/2024:17:14:14 +0000] “GET /root/project HTTP/1.1” 502 3216 “http://localhost:8929/root/project” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36” –
192.168.65.1 – – [22/Apr/2024:17:14:14 +0000] “GET /favicon.ico HTTP/1.1” 502 3216 “http://localhost:8929/root/project” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36” -`
postgres version is different in compose file and in the logs. This could be one of the issue?
Image I use for postgres -> postgres:13.6-alpine
Log -> starting PostgreSQL 14.11 on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bi
I tried also gitlab’s official image it works same as the one that I use