gitlab docker compose错误:执行操作“enable”“on resource”“runit\u service[redis]”时出错

5vf7fwbs  于 2021-06-10  发布在  Redis
关注(0)|答案(0)|浏览(813)

我通过docker compose将gitlab从12.8更新到12.9。
但在更新之后,我面临这个错误: Error executing action 使可能 on resource 'runit_service[redis]' .
docker撰写日志-f--tail 100:

gitlab_1  | There was an error running gitlab-ctl reconfigure:
gitlab_1  | 
gitlab_1  | runit_service[redis] (redis::enable line 66) had an error: Errno::ENOENT: template[/var/log/gitlab/redis/config] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/runit/libraries/provider_runit_service.rb line 136) had an error: Errno::ENOENT: No such file or directory @ realpath_rec - /opt/gitlab/sv/redis/log/config
gitlab_1  | 
gitlab_1  |         verifications []
gitlab_1  |         cookbook "redis"
gitlab_1  |       end
gitlab_1  |       
gitlab_1  |       System Info:
gitlab_1  |       ------------
gitlab_1  |       chef_version=14.14.29
gitlab_1  |       platform=ubuntu
gitlab_1  |       platform_version=16.04
gitlab_1  |       ruby=ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
gitlab_1  |       program_name=/opt/gitlab/embedded/bin/chef-client
gitlab_1  |       executable=/opt/gitlab/embedded/bin/chef-client
gitlab_1  |       
gitlab_1  |     
gitlab_1  |     ================================================================================
gitlab_1  |     Error executing action `enable` on resource 'runit_service[redis]'
gitlab_1  |     ================================================================================
gitlab_1  |     
gitlab_1  |     Errno::ENOENT
gitlab_1  |     -------------
gitlab_1  |     template[/var/log/gitlab/redis/config] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/runit/libraries/provider_runit_service.rb line 136) had an error: Errno::ENOENT: No such file or directory @ realpath_rec - /opt/gitlab/sv/redis/log/config
gitlab_1  |     
gitlab_1  |     Cookbook Trace:
gitlab_1  |     ---------------
gitlab_1  |     /opt/gitlab/embedded/cookbooks/cache/cookbooks/runit/libraries/provider_runit_service.rb:255:in `block in <class:RunitService>'
gitlab_1  |     
gitlab_1  |     Resource Declaration:
gitlab_1  |     ---------------------
gitlab_1  |     # In /opt/gitlab/embedded/cookbooks/cache/cookbooks/redis/definitions/redis_service.rb
gitlab_1  |     
gitlab_1  |      66:   runit_service 'redis' do
gitlab_1  |      67:     down node['redis']['ha']
gitlab_1  |      68:     template_name 'redis'
gitlab_1  |      69:     options({
gitlab_1  |      70:       service: 'redis',
gitlab_1  |      71:       log_directory: redis_log_dir
gitlab_1  |      72:     }.merge(params))
gitlab_1  |      73:     log_options node['gitlab']['logging'].to_hash.merge(node['redis'].to_hash)
gitlab_1  |      74:   end
gitlab_1  |      75: 
gitlab_1  |      76:   if node['gitlab']['bootstrap']['enable']
gitlab_1  |      77:     execute "/opt/gitlab/bin/gitlab-ctl start redis" do
gitlab_1  |      78:       retries 20
gitlab_1  |      79:     end
gitlab_1  |      80:   end
gitlab_1  |      81: 
gitlab_1  |     
gitlab_1  |     Compiled Resource:
gitlab_1  |     ------------------
gitlab_1  |     # Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/redis/definitions/redis_service.rb:66:in `block in from_file'
gitlab_1  |     
gitlab_1  |     runit_service("redis") do
gitlab_1  |       params {:socket_group=>"git", :name=>nil}
gitlab_1  |       provider Chef::Provider::RunitService
gitlab_1  |       action :enable
gitlab_1  |       default_guard_interpreter :default
gitlab_1  |       service_name "redis"
gitlab_1  |       enabled false
gitlab_1  |       running false
gitlab_1  |       masked nil
gitlab_1  |       options {:service=>"redis", :log_directory=>"/var/log/gitlab/redis", :socket_group=>"git", :name=>nil}
gitlab_1  |       pattern "redis"
gitlab_1  |       start_command "start"
gitlab_1  |       stop_command "stop"
gitlab_1  |       status_command "status"
gitlab_1  |       restart_command "restart"
gitlab_1  |       supports {:restart=>true, :reload=>true, :status=>true}
gitlab_1  |       sv_bin "/opt/gitlab/embedded/bin/sv"
gitlab_1  |       sv_dir "/opt/gitlab/sv"
gitlab_1  |       service_dir "/opt/gitlab/service"
gitlab_1  |       lsb_init_dir "/opt/gitlab/init"
gitlab_1  |       log true
gitlab_1  |       owner "root"
gitlab_1  |       group "root"
gitlab_1  |       restart_on_update true
gitlab_1  |       run_template_name "redis"
gitlab_1  |       log_template_name "redis"
gitlab_1  |       check_script_template_name "redis"
gitlab_1  |       finish_script_template_name "redis"
gitlab_1  |       sv_templates true
gitlab_1  |       log_options {"svlogd_size"=>209715200, "svlogd_num"=>30, "svlogd_timeout"=>86400, "svlogd_filter"=>"gzip", "svlogd_udp"=>nil, "svlogd_prefix"=>nil, "udp_log_shipping_host"=>nil, "udp_log_shipping_hostname"=>nil, "udp_log_shipping_port"=>514, "logrotate_frequency"=>"daily", "logrotate_maxsize"=>nil, "logrotate_size"=>nil, "logrotate_rotate"=>30, "logrotate_compress"=>"compress", "logrotate_method"=>"copytruncate", "logrotate_postrotate"=>nil, "logrotate_dateformat"=>nil, "enable"=>true, "ha"=>false, "hz"=>10, "dir"=>"/var/opt/gitlab/redis", "log_directory"=>"/var/log/gitlab/redis", "username"=>"gitlab-redis", "group"=>"gitlab-redis", "uid"=>nil, "gid"=>nil, "shell"=>"/bin/false", "home"=>"/var/opt/gitlab/redis", "bind"=>"127.0.0.1", "port"=>0, "maxclients"=>"10000", "maxmemory"=>"0", "maxmemory_policy"=>"noeviction", "maxmemory_samples"=>5, "tcp_backlog"=>511, "tcp_timeout"=>60, "tcp_keepalive"=>300, "password"=>nil, "unixsocket"=>"/var/opt/gitlab/redis/redis.socket", "unixsocketperm"=>"777", "master"=>true, "master_name"=>"gitlab-redis", "master_ip"=>nil, "master_port"=>6379, "master_password"=>nil, "client_output_buffer_limit_normal"=>"0 0 0", "client_output_buffer_limit_slave"=>"256mb 64mb 60", "client_output_buffer_limit_pubsub"=>"32mb 8mb 60", "save"=>["900 1", "300 10", "60 10000"], "rename_commands"=>{"KEYS"=>""}, "announce_ip"=>nil, "announce_port"=>nil}
gitlab_1  |       declared_type :runit_service
gitlab_1  |       cookbook_name "redis"
gitlab_1  |       recipe_name "enable"
gitlab_1  |       service_mirror # Declared in 
gitlab_1  |     
gitlab_1  |     service("redis") do
gitlab_1  |       provider Chef::Provider::Service::Simple
gitlab_1  |       action [:nothing]
gitlab_1  |       default_guard_interpreter :default
gitlab_1  |       service_name "redis"
gitlab_1  |       enabled nil
gitlab_1  |       running nil
gitlab_1  |       masked nil
gitlab_1  |       pattern "redis"
gitlab_1  |       start_command "/opt/gitlab/embedded/bin/chpst -u root:root /opt/gitlab/embedded/bin/sv start /opt/gitlab/service/redis"
gitlab_1  |       stop_command "/opt/gitlab/embedded/bin/chpst -u root:root /opt/gitlab/embedded/bin/sv stop /opt/gitlab/service/redis"
gitlab_1  |       status_command "/opt/gitlab/embedded/bin/chpst -u root:root /opt/gitlab/embedded/bin/sv status /opt/gitlab/service/redis"
gitlab_1  |       restart_command "/opt/gitlab/embedded/bin/chpst -u root:root /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/redis"
gitlab_1  |       supports {:restart=>true, :reload=>true, :status=>true}
gitlab_1  |     end
gitlab_1  |     
gitlab_1  |     end
gitlab_1  |     
gitlab_1  |     System Info:
gitlab_1  |     ------------
gitlab_1  |     chef_version=14.14.29
gitlab_1  |     platform=ubuntu
gitlab_1  |     platform_version=16.04
gitlab_1  |     ruby=ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
gitlab_1  |     program_name=/opt/gitlab/embedded/bin/chef-client
gitlab_1  |     executable=/opt/gitlab/embedded/bin/chef-client
gitlab_1  |     
gitlab_1  | 
gitlab_1  | Running handlers:
gitlab_1  | Running handlers complete
gitlab_1  | Chef Client failed. 0 resources updated in 10 seconds
gitlabdpsoftservercom_gitlab_1 exited with code 1

以及我的docker-compose.yml文件:

version: '3'

services:
  gitlab:
    image: gitlab/gitlab-ce:12.10.8-ce.0
    hostname: mygitlab.ir
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'https://sample.ir'
        gitlab_rails['gitlab_shell_ssh_port'] = 8822

    ports:
      - "8880:80"
      - "8822:22"
    volumes:
      - ./gitlab-config:/etc/gitlab
      - ./gitlab-data:/var/opt/gitlab
      - ./logs:/var/log/gitlab
    restart: always

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题