Error upgrade to: 15.11.4

I’ve got an error when trying to upgrade from 15.11.3 to 15.11.4. Here are contents from /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out

Generated at 2023-05-18 16:40:04 +0000

RuntimeError: gitlab_rails[‘smtp_tls’] and gitlab_rails[‘smtp_enable_starttls_auto’] are mutually exclusive. Set one of them to false. SMTP providers usually use port 465 for TLS and port 587 for STARTTLS.

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/smtp_helper.rb:8:in `validate_smtp_settings!’

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab_rails.rb:366:in `validate_smtp_settings!’

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab_rails.rb:37:in `parse_variables’

/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:206:in `block in generate_config’

/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:204:in `each’

/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:204:in `generate_config’

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:24:in `from_file’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/mixin/from_file.rb:34:in `instance_eval’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/mixin/from_file.rb:34:in `from_file’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/cookbook_version.rb:233:in `load_ruby_recipe’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/cookbook_version.rb:203:in `load_recipe’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:417:in `load_recipe’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:373:in `block in include_recipe’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:372:in `each’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:372:in `include_recipe’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/dsl/include_recipe.rb:26:in `include_recipe’

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/config.rb:24:in `from_file’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/mixin/from_file.rb:34:in `instance_eval’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/mixin/from_file.rb:34:in `from_file’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/cookbook_version.rb:233:in `load_ruby_recipe’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/cookbook_version.rb:203:in `load_recipe’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:417:in `load_recipe’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context/cookbook_compiler.rb:228:in `block in compile_recipes’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context/cookbook_compiler.rb:225:in `each’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context/cookbook_compiler.rb:225:in `compile_recipes’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context/cookbook_compiler.rb:109:in `compile’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:247:in `load’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/policy_builder/expand_node_object.rb:103:in `setup_run_context’

/opt/gitlab/embedded/lib/ruby/3.0.0/forwardable.rb:238:in `setup_run_context’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/client.rb:495:in `setup_run_context’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/client.rb:281:in `run’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/application.rb:305:in `run_with_graceful_exit_option’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/application.rb:281:in `block in run_chef_client’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/local_mode.rb:42:in `with_server_connectivity’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/application.rb:264:in `run_chef_client’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/application/base.rb:352:in `run_application’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/application.rb:67:in `run’

/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-bin-17.10.0/bin/cinc-client:25:in `<top (required)>’

/opt/gitlab/embedded/bin/cinc-client:25:in `load’

error screen

Seems to be that in your /etc/gitlab/gitlab.rb you have both the above options configured with true, so as the message says, you need to edit gitlab.rb file and set one of them to false. Then after editing, run:

gitlab-ctl reconfigure
gitlab-ctl restart
1 Like

Thank you, successfully updated.

2 Likes

That worked for me as well.
Any recommendation on which one to disable? are they equivalent?

If it was me, I would set gitlab_rails[‘smtp_enable_starttls_auto’] as false. The smtp_tls makes far more sense to enable, since this is configuring Gitlab to use SSL/TLS rather than clear text. Also, TLS if it sees that TLS is available on the other side of the connection, then it will automatically use it. So we don’t need to set STARTTLS to be automatic, because it already is anyway.

2 Likes