2023-08-07T06:21:39.783606770Z * template[/opt/gitlab/embedded/etc/gitconfig] action create
2023-08-07T06:21:39.783620315Z
2023-08-07T06:21:39.783623427Z ================================================================================
2023-08-07T06:21:39.783830946Z Error executing action create
on resource ‘template[/opt/gitlab/embedded/etc/gitconfig]’
2023-08-07T06:21:39.783839203Z ================================================================================
2023-08-07T06:21:39.783841762Z
2023-08-07T06:21:39.783843876Z ArgumentError
2023-08-07T06:21:39.783845946Z -------------
2023-08-07T06:21:39.783847961Z could not find a temporary directory
2023-08-07T06:21:39.783850131Z
2023-08-07T06:21:39.783852148Z Resource Declaration:
2023-08-07T06:21:39.783854224Z ---------------------
2023-08-07T06:21:39.783856313Z # In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
2023-08-07T06:21:39.783858451Z
2023-08-07T06:21:39.783860464Z 70: template “#{install_dir}/embedded/etc/gitconfig” do
2023-08-07T06:21:39.783862802Z 71: source “gitconfig-system.erb”
2023-08-07T06:21:39.783865008Z 72: mode 0755
2023-08-07T06:21:39.783867107Z 73: variables gitconfig: node.dig(‘gitlab’, ‘omnibus-gitconfig’, ‘system’) || {}
2023-08-07T06:21:39.783869296Z 74: end
2023-08-07T06:21:39.783871343Z 75:
2023-08-07T06:21:39.783873341Z
2023-08-07T06:21:39.784056207Z Compiled Resource:
2023-08-07T06:21:39.784061317Z ------------------
2023-08-07T06:21:39.784063668Z # Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:70:in `from_file’
2023-08-07T06:21:39.784066035Z
2023-08-07T06:21:39.784068054Z template("/opt/gitlab/embedded/etc/gitconfig") do
2023-08-07T06:21:39.784070296Z action [:create]
2023-08-07T06:21:39.784072340Z default_guard_interpreter :default
2023-08-07T06:21:39.784074483Z source “gitconfig-system.erb”
2023-08-07T06:21:39.784084378Z declared_type :template
2023-08-07T06:21:39.784086816Z cookbook_name “gitlab”
2023-08-07T06:21:39.784089040Z recipe_name “default”
2023-08-07T06:21:39.784091239Z mode 493
2023-08-07T06:21:39.784093294Z variables {:gitconfig=>{}}
2023-08-07T06:21:39.784095515Z owner nil
2023-08-07T06:21:39.784097527Z group nil
2023-08-07T06:21:39.784099592Z path “/opt/gitlab/embedded/etc/gitconfig”
2023-08-07T06:21:39.784101850Z end
2023-08-07T06:21:39.784103849Z
2023-08-07T06:21:39.784251931Z System Info:
2023-08-07T06:21:39.784256445Z ------------
2023-08-07T06:21:39.784258557Z chef_version=17.10.0
2023-08-07T06:21:39.784260687Z platform=ubuntu
2023-08-07T06:21:39.784262765Z platform_version=20.04
2023-08-07T06:21:39.784264923Z ruby=ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5) [x86_64-linux]
2023-08-07T06:21:39.784267117Z program_name=/opt/gitlab/embedded/bin/cinc-client
2023-08-07T06:21:39.784269257Z executable=/opt/gitlab/embedded/bin/cinc-client
2023-08-07T06:21:39.784271385Z
2023-08-07T06:21:39.784779666Z [2023-08-07T14:21:39+08:00] INFO: Running queued delayed notifications before re-raising exception
2023-08-07T06:21:39.785350995Z
2023-08-07T06:21:39.785360662Z Running handlers:
2023-08-07T06:21:39.785488149Z There was an error running gitlab-ctl reconfigure:
2023-08-07T06:21:39.785493696Z
2023-08-07T06:21:39.785496016Z template[/opt/gitlab/embedded/etc/gitconfig] (gitlab::default line 70) had an error: ArgumentError: could not find a temporary directory
2023-08-07T06:21:39.785498392Z
2023-08-07T06:21:39.785527314Z [2023-08-07T14:21:39+08:00] ERROR: Running exception handlers
2023-08-07T06:21:39.785582734Z Running handlers complete
2023-08-07T06:21:39.785588332Z [2023-08-07T14:21:39+08:00] ERROR: Exception handlers complete
2023-08-07T06:21:39.785768531Z Infra Phase failed. 0 resources updated in 04 seconds
2023-08-07T06:21:39.786434109Z [2023-08-07T14:21:39+08:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
2023-08-07T06:21:39.786483403Z [2023-08-07T14:21:39+08:00] FATAL: ---------------------------------------------------------------------------------------
2023-08-07T06:21:39.786487231Z [2023-08-07T14:21:39+08:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
2023-08-07T06:21:39.786564296Z [2023-08-07T14:21:39+08:00] FATAL: ---------------------------------------------------------------------------------------
2023-08-07T06:21:39.786696846Z [2023-08-07T14:21:39+08:00] FATAL: ArgumentError: template[/opt/gitlab/embedded/etc/gitconfig] (gitlab::default line 70) had an error: ArgumentError: could not find a temporary directory
请大神来帮解决一下
systemctl status gitlab-runsvdir.service 看下进程状态是否启动。
docker部署的,容器状态 一会就变退出了。
可以检查下挂载目录权限。一般不需要对挂载目录做chmod操作。
不行之后我对它做了chmod操作了,怎么恢复回去?
docker exec -it gitlab update-permissions
docker restart gitlab
这个命令我也用过了,还是没有用
看下你是否记得之前的chmod操作,可以的话撤销之前的权限变更。另外可以重新运行一个gitlab实例,对比下相关目录的权限。
解决了权限的,变成一个新的错误了
2023-08-07T08:14:58.906362939Z [2023-08-07T16:14:58+08:00] ERROR: Running exception handlers
2023-08-07T08:14:58.906339057Z There was an error running gitlab-ctl reconfigure:
2023-08-07T08:14:58.906371579Z
2023-08-07T08:14:58.906374938Z redis_service[redis] (redis::enable line 19) had an error: Mixlib::ShellOut::ShellCommandFailed: runit_service[redis] (redis::enable line 52) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[restart_log_service] (redis::enable line 66) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
2023-08-07T08:14:58.906378410Z ---- Begin output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/redis/log ----
2023-08-07T08:14:58.906380758Z STDOUT: fail: /opt/gitlab/service/redis/log: runsv not running
2023-08-07T08:14:58.906382953Z STDERR:
2023-08-07T08:14:58.906385037Z ---- End output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/redis/log ----
2023-08-07T08:14:58.906387269Z Ran /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/redis/log returned 1
2023-08-07T08:14:58.906389441Z
2023-08-07T08:14:58.906901357Z Running handlers complete
2023-08-07T08:14:58.906913235Z [2023-08-07T16:14:58+08:00] ERROR: Exception handlers complete
2023-08-07T08:14:58.906916027Z Infra Phase failed. 16 resources updated in 34 seconds
2023-08-07T08:14:58.907342217Z [2023-08-07T16:14:58+08:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
2023-08-07T08:14:58.907409141Z [2023-08-07T16:14:58+08:00] FATAL: ---------------------------------------------------------------------------------------
2023-08-07T08:14:58.907414034Z [2023-08-07T16:14:58+08:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
2023-08-07T08:14:58.907416387Z [2023-08-07T16:14:58+08:00] FATAL: ---------------------------------------------------------------------------------------
2023-08-07T08:14:58.907568287Z [2023-08-07T16:14:58+08:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: redis_service[redis] (redis::enable line 19) had an error: Mixlib::ShellOut::ShellCommandFailed: runit_service[redis] (redis::enable line 52) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[restart_log_service] (redis::enable line 66) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
2023-08-07T08:14:58.907574652Z ---- Begin output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/redis/log ----
2023-08-07T08:14:58.907577036Z STDOUT: fail: /opt/gitlab/service/redis/log: runsv not running
2023-08-07T08:14:58.907589760Z STDERR:
2023-08-07T08:14:58.907592283Z ---- End output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/redis/log ----
2023-08-07T08:14:58.907594543Z Ran /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/redis/log returned 1
在启动docker的时候添加 -t -i --privileged=true gitlab:v1 /sbin/init 看看
看样子还是redis没有运行呢,可以再次通过systemctl的方式重启下gitlab
重启了好多次了,也是这样