Problems decrypting some database values

Hi there. I am trying to migrate Omnibus GitLab from one host to another following this procedure: Restore GitLab | GitLab. The OS versions are the same (Debian GNU/Linux 11), and the gitlab-ee package versions too (15.8.0-ee.0).

Everything runs smoothly, except when I try to check database values can be decrypted. I have the following failed items there:

gitlab-rake gitlab:doctor:secrets VERBOSE=1

I, [2023-03-17T11:44:28.621129 #3214] INFO – : Checking encrypted values in the database
I, [2023-03-17T11:44:45.997825 #3214] INFO – : - Ci::InstanceVariable failures: 0
I, [2023-03-17T11:44:46.007959 #3214] INFO – : - Ci::PipelineVariable failures: 0
I, [2023-03-17T11:44:46.016547 #3214] INFO – : - Ci::PipelineScheduleVariable failures: 0
I, [2023-03-17T11:44:46.026119 #3214] INFO – : - Ci::Variable failures: 0
I, [2023-03-17T11:44:46.034824 #3214] INFO – : - Ci::GroupVariable failures: 0
I, [2023-03-17T11:44:46.042002 #3214] INFO – : - Ci::JobVariable failures: 0
I, [2023-03-17T11:44:46.066104 #3214] INFO – : - ApplicationSetting failures: 0
I, [2023-03-17T11:44:46.091794 #3214] INFO – : - Snippet failures: 0
I, [2023-03-17T11:44:46.361823 #3214] INFO – : - PersonalSnippet failures: 0
I, [2023-03-17T11:44:46.364794 #3214] INFO – : - ProjectSnippet failures: 0
I, [2023-03-17T11:44:46.475292 #3214] INFO – : - User failures: 14
D, [2023-03-17T11:44:46.475405 #3214] DEBUG – : - User[1]: static_object_token
D, [2023-03-17T11:44:46.475486 #3214] DEBUG – : - User[2]: static_object_token
D, [2023-03-17T11:44:46.475554 #3214] DEBUG – : - User[3]: static_object_token
D, [2023-03-17T11:44:46.475622 #3214] DEBUG – : - User[4]: static_object_token
D, [2023-03-17T11:44:46.475686 #3214] DEBUG – : - User[5]: static_object_token
D, [2023-03-17T11:44:46.475753 #3214] DEBUG – : - User[6]: static_object_token
D, [2023-03-17T11:44:46.475826 #3214] DEBUG – : - User[7]: static_object_token
D, [2023-03-17T11:44:46.475893 #3214] DEBUG – : - User[9]: static_object_token
D, [2023-03-17T11:44:46.475956 #3214] DEBUG – : - User[10]: static_object_token
D, [2023-03-17T11:44:46.476027 #3214] DEBUG – : - User[11]: static_object_token
D, [2023-03-17T11:44:46.476089 #3214] DEBUG – : - User[12]: static_object_token
D, [2023-03-17T11:44:46.476153 #3214] DEBUG – : - User[13]: static_object_token
D, [2023-03-17T11:44:46.476215 #3214] DEBUG – : - User[14]: static_object_token
D, [2023-03-17T11:44:46.476281 #3214] DEBUG – : - User[15]: static_object_token
I, [2023-03-17T11:44:46.485038 #3214] INFO – : - GeoNode failures: 0
I, [2023-03-17T11:44:46.492263 #3214] INFO – : - Clusters::Platforms::Kubernetes failures: 0
I, [2023-03-17T11:44:46.659148 #3214] INFO – : - Integration failures: 0
I, [2023-03-17T11:44:46.663574 #3214] INFO – : - Integrations::Github failures: 0
I, [2023-03-17T11:44:46.667194 #3214] INFO – : - Integrations::AppleAppStore failures: 0
I, [2023-03-17T11:44:46.670784 #3214] INFO – : - Integrations::Asana failures: 0
I, [2023-03-17T11:44:46.674592 #3214] INFO – : - Integrations::Assembla failures: 0
I, [2023-03-17T11:44:46.680162 #3214] INFO – : - Integrations::BaseCi failures: 0
I, [2023-03-17T11:44:46.684284 #3214] INFO – : - Integrations::Bamboo failures: 0
I, [2023-03-17T11:44:46.687885 #3214] INFO – : - Integrations::Buildkite failures: 0
I, [2023-03-17T11:44:46.691643 #3214] INFO – : - Integrations::DroneCi failures: 0
I, [2023-03-17T11:44:46.695447 #3214] INFO – : - Integrations::Jenkins failures: 0
I, [2023-03-17T11:44:46.700050 #3214] INFO – : - Integrations::Teamcity failures: 0
I, [2023-03-17T11:44:46.704650 #3214] INFO – : - Integrations::MockCi failures: 0
I, [2023-03-17T11:44:46.709135 #3214] INFO – : - Integrations::BaseIssueTracker failures: 0
I, [2023-03-17T11:44:46.712578 #3214] INFO – : - Integrations::Bugzilla failures: 0
I, [2023-03-17T11:44:46.716072 #3214] INFO – : - Integrations::CustomIssueTracker failures: 0
I, [2023-03-17T11:44:46.719620 #3214] INFO – : - Integrations::Ewm failures: 0
I, [2023-03-17T11:44:46.723185 #3214] INFO – : - Integrations::Jira failures: 0
I, [2023-03-17T11:44:46.726694 #3214] INFO – : - Integrations::Redmine failures: 0
I, [2023-03-17T11:44:46.730470 #3214] INFO – : - Integrations::Youtrack failures: 0
I, [2023-03-17T11:44:46.734808 #3214] INFO – : - Integrations::Zentao failures: 0
I, [2023-03-17T11:44:46.738851 #3214] INFO – : - Integrations::Campfire failures: 0
I, [2023-03-17T11:44:46.743986 #3214] INFO – : - Integrations::BaseThirdPartyWiki failures: 0
I, [2023-03-17T11:44:46.748201 #3214] INFO – : - Integrations::Confluence failures: 0
I, [2023-03-17T11:44:46.752273 #3214] INFO – : - Integrations::Shimo failures: 0
I, [2023-03-17T11:44:46.756384 #3214] INFO – : - Integrations::Datadog failures: 0
I, [2023-03-17T11:44:46.759126 #3214] INFO – : - Integrations::BaseChatNotification failures: 0
I, [2023-03-17T11:44:46.762850 #3214] INFO – : - Integrations::Discord failures: 0
I, [2023-03-17T11:44:46.766656 #3214] INFO – : - Integrations::HangoutsChat failures: 0
I, [2023-03-17T11:44:46.771089 #3214] INFO – : - Integrations::Mattermost failures: 0
I, [2023-03-17T11:44:46.775055 #3214] INFO – : - Integrations::MicrosoftTeams failures: 0
I, [2023-03-17T11:44:46.777994 #3214] INFO – : - Integrations::BaseSlackNotification failures: 0
I, [2023-03-17T11:44:46.780210 #3214] INFO – : - Integrations::Slack failures: 0
I, [2023-03-17T11:44:46.783920 #3214] INFO – : - Integrations::GitlabSlackApplication failures: 0
I, [2023-03-17T11:44:46.787452 #3214] INFO – : - Integrations::Pumble failures: 0
I, [2023-03-17T11:44:46.790926 #3214] INFO – : - Integrations::UnifyCircuit failures: 0
I, [2023-03-17T11:44:46.794413 #3214] INFO – : - Integrations::WebexTeams failures: 0
I, [2023-03-17T11:44:46.798063 #3214] INFO – : - Integrations::EmailsOnPush failures: 0
I, [2023-03-17T11:44:46.801530 #3214] INFO – : - Integrations::ExternalWiki failures: 0
I, [2023-03-17T11:44:46.804987 #3214] INFO – : - Integrations::Harbor failures: 0
I, [2023-03-17T11:44:46.808339 #3214] INFO – : - Integrations::Irker failures: 0
I, [2023-03-17T11:44:46.811919 #3214] INFO – : - Integrations::BaseSlashCommands failures: 0
I, [2023-03-17T11:44:46.815421 #3214] INFO – : - Integrations::MattermostSlashCommands failures: 0
I, [2023-03-17T11:44:46.818930 #3214] INFO – : - Integrations::SlackSlashCommands failures: 0
I, [2023-03-17T11:44:46.822362 #3214] INFO – : - Integrations::Packagist failures: 0
I, [2023-03-17T11:44:46.825835 #3214] INFO – : - Integrations::PipelinesEmail failures: 0
I, [2023-03-17T11:44:46.829252 #3214] INFO – : - Integrations::Pivotaltracker failures: 0
I, [2023-03-17T11:44:46.831402 #3214] INFO – : - Integrations::BaseMonitoring failures: 0
I, [2023-03-17T11:44:46.833359 #3214] INFO – : - Integrations::Prometheus failures: 0
I, [2023-03-17T11:44:46.836977 #3214] INFO – : - Integrations::MockMonitoring failures: 0
I, [2023-03-17T11:44:46.840485 #3214] INFO – : - Integrations::Pushover failures: 0
I, [2023-03-17T11:44:46.848344 #3214] INFO – : - Clusters::Applications::Helm failures: 0
I, [2023-03-17T11:44:46.856628 #3214] INFO – : - Clusters::Applications::Prometheus failures: 0
I, [2023-03-17T11:44:46.863936 #3214] INFO – : - Dast::SiteProfileSecretVariable failures: 0
I, [2023-03-17T11:44:46.871734 #3214] INFO – : - AlertManagement::HttpIntegration failures: 0
I, [2023-03-17T11:44:46.878933 #3214] INFO – : - GrafanaIntegration failures: 0
I, [2023-03-17T11:44:46.886863 #3214] INFO – : - JiraConnectInstallation failures: 0
I, [2023-03-17T11:44:46.912334 #3214] INFO – : - PagesDomain failures: 0
I, [2023-03-17T11:44:46.918532 #3214] INFO – : - PagesDomainAcmeOrder failures: 0
I, [2023-03-17T11:44:46.924021 #3214] INFO – : - ProjectImportData failures: 0
I, [2023-03-17T11:44:46.929164 #3214] INFO – : - RemoteMirror failures: 0
I, [2023-03-17T11:44:46.934304 #3214] INFO – : - Alerting::ProjectAlertingSetting failures: 0
I, [2023-03-17T11:44:46.939941 #3214] INFO – : - Atlassian::Identity failures: 0
I, [2023-03-17T11:44:46.945343 #3214] INFO – : - BulkImports::Configuration failures: 0
I, [2023-03-17T11:44:46.969191 #3214] INFO – : - Clusters::KubernetesNamespace failures: 0
I, [2023-03-17T11:44:46.974721 #3214] INFO – : - ErrorTracking::ProjectErrorTrackingSetting failures: 0
I, [2023-03-17T11:44:46.980330 #3214] INFO – : - IncidentManagement::ProjectIncidentManagementSetting failures: 0
I, [2023-03-17T11:44:46.985882 #3214] INFO – : - Integrations::IssueTrackerData failures: 0
I, [2023-03-17T11:44:46.991939 #3214] INFO – : - Integrations::JiraTrackerData failures: 0
I, [2023-03-17T11:44:46.999254 #3214] INFO – : - Integrations::ZentaoTrackerData failures: 0
I, [2023-03-17T11:44:47.005389 #3214] INFO – : - Serverless::DomainCluster failures: 0
I, [2023-03-17T11:44:47.007584 #3214] INFO – : - Clusters::Integrations::Prometheus failures: 0
I, [2023-03-17T11:44:47.014452 #3214] INFO – : - Clusters::Providers::Aws failures: 0
I, [2023-03-17T11:44:47.020933 #3214] INFO – : - Clusters::Providers::Gcp failures: 0
I, [2023-03-17T11:44:47.026574 #3214] INFO – : - Packages::Debian::GroupDistributionKey failures: 0
I, [2023-03-17T11:44:47.032246 #3214] INFO – : - Packages::Debian::ProjectDistributionKey failures: 0
I, [2023-03-17T11:44:47.057242 #3214] INFO – : - WebHook failures: 0
I, [2023-03-17T11:44:47.061372 #3214] INFO – : - ProjectHook failures: 0
I, [2023-03-17T11:44:47.065462 #3214] INFO – : - ServiceHook failures: 0
I, [2023-03-17T11:44:47.069802 #3214] INFO – : - SystemHook failures: 0
I, [2023-03-17T11:44:47.074346 #3214] INFO – : - GroupHook failures: 0
I, [2023-03-17T11:44:47.110969 #3214] INFO – : - Gitlab::BackgroundMigration::BackfillIntegrationsEnableSslVerification::Integration failures: 0
I, [2023-03-17T11:44:47.114714 #3214] INFO – : - Gitlab::BackgroundMigration::BackfillJiraTrackerDeploymentType2::JiraTrackerDataTemp failures: 0
I, [2023-03-17T11:44:47.120404 #3214] INFO – : - SlackIntegration failures: 0
I, [2023-03-17T11:44:47.125739 #3214] INFO – : - StatusPage::ProjectSetting failures: 0
I, [2023-03-17T11:44:47.153099 #3214] INFO – : - Ci::Runner failures: 0
I, [2023-03-17T11:44:47.183264 #3214] INFO – : - Ci::Build failures: 0
I, [2023-03-17T11:44:47.299392 #3214] INFO – : - Project failures: 0
I, [2023-03-17T11:44:47.410496 #3214] INFO – : - Group failures: 3
D, [2023-03-17T11:44:47.410607 #3214] DEBUG – : - Group[2]: runners_token
D, [2023-03-17T11:44:47.410712 #3214] DEBUG – : - Group[5]: runners_token
D, [2023-03-17T11:44:47.410843 #3214] DEBUG – : - Group[6]: runners_token
I, [2023-03-17T11:44:47.419792 #3214] INFO – : - DeployToken failures: 0
I, [2023-03-17T11:44:47.427129 #3214] INFO – : - Clusters::AgentToken failures: 0
I, [2023-03-17T11:44:47.434632 #3214] INFO – : - Operations::FeatureFlagsClient failures: 0
I, [2023-03-17T11:44:47.442204 #3214] INFO – : - ScimOauthAccessToken failures: 0
I, [2023-03-17T11:44:47.442334 #3214] INFO – : Total: 17 row(s) affected
I, [2023-03-17T11:44:47.442465 #3214] INFO – : Done!

If I check the same in the original host, I have no errors.

Any help is appreciated. Thanks very much.

Did you restore the gitlab.rb and gitlab-secrets.json to the /etc/gitlab directory on the new server? You can copy these from the old server.

I restored gitlab-secrets.json from the old server. I didn’t do it with gitlab.rb, as there are some differences (external_url for example, as we use DNS alias); but all other things are the same.

And the gitlab-secrets.json was restored prior to restoring Gitlab? Eg:

  1. Put gitlab-secrets.json in /etc/gitlab.
  2. Run gitlab-ctl reconfigure to get a basic empty install.
  3. Run gitlab restore process.

Thanks very much iwalker!. I didn’t try in that order, but you made me think that the first time I tried I didn’t reconfigure GitLab before restarting it (I did it later), and that probably leave the installation in a bad state.

I tried again with a fresh install, and it worked!

1 Like