Error gitlab-ctl reconfigure : Error executing action `create` on resource 'linux_user[GitLab user and group]'
Hello, I made a fresh ubuntu server install in my vmware and had gitlab installed. I am unable to get past this issue. Can someone please help me with this issue?
git@gitlab:~$ sudo gitlab-ctl reconfigure
Starting Chef Infra Client, version 15.14.0
resolving cookbooks for run list: ["gitlab-ee"]
Synchronizing Cookbooks:
- gitlab-ee (0.0.1)
- gitlab (0.0.1)
- patroni (0.1.0)
- runit (5.1.3)
- postgresql (0.1.0)
- monitoring (0.1.0)
- mattermost (0.1.0)
- praefect (0.1.0)
- gitlab-pages (0.1.0)
- logrotate (0.1.0)
- nginx (0.1.0)
- acme (4.1.3)
- redis (0.1.0)
- package (0.1.0)
- consul (0.1.0)
- pgbouncer (0.1.0)
- letsencrypt (0.1.0)
- gitlab-kas (0.1.0)
- gitaly (0.1.0)
- crond (0.1.0)
- registry (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create (up to date)
Converging 300 resources
* directory[/etc/gitlab] action create (up to date)
* directory[Create /var/opt/gitlab] action create (up to date)
* directory[Create /var/log/gitlab] action create (up to date)
* directory[/opt/gitlab/embedded/etc] action create (up to date)
* template[/opt/gitlab/embedded/etc/gitconfig] action create (up to date)
Recipe: gitlab::web-server
* account[Webserver user and group] action create
* group[Webserver user and group] action create (up to date)
* linux_user[Webserver user and group] action create (up to date)
(up to date)
Recipe: gitlab::users
* directory[/var/opt/gitlab] action create (up to date)
* account[GitLab user and group] action create
* group[GitLab user and group] action create (up to date)
* linux_user[GitLab user and group] action create
================================================================================
Error executing action `create` on resource 'linux_user[GitLab user and group]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0, 12], but received '8'
---- Begin output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
STDOUT:
STDERR: usermod: user git is currently used by process 1091
---- End output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
Ran ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] returned 8
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb
51: user new_resource.name do
52: username new_resource.username
53: shell new_resource.shell
54: home new_resource.home
55: uid new_resource.uid
56: gid new_resource.ugid
57: system new_resource.system
58: manage_home new_resource.manage_home
59: action :create
60: end
61: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb:51:in `block in class_from_file'
linux_user("GitLab user and group") do
action [:create]
default_guard_interpreter :default
declared_type :user
cookbook_name "gitlab"
username "git"
shell "/bin/sh"
home "/var/opt/gitlab"
uid nil
gid 1000
system true
end
System Info:
------------
chef_version=15.14.0
platform=ubuntu
platform_version=20.04
ruby=ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [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[GitLab user and group]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
linux_user[GitLab user and group] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 12], but received '8'
---- Begin output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
STDOUT:
STDERR: usermod: user git is currently used by process 1091
---- End output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
Ran ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] returned 8
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/users.rb
28: account "GitLab user and group" do
29: username gitlab_username
30: uid node['gitlab']['user']['uid']
31: ugid gitlab_group
32: groupname gitlab_group
33: gid node['gitlab']['user']['gid']
34: shell node['gitlab']['user']['shell']
35: home gitlab_home
36: manage node['gitlab']['manage-accounts']['enable']
37: end
38:
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/users.rb:28:in `from_file'
account("GitLab user and group") do
action [:create]
default_guard_interpreter :default
declared_type :account
cookbook_name "gitlab"
recipe_name "users"
username "git"
uid nil
ugid "git"
groupname "git"
gid nil
shell "/bin/sh"
home "/var/opt/gitlab"
manage true
end
System Info:
------------
chef_version=15.14.0
platform=ubuntu
platform_version=20.04
ruby=ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [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[GitLab user and group] (gitlab::users line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: linux_user[GitLab user and group] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 12], but received '8'
---- Begin output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
STDOUT:
STDERR: usermod: user git is currently used by process 1091
---- End output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
Ran ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] returned 8
Notes:
Default admin account has been configured with following details:
Username: root
Password: You didn't opt-in to print initial root password to STDOUT.
Password stored to /etc/gitlab/initial_root_password. This file will be cleaned up in first reconfigure run after 24 hours.
NOTE: Because these credentials might be present in your log files in plain text, it is highly recommended to reset the password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.
Running handlers complete
Chef Infra Client failed. 0 resources updated in 06 seconds
Notes:
Default admin account has been configured with following details:
Username: root
Password: You didn't opt-in to print initial root password to STDOUT.
Password stored to /etc/gitlab/initial_root_password. This file will be cleaned up in first reconfigure run after 24 hours.
NOTE: Because these credentials might be present in your log files in plain text, it is highly recommended to reset the password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.
Edited by Ved Dey