Gitlab Docker "Error executing action `run` on resource 'execute[create gitlab postgresql user]'"

Following the instructions of GitLab Docker images | GitLab, specifically those of “GitLab Docker images | GitLab” result in the following error shown below within the container.

I’m using a mac with M2 processor.


2023-10-03 16:03:27         ================================================================================
2023-10-03 16:03:27         Error executing action `run` on resource 'execute[create gitlab postgresql user]'
2023-10-03 16:03:27         ================================================================================
2023-10-03 16:03:27         
2023-10-03 16:03:27         RuntimeError
2023-10-03 16:03:27         ------------
2023-10-03 16:03:27         PostgreSQL did not respond before service checks were exhausted
2023-10-03 16:03:27         
2023-10-03 16:03:27         Cookbook Trace: (most recent call first)
2023-10-03 16:03:27         ----------------------------------------
2023-10-03 16:03:27         /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helpers/pg_status_helper.rb:56:in `ready?'
2023-10-03 16:03:27         /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helpers/base_pg_helper.rb:28:in `is_ready?'
2023-10-03 16:03:27         /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb:16:in `block (3 levels) in class_from_file'
2023-10-03 16:03:27         /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb:13:in `block in class_from_file'
2023-10-03 16:03:27         /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/database_objects.rb:21:in `block in class_from_file'
2023-10-03 16:03:27         
2023-10-03 16:03:27         Resource Declaration:
2023-10-03 16:03:27         ---------------------
2023-10-03 16:03:27         # In /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb
2023-10-03 16:03:27         
2023-10-03 16:03:27          13:   execute "create #{new_resource.username} postgresql user" do
2023-10-03 16:03:27          14:     command %(/opt/gitlab/bin/#{new_resource.helper.service_cmd} -d template1 -c "#{query}")
2023-10-03 16:03:27          15:     user account_helper.postgresql_user
2023-10-03 16:03:27          16:     only_if { new_resource.helper.is_running? && new_resource.helper.is_ready? }
2023-10-03 16:03:27          17:     not_if { new_resource.helper.is_offline_or_readonly? || new_resource.helper.user_exists?(new_resource.username) }
2023-10-03 16:03:27          18:   end
2023-10-03 16:03:27          19: 
2023-10-03 16:03:27         
2023-10-03 16:03:27         Compiled Resource:
2023-10-03 16:03:27         ------------------
2023-10-03 16:03:27         # Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb:13:in `block in class_from_file'
2023-10-03 16:03:27         
2023-10-03 16:03:27         execute("create gitlab postgresql user") do
2023-10-03 16:03:27           action [:run]
2023-10-03 16:03:27           default_guard_interpreter :execute
2023-10-03 16:03:27           command "/opt/gitlab/bin/gitlab-psql -d template1 -c \"CREATE USER \\\"gitlab\\\"\""
2023-10-03 16:03:27           declared_type :execute
2023-10-03 16:03:27           cookbook_name "postgresql"
2023-10-03 16:03:27           recipe_name "standalone"
2023-10-03 16:03:27           domain nil
2023-10-03 16:03:27           user "gitlab-psql"
2023-10-03 16:03:27           not_if { #code block }
2023-10-03 16:03:27           only_if { #code block }
2023-10-03 16:03:27         end
2023-10-03 16:03:27         
2023-10-03 16:03:27         System Info:
2023-10-03 16:03:27         ------------
2023-10-03 16:03:27         chef_version=17.10.0
2023-10-03 16:03:27         platform=ubuntu
2023-10-03 16:03:27         platform_version=22.04
2023-10-03 16:03:27         ruby=ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
2023-10-03 16:03:27         program_name=/opt/gitlab/embedded/bin/cinc-client
2023-10-03 16:03:27         executable=/opt/gitlab/embedded/bin/cinc-client
2023-10-03 16:03:27         
2023-10-03 16:03:27       
2023-10-03 16:03:27       ================================================================================
2023-10-03 16:03:27       Error executing action `create` on resource 'postgresql_user[gitlab]'
2023-10-03 16:03:27       ================================================================================
2023-10-03 16:03:27       
2023-10-03 16:03:27       RuntimeError
2023-10-03 16:03:27       ------------
2023-10-03 16:03:27       execute[create gitlab postgresql user] (postgresql::standalone line 13) had an error: RuntimeError: PostgreSQL did not respond before service checks were exhausted
2023-10-03 16:03:27       
2023-10-03 16:03:27       Cookbook Trace: (most recent call first)
2023-10-03 16:03:27       ----------------------------------------
2023-10-03 16:03:27       /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helpers/pg_status_helper.rb:56:in `ready?'
2023-10-03 16:03:27       /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helpers/base_pg_helper.rb:28:in `is_ready?'
2023-10-03 16:03:27       /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb:16:in `block (3 levels) in class_from_file'
2023-10-03 16:03:27       /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb:13:in `block in class_from_file'
2023-10-03 16:03:27       /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/database_objects.rb:21:in `block in class_from_file'
2023-10-03 16:03:27       
2023-10-03 16:03:27       Resource Declaration:
2023-10-03 16:03:27       ---------------------
2023-10-03 16:03:27       # In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/database_objects.rb
2023-10-03 16:03:27       
2023-10-03 16:03:27        21:   postgresql_user gitlab_sql_user do
2023-10-03 16:03:27        22:     password "md5#{gitlab_sql_user_password}" unless gitlab_sql_user_password.nil?
2023-10-03 16:03:27        23:     action :create
2023-10-03 16:03:27        24:   end
2023-10-03 16:03:27        25: 
2023-10-03 16:03:27       
2023-10-03 16:03:27       Compiled Resource:
2023-10-03 16:03:27       ------------------
2023-10-03 16:03:27       # Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/database_objects.rb:21:in `block in class_from_file'
2023-10-03 16:03:27       
2023-10-03 16:03:27       postgresql_user("gitlab") do
2023-10-03 16:03:27         action [:create]
2023-10-03 16:03:27         default_guard_interpreter :default
2023-10-03 16:03:27         declared_type :postgresql_user
2023-10-03 16:03:27         cookbook_name "postgresql"
2023-10-03 16:03:27         recipe_name "standalone"
2023-10-03 16:03:27         helper "*sensitive value suppressed*"
2023-10-03 16:03:27       end
2023-10-03 16:03:27       
2023-10-03 16:03:27       System Info:
2023-10-03 16:03:27       ------------
2023-10-03 16:03:27       chef_version=17.10.0
2023-10-03 16:03:27       platform=ubuntu
2023-10-03 16:03:27       platform_version=22.04
2023-10-03 16:03:27       ruby=ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
2023-10-03 16:03:27       program_name=/opt/gitlab/embedded/bin/cinc-client
2023-10-03 16:03:27       executable=/opt/gitlab/embedded/bin/cinc-client
2023-10-03 16:03:27       
2023-10-03 16:03:27     
2023-10-03 16:03:27     ================================================================================
2023-10-03 16:03:27     Error executing action `create` on resource 'database_objects[postgresql]'
2023-10-03 16:03:27     ================================================================================
2023-10-03 16:03:27     
2023-10-03 16:03:27     RuntimeError
2023-10-03 16:03:27     ------------
2023-10-03 16:03:27     postgresql_user[gitlab] (postgresql::standalone line 21) had an error: RuntimeError: execute[create gitlab postgresql user] (postgresql::standalone line 13) had an error: RuntimeError: PostgreSQL did not respond before service checks were exhausted
2023-10-03 16:03:27     
2023-10-03 16:03:27     Cookbook Trace: (most recent call first)
2023-10-03 16:03:27     ----------------------------------------
2023-10-03 16:03:27     /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helpers/pg_status_helper.rb:56:in `ready?'
2023-10-03 16:03:27     /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helpers/base_pg_helper.rb:28:in `is_ready?'
2023-10-03 16:03:27     /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb:16:in `block (3 levels) in class_from_file'
2023-10-03 16:03:27     /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb:13:in `block in class_from_file'
2023-10-03 16:03:27     /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/database_objects.rb:21:in `block in class_from_file'
2023-10-03 16:03:27     
2023-10-03 16:03:27     Resource Declaration:
2023-10-03 16:03:27     ---------------------
2023-10-03 16:03:27     # In /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/recipes/standalone.rb
2023-10-03 16:03:27     
2023-10-03 16:03:27      32: database_objects 'postgresql' do
2023-10-03 16:03:27      33:   pg_helper pg_helper
2023-10-03 16:03:27      34:   account_helper account_helper
2023-10-03 16:03:27      35:   not_if { pg_helper.replica? }
2023-10-03 16:03:27      36: end
2023-10-03 16:03:27      37: 
2023-10-03 16:03:27     
2023-10-03 16:03:27     Compiled Resource:
2023-10-03 16:03:27     ------------------
2023-10-03 16:03:27     # Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/recipes/standalone.rb:32:in `from_file'
2023-10-03 16:03:27     
2023-10-03 16:03:27     database_objects("postgresql") do
2023-10-03 16:03:27       action [:create]
2023-10-03 16:03:27       default_guard_interpreter :default
2023-10-03 16:03:27       declared_type :database_objects
2023-10-03 16:03:27       cookbook_name "postgresql"
2023-10-03 16:03:27       recipe_name "standalone"
2023-10-03 16:03:27       pg_helper "*sensitive value suppressed*"
2023-10-03 16:03:27       account_helper "*sensitive value suppressed*"
2023-10-03 16:03:27       not_if { #code block }
2023-10-03 16:03:27     end
2023-10-03 16:03:27     
2023-10-03 16:03:27     System Info:
2023-10-03 16:03:27     ------------
2023-10-03 16:03:27     chef_version=17.10.0
2023-10-03 16:03:27     platform=ubuntu
2023-10-03 16:03:27     platform_version=22.04
2023-10-03 16:03:27     ruby=ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
2023-10-03 16:03:27     program_name=/opt/gitlab/embedded/bin/cinc-client
2023-10-03 16:03:27     executable=/opt/gitlab/embedded/bin/cinc-client

I think the containers are amd64 - see here: Docker so this is most likely why it doesn’t work for you as you are trying to run it on a unsupported processor. I haven’t clicked through all the pages, but even searching for arm or aarch doesn’t show anything.

Maybe this will help though: Docker but I don’t see an EE version for arm from that person, but this search does give some options: Docker

They are not official Gitlab images though, so cannot guarantee their status or validity or security.