gitlab-ctl reconfigure启动报错
gitlab-ctl reconfigure 报错Recipe: monitoring::user* account[Prometheus user and group] action create* group[Prometheus user and group] action create==============================...
·
gitlab-ctl reconfigure 报错
Recipe: monitoring::user
* account[Prometheus user and group] action create
* group[Prometheus user and group] action create
================================================================================
Error executing action `create` on resource 'group[Prometheus user and group]'
================================================================================
Errno::ENOMEM
-------------
Cannot allocate memory - fork(2)
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb
38: group new_resource.name do
39: group_name new_resource.groupname
40: gid new_resource.gid
41: system new_resource.system
42: if new_resource.append_to_group
43: append true
44: members new_resource.group_members
45: end
46: action :create
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb:38:in `block in class_from_file'
group("Prometheus user and group") do
action [:create]
default_guard_interpreter :default
declared_type :group
cookbook_name "monitoring"
group_name "gitlab-prometheus"
gid nil
system true
members []
excluded_members []
end
System Info:
------------
chef_version=14.13.11
platform=centos
platform_version=7.4.1708
ruby=ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
================================================================================
Error executing action `create` on resource 'account[Prometheus user and group]'
================================================================================
Errno::ENOMEM
-------------
group[Prometheus user and group] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb line 38) had an error: Errno::ENOMEM: Cannot allocate memory - fork(2)
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/monitoring/recipes/user.rb
22: account "Prometheus user and group" do
23: username prometheus_user
24: uid node['monitoring']['prometheus']['uid']
25: ugid prometheus_group
26: groupname prometheus_group
27: home prometheus_dir
28: gid node['monitoring']['prometheus']['gid']
29: shell node['monitoring']['prometheus']['shell']
30: manage node['gitlab']['manage-accounts']['enable']
31: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/monitoring/recipes/user.rb:22:in `from_file'
account("Prometheus user and group") do
action [:create]
default_guard_interpreter :default
declared_type :account
cookbook_name "monitoring"
recipe_name "user"
username "gitlab-prometheus"
uid nil
ugid "gitlab-prometheus"
groupname "gitlab-prometheus"
gid nil
shell "/bin/sh"
home "/var/opt/gitlab/prometheus"
manage true
end
System Info:
------------
chef_version=14.13.11
platform=centos
platform_version=7.4.1708
ruby=ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
Running handlers:
There was an error running gitlab-ctl reconfigure:
account[Prometheus user and group] (monitoring::user line 22) had an error: Errno::ENOMEM: group[Prometheus user and group] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb line 38) had an error: Errno::ENOMEM: Cannot allocate memory - fork(2)
Running handlers complete
Chef Client failed. 13 resources updated in 22 seconds
解决办法:
这种是应为内存太小,加大内存,建议4G以上,再次执行,就没有报错了
更多推荐
已为社区贡献2条内容
所有评论(0)