then ran the “sudo apt-get install gitlab-ce=11.11.3-ce.0” command
received an error at:
Recipe: gitlab::web-server
* account[Webserver user and group] action create
* group[Webserver user and group] action create
================================================================================
Error executing action `create` on resource 'group[Webserver user and group]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '10'
---- Begin output of ["groupadd", "gitlab-www", "-r"] ----
STDOUT:
STDERR: groupadd: existing lock file /etc/group.lock with an invalid PID '15878
'
groupadd: cannot lock /etc/group; try again later.
---- End output of ["groupadd", "gitlab-www", "-r"] ----
Ran ["groupadd", "gitlab-www", "-r"] returned 10
I don’t understand where to go now, as I’m not a system expert neither… Should I log in as the “git” user to perform the installation?
There’s a(n unlikely) possibility that this was a transient error, and trying again won’t harm so do that.
In the likely event it fails again, it seems like something has tried to modify /etc/group on your system and died in the attempt leaving a lockfile in place (the unlikely possibility was that it was something actually running at that particular moment that was modifying /etc/group). That needs to be investigated.
The error message says with an invalid PID '15878, is that ' just the result of a bad copy-paste on your part or does the file actually contain that? (I don’t recall even having received that error, so I don’t know if it quotes the PID it reads)
If the file contains a what looks like a PID, find out if any process with that PID is running, if not you can probably just delete the file and try installing GitLab again. If a process with that PID is running you need to find out what that is doing and why it has locked /etc/group.
Actually, the whole error log says
root@ns3126688:~# sudo apt-get install gitlab-ce=11.11.3-ce.0
Lecture des listes de paquets… Fait
Construction de l’arbre des dépendances
Lecture des informations d’état… Fait
Les NOUVEAUX paquets suivants seront installés :
gitlab-ce
0 mis à jour, 1 nouvellement installés, 0 à enlever et 2 non mis à jour.
Il est nécessaire de prendre 664 Mo dans les archives.
Après cette opération, 1 798 Mo d’espace disque supplémentaires seront utilisés.
Réception de:1 https://packages.gitlab.com/gitlab/gitlab-ce/debian stretch/main amd64 gitlab-ce amd64 11.11.3-ce.0 [664 MB]
664 Mo réceptionnés en 15s (43,4 Mo/s)
Sélection du paquet gitlab-ce précédemment désélectionné.
(Lecture de la base de données… 105047 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de …/gitlab-ce_11.11.3-ce.0_amd64.deb …
Dépaquetage de gitlab-ce (11.11.3-ce.0) …
Paramétrage de gitlab-ce (11.11.3-ce.0) ...
gitlab: GitLab now ships with a newer version of PostgreSQL (10.7), but it is not yet
gitlab: enabled by default. To upgrade, RUN THE FOLLOWING COMMAND:
sudo gitlab-ctl pg-upgrade
gitlab: Note: This command does not support Geo instances yet. So we don't
gitlab: recommend running this command on Geo nodes. It will be supported
gitlab: in GitLab 12.0.
gitlab: For more details, please see:
gitlab: https://docs.gitlab.com/omnibus/settings/database.html#upgrade-packaged-postgresql-server
gitlab:
Starting Chef Client, version 13.6.4
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- gitlab (0.0.1)
- package (0.1.0)
- postgresql (0.1.0)
- consul (0.1.0)
- redis (0.1.0)
- registry (0.1.0)
- mattermost (0.1.0)
- gitaly (0.1.0)
- nginx (0.1.0)
- letsencrypt (0.1.0)
- runit (4.3.0)
- acme (3.1.0)
- crond (0.1.0)
- compat_resource (12.19.1)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create (up to date)
Converging 264 resources
* directory[/etc/gitlab] action create (up to date)
* directory[Create /var/opt/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
================================================================================
Error executing action `create` on resource 'group[Webserver user and group]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '10'
---- Begin output of ["groupadd", "gitlab-www", "-r"] ----
STDOUT:
STDERR: groupadd: existing lock file /etc/group.lock with an invalid PID '15878
'
groupadd: cannot lock /etc/group; try again later.
---- End output of ["groupadd", "gitlab-www", "-r"] ----
Ran ["groupadd", "gitlab-www", "-r"] returned 10
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("Webserver user and group") do
action [:create]
default_guard_interpreter :default
group_name "gitlab-www"
members []
declared_type :group
cookbook_name "gitlab"
system true
end
System Info:
------------
chef_version=13.6.4
platform=debian
platform_version=9.9
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [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[Webserver user and group]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
group[Webserver user and group] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb line 38) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '10'
---- Begin output of ["groupadd", "gitlab-www", "-r"] ----
STDOUT:
STDERR: groupadd: existing lock file /etc/group.lock with an invalid PID '15878
'
groupadd: cannot lock /etc/group; try again later.
---- End output of ["groupadd", "gitlab-www", "-r"] ----
Ran ["groupadd", "gitlab-www", "-r"] returned 10
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/web-server.rb
27: account "Webserver user and group" do
28: username webserver_username
29: uid node['gitlab']['web-server']['uid']
30: ugid webserver_group
31: groupname webserver_group
32: gid node['gitlab']['web-server']['gid']
33: shell node['gitlab']['web-server']['shell']
34: home node['gitlab']['web-server']['home']
35: append_to_group external_webserver_users.any?
36: group_members external_webserver_users
37: manage_home false
38: manage node['gitlab']['manage-accounts']['enable']
39: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/web-server.rb:27:in `from_file'
account("Webserver user and group") do
action [:create]
default_guard_interpreter :default
declared_type :account
cookbook_name "gitlab"
recipe_name "web-server"
username "gitlab-www"
uid nil
ugid "gitlab-www"
groupname "gitlab-www"
gid nil
shell "/bin/false"
home "/var/opt/gitlab/nginx"
append_to_group false
group_members []
manage_home false
manage true
end
System Info:
------------
chef_version=13.6.4
platform=debian
platform_version=9.9
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [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[Webserver user and group] (gitlab::web-server line 27) had an error: Mixlib::ShellOut::ShellCommandFailed: group[Webserver user and group] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb line 38) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '10'
---- Begin output of ["groupadd", "gitlab-www", "-r"] ----
STDOUT:
STDERR: groupadd: existing lock file /etc/group.lock with an invalid PID '15878
'
groupadd: cannot lock /etc/group; try again later.
---- End output of ["groupadd", "gitlab-www", "-r"] ----
Ran ["groupadd", "gitlab-www", "-r"] returned 10
Running handlers complete
Chef Client failed. 0 resources updated in 05 seconds
dpkg: erreur de traitement du paquet gitlab-ce (--configure) :
le sous-processus script post-installation installé a retourné une erreur de sortie d'état 1
Des erreurs ont été rencontrées pendant l'exécution :
gitlab-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
The missing ’ was a copy/paste error… I’ll try to identify if any process with PID 15878 still exists and kill the lock file if not.
Got way further when running the installer for the second time! I’ve temporarily renamed the group.lock file, received some system errors and finally ran the installer as expected. Just made a mistake with https configuration but it’s now ok!