12.2.5-ce.0 to 12.3.2-ce.0 upgrade error 'Property port must be one of: Integer, nil! You passed "18080".'
When upgrading from 12.2.5 to 12.3.2 encountered the below error:
Checking PostgreSQL executables:Starting Chef Client, version 14.13.11 resolving cookbooks for run list: ["gitlab::config", "postgresql::bin"] Synchronizing Cookbooks:
- postgresql (0.1.0)
- package (0.1.0)
- redis (0.1.0)
- gitlab (0.0.1)
- registry (0.1.0)
- monitoring (0.1.0)
- mattermost (0.1.0)
- consul (0.1.0)
- nginx (0.1.0)
- gitaly (0.1.0)
- letsencrypt (0.1.0)
- crond (0.1.0)
- runit (4.3.0)
- acme (4.0.0) Installing Cookbook Gems: Compiling Cookbooks... Converging 2 resources Recipe: postgresql::bin
- ruby_block[check_postgresql_version] action run (skipped due to not_if)
- ruby_block[Link postgresql bin files to the correct version] action run
- execute the ruby block Link postgresql bin files to the correct version
Running handlers: Running handlers complete Chef Client finished, 1/2 resources updated in 05 seconds Checking PostgreSQL executables: OK Checking if Grafana needs to be reset: Grafana was reset during a previous upgrade. Skipping. Checking if Grafana needs to be reset: OK Shutting down all GitLab services except those needed for migrations ok: down: alertmanager: 0s, normally up ok: down: gitlab-monitor: 0s, normally up ok: down: gitlab-workhorse: 1s, normally up ok: down: grafana: 0s, normally up ok: down: logrotate: 1s, normally up ok: down: nginx: 0s, normally up ok: down: node-exporter: 1s, normally up ok: down: prometheus: 0s, normally up ok: down: redis-exporter: 1s, normally up ok: down: sidekiq: 0s, normally up ok: down: unicorn: 0s, normally up Ensuring the required services are running ok: run: redis: (pid 2750) 1268198s ok: run: gitaly: (pid 2746) 1268198s run: redis: (pid 2750) 1268198s; run: log: (pid 2729) 1268198s run: gitaly: (pid 2746) 1268198s; run: log: (pid 2728) 1268198s Ensuring Prometheus is updated:Already running Prometheus version 2. Ensuring Prometheus is updated: OK Reconfiguring GitLab to apply migrations Starting Chef Client, version 14.13.11 resolving cookbooks for run list: ["gitlab"] Synchronizing Cookbooks:
- postgresql (0.1.0)
- registry (0.1.0)
- redis (0.1.0)
- consul (0.1.0)
- gitaly (0.1.0)
- letsencrypt (0.1.0)
- nginx (0.1.0)
- runit (4.3.0)
- gitlab (0.0.1)
- crond (0.1.0)
- package (0.1.0)
- monitoring (0.1.0)
- acme (4.0.0)
- mattermost (0.1.0) Installing Cookbook Gems: Compiling Cookbooks... Recipe: gitlab::default
- directory[/etc/gitlab] action create (up to date)
================================================================================ Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
Chef::Exceptions::ValidationFailed
Property port must be one of: Integer, nil! You passed "18080".
Cookbook Trace:
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/unicorn.rb:31:in `block in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/unicorn.rb:28:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:143:in `block in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:141:in `each'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:141:in `from_file'
Relevant File Content:
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/unicorn.rb:
24: user account_helper.gitlab_user
25: group account_helper.gitlab_group
26: end
27:
28: consul_service 'rails' do
29: action Prometheus.service_discovery_action
30: ip_address node['gitlab']['unicorn']['listen']
31>> port node['gitlab']['unicorn']['port']
32: reload_service false unless node['consul']['enable']
33: end
34:
35: gitlab_sysctl "net.core.somaxconn" do
36: value node['gitlab']['unicorn']['somaxconn']
37: end
38:
System Info:
chef_version=14.13.11 platform=ubuntu platform_version=18.04 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:
Property port must be one of: Integer, nil! You passed "18080".
Running handlers complete
Chef Client failed. 0 resources updated in 05 seconds
Ensuring PostgreSQL is updated:Traceback (most recent call last):
8: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in <main>' 7: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in load'
6: from /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/omnibus-ctl-0.6.0/bin/omnibus-ctl:31:in <top (required)>' 5: from /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:746:in run'
4: from /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:204:in block in add_command_under_category' 3: from /opt/gitlab/embedded/service/omnibus-ctl/pg-upgrade.rb:78:in block in load_file'
2: from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:105:in roles' 1: from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:64:in get_node_attributes'
/opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:52:in `parse_json_file': Attributes not found in /opt/gitlab/embedded/nodes/puppet.com.json, has reconfigure been run yet? (GitlabCtl::Errors::NodeError)
Ensuring PostgreSQL is updated: NOT OK
Error ensuring PostgreSQL is updated. Please check the logs
dpkg: error processing package gitlab-ce (--configure):
installed gitlab-ce package post-installation script subprocess returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo gitlab-ctl reconfigure Starting Chef Client, version 14.13.11 resolving cookbooks for run list: ["gitlab"] Synchronizing Cookbooks:
- postgresql (0.1.0)
- registry (0.1.0)
- mattermost (0.1.0)
- gitaly (0.1.0)
- letsencrypt (0.1.0)
- redis (0.1.0)
- monitoring (0.1.0)
- runit (4.3.0)
- acme (4.0.0)
- crond (0.1.0)
- package (0.1.0)
- gitlab (0.0.1)
- consul (0.1.0)
- nginx (0.1.0) Installing Cookbook Gems: Compiling Cookbooks... Recipe: gitlab::default
- directory[/etc/gitlab] action create (up to date)
================================================================================ Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
Chef::Exceptions::ValidationFailed
Property port must be one of: Integer, nil! You passed "18080".
Cookbook Trace:
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/unicorn.rb:31:in `block in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/unicorn.rb:28:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:143:in `block in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:141:in `each'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:141:in `from_file'
Relevant File Content:
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/unicorn.rb:
24: user account_helper.gitlab_user
25: group account_helper.gitlab_group
26: end
27:
28: consul_service 'rails' do
29: action Prometheus.service_discovery_action
30: ip_address node['gitlab']['unicorn']['listen']
31>> port node['gitlab']['unicorn']['port']
32: reload_service false unless node['consul']['enable']
33: end
34:
35: gitlab_sysctl "net.core.somaxconn" do
36: value node['gitlab']['unicorn']['somaxconn']
37: end
38:
System Info:
chef_version=14.13.11 platform=ubuntu platform_version=18.04 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:
Property port must be one of: Integer, nil! You passed "18080".
Running handlers complete Chef Client failed. 0 resources updated in 06 seconds
Tried to down grade but got the below error:
dpkg: warning: downgrading gitlab-ce from 12.3.2-ce.0 to 12.2.6-ce.0
(Reading database ... 262582 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_12.2.6-ce.0_amd64.deb ...
Malformed configuration JSON file found at /opt/gitlab/embedded/nodes/puppet.com.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_12.2.6-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_12.2.6-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)