My Private GitLab Server is currently on 13.0.14 (ad4adc9d0e1)
When I try to upgrade to the latest version of GitLab (Community Edition):
root@gitlab:~# sudo apt-get install gitlab-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
gitlab-ce
1 upgraded, 0 newly installed, 0 to remove and 128 not upgraded.
Need to get 826 MB of archives.
After this operation, 306 MB of additional disk space will be used.
Get:1 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu bionic/main amd64 gitlab-ce amd64 13.6.1-ce.0 [826 MB]
Fetched 826 MB in 55s (14.9 MB/s)
(Reading database ... 144138 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_13.6.1-ce.0_amd64.deb ...
Malformed configuration JSON file found at /opt/gitlab/embedded/nodes/gitlab.json.
This usually happens when your last run of `gitlab-ctl reconfigure` didn't complete successfully.
This file is used to check if any of the unsupported configurations are enabled,
and hence require a working reconfigure before upgrading.
Please run `sudo gitlab-ctl reconfigure` to fix it and try again.
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_13.6.1-ce.0_amd64.deb (--unpack):
new gitlab-ce package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/gitlab-ce_13.6.1-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
/opt/gitlab/embedded/nodes/gitlab.json
only includes the following contents:
{
"name": "gitlab"
}
When I try to Reconfigure GitLab:
root@gitlab:~# sudo gitlab-ctl reconfigure
Starting Chef Client, version 14.14.29
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- gitlab (0.0.1)
- package (0.1.0)
- postgresql (0.1.0)
- redis (0.1.0)
- monitoring (0.1.0)
- registry (0.1.0)
- mattermost (0.1.0)
- consul (0.1.0)
- gitaly (0.1.0)
- praefect (0.1.0)
- letsencrypt (0.1.0)
- nginx (0.1.0)
- runit (4.3.0)
- acme (4.1.1)
- crond (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
RuntimeError
------------
Only one web server (Puma or Unicorn) can be enabled at the same time!
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/puma.rb:27:in `only_one_allowed!'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/puma.rb:21:in `parse_variables'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:185:in `block in generate_config'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:183:in `each'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:183:in `generate_config'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:24:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/puma.rb:
20: def parse_variables
21: only_one_allowed!
22: end
23:
24: def only_one_allowed!
25: return unless Services.enabled?('unicorn') && Services.enabled?('puma')
26:
27>> raise 'Only one web server (Puma or Unicorn) can be enabled at the same time!'
28: end
29:
30: def workers(total_memory = Gitlab['node']['memory']['total'].to_i)
31: [
32: 2, # Two is the minimum or web editor will no longer work.
33: [
34: Gitlab['node']['cpu']['total'].to_i,
35: worker_memory(total_memory).to_i,
36: ].min # min because we want to exceed neither CPU nor RAM
System Info:
------------
chef_version=14.14.29
platform=ubuntu
platform_version=18.04
ruby=ruby 2.6.6p146 (2020-03-31 revision 67876) [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:
Only one web server (Puma or Unicorn) can be enabled at the same time!
Running handlers complete
Chef Client failed. 0 resources updated in 11 seconds
So I can’t seem to Reconfigure GitLab now …
This guide recommends I try to upgrade to 13.4.3
. Here is what I get when I attempt to:
root@gitlab:~# apt-get install gitlab-ce=13.4.3-ce.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
gitlab-ce
1 upgraded, 0 newly installed, 0 to remove and 128 not upgraded.
Need to get 801 MB of archives.
After this operation, 193 MB of additional disk space will be used.
Get:1 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu bionic/main amd64 gitlab-ce amd64 13.4.3-ce.0 [801 MB]
Fetched 801 MB in 50s (16.2 MB/s)
(Reading database ... 144138 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_13.4.3-ce.0_amd64.deb ...
Malformed configuration JSON file found at /opt/gitlab/embedded/nodes/gitlab.json.
This usually happens when your last run of `gitlab-ctl reconfigure` didn't complete successfully.
This file is used to check if any of the unsupported configurations are enabled,
and hence require a working reconfigure before upgrading.
Please run `sudo gitlab-ctl reconfigure` to fix it and try again.
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_13.4.3-ce.0_amd64.deb (--unpack):
new gitlab-ce package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/gitlab-ce_13.4.3-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
What should I do now to upgrade past 13.0.14? Thankfully the GItLab Web GUI is up and seems to be working, I just can’t seem to upgrade at all.