After Updating to 12.5.5 -> 500 Error - Gitlab-ctl tail : error -> "No site key specified."

Hi all, I have a serious error with my local gitlab setup. I was updating the gitlab-ce and my ssh connection was lost… after reconnecting I have tried upgrading again. All services run fine but unable to open the ‘Web’ page. I get 500 error. I have tailed gitllab-ctl and found it is the following error.

Completed 500 Internal Server Error in 1666ms (ActiveRecord: 46.4ms | Elasticsearch: 0.0ms)
  
ActionView::Template::Error (No site key specified.):
    36:       = render_if_exists 'devise/shared/email_opted_in', f: f
    37:       %div
    38:       - if show_recaptcha_sign_up?
    39:         = recaptcha_tags
    40:       .submit-container
    41:         = f.submit _("Register"), class: "btn-register btn", data: { qa_selector: 'new_user_register_button' }

Did a clean Install…

Still the problem persists…

removed all token from dbconsole…

Still the problem persists …

Hi,

which distribution are you using? Also, packages or container setup?

Since SSH was lost, it may be case that either the package installation is incomplete, or database migrations are pending. Use the following command carefully to analyse the status.

gitlab-rake db:migrate:status

Cheers,
Michael

Hi all,

I am exactly in the same case.
Same error and same Gitlab version (even with 12.5.4 was giving me the same issue).
I am using RedHat 6.10 and all packages are up-to-date.

gitlab-rake db:migrate:status gives me lots of lines, here are the last ones :
up 20191112232338 Ensure no empty milestone titles
up 20191114173508 Add resolved attributes to vulnerabilities
up 20191114173602 Add foreign key on resolved by id to vulnerabilities
up 20191114173624 Set resolved state on vulnerabilities
up 20191115091425 Create vulnerability issue links
up 20191120084627 Add encrypted fields to application settings
up 20191120115530 Encrypt plaintext attributes on application settings
up 20191122135327 Remove plaintext columns from application settings

Thankyou for your response, The command lists the following output. No Success though :frowning:

   .......
   up     20190606175050  Encrypt feature flags clients tokens
   up     20190607085356  Add source to pages domains
   up     20190607145325  Add pages domains ssl renew index
   up     20190607190856  Add index to users public emails
   up     20190607205656  Add wiki columns to index status
   up     20190610142825  Add index to members invite email
   up     20190611090827  Add time tracking limit to hours to application settings
   up     20190611100201  Add geo container repository updated events table
   up     20190611100202  Add index to geo event log
   up     20190611161641  Add target project id to merge trains
   up     20190611161642  Add index to events and audit events created at author
   up     20190612111201  Add geo container repository counters
   up     20190612111404  Add geo container sync capacity
   up     20190613030606  Enable hashed storage by default
   up     20190613044655  Add username to deploy tokens
   up     20190613073003  Create project aliases
   up     20190613231640  Migrate managed clusters with no token to unmanaged
   up     20190617123615  Add grafana to settings
   up     20190618171120  Update geo nodes primary
   up     20190619175843  Remove import columns from projects
   up     20190620105427  Change null private profile to false
   up     20190620112608  Enqueue reset merge status second run
   up     20190621022810  Add last ci minutes usage notification level to namespaces
   up     20190621151636  Add merge request rebase jid
   up     20190623212503  Add cluster id to deployments
   up     20190624123615  Add grafana url to settings
   up     20190625115224  Add description to services
   up     20190625184066  Remove sentry from application settings
   up     20190626175626  Add group creation level to namespaces
   up     20190627051902  Add cluster id index fk to deployments
   up     20190627100221  Add mr productivity metrics
   up     20190627122264  Add foreign keys for container repository
   up     20190628145246  Add strategies to operations feature flag scopes
   up     20190628185000  Add released at to releases table
   up     20190628185004  Backfill and add not null constraint to released at column on releases table
   up     20190628191740  Schedule fixing names of user namespaces
   up     20190702173936  Populate remaining merge request assignees
   up     20190703043358  Add commit id to draft notes
   up     20190703130053  Remove gitaly feature flags
   up     20190703171157  Add sourcing epic dates
   up     20190703171555  Add sourcing epic dates fks
   up     20190703185326  Fix wrong pages access level
   up     20190709204413  Add rule type to approval project rules
   up     20190709220014  Import common metrics y axis
   up     20190709220143  Add index to issues relative position
   up     20190710151229  Add index to approval project rules rule type
   up     20190711124721  Create job variables
   up     20190711200053  Change deploy tokens token not null
   up     20190711200508  Add token encrypted to deploy tokens
   up     20190711201818  Encrypt deploy tokens tokens
   up     20190712040400  Add environment id to clusters kubernetes namespaces
   up     20190712040412  Index clusters kubernetes namespaces on environment
   up     20190712064021  Add namespace per environment flag to clusters
   up     20190715042813  Add issue id to versions
   up     20190715043944  Remove sha index from versions
   up     20190715043954  Set issue id for all versions
   up     20190715044501  Add unique issue id sha index to versions
   up     20190715114644  Drop project features pages access level default
   up     20190715140740  Add event type to design management designs versions
   up     20190715142138  Add raw blob request limit to application settings
   up     20190715173819  Add object storage flag to geo node
   up     20190715193142  Migrate discussion id on promoted epics
   up     20190715215532  Add project emails disabled
   up     20190715215549  Add group emails disabled
   up     20190716144222  Create analytics cycle analytics project stages
   up     20190719122333  Add login recaptcha protection enabled to application settings
   up     20190719174505  Add index to deploy tokens token encrypted
   up     20190722104947  Add static object token to users
   up     20190722132830  Add static objects external storage columns to application settings
   up     20190722144316  Create milestone releases table
   up     20190723105753  Add index on identities lower extern uid and provider
   up     20190723153247  Create allowed email domains for groups
   up     20190724112147  Add column for self monitoring project
   up     20190725012225  Change outbound local requests whitelist default
   up     20190725080128  Set not null on users private profile
   up     20190725183432  Add index to index on static object token
   up     20190726101050  Rename allow local requests from hooks and services application setting
   up     20190726101133  Add allow local requests from system hooks to application settings
   up     20190729062536  Create analytics cycle analytics group stages
   up     20190729090456  Add index on environments with state
   up     20190729180447  Add merge requests require code owner approval to protected branches
   up     20190731084415  Add build need
   up     20190801060809  Delete kubernetes services
   up     20190801114109  Cleanup allow local requests from hooks and services application setting rename
   up     20190801142441  Add throttle protected path columns
   up     20190801193427  Rename application settings snowplow collector uri column
   up     20190802012622  Reorder issues project id relative position index
   up     20190802091750  Cleanup application settings snowplow collector uri rename
   up     20190802195602  Add timestamps columns to geo nodes
   up     20190802235445  Add index on id and type and public to keys
   up     20190805140353  Remove rendundant index from releases
   up     20190806071559  Remove epic issues default relative position
   up     20190807023052  Design issue id nullable
   up     20190808152507  Add projects sorting field to user preferences
   up     20190809072552  Set self monitoring project alerting token
   up     20190812070645  Migrate private profile nulls
   up     20190814205640  Import common metrics line charts
   up     20190815093936  Add index notes on project id and id and system false
   up     20190815093949  Remove index notes on noteable type
   up     20190816151221  Add active jobs limit to plans
   up     20190819131155  Add cluster status index to deployments
   up     20190819231552  Update knative prometheus query for invocation count
   up     20190820163320  Add first last name to user
   up     20190821040941  Create cluster providers aws
   up     20190822175441  Rename epics state to state
   up     20190822181528  Create list user preferences
   up     20190822185441  Cleanup epics state id rename
   up     20190823055948  Change clusters namespace per environment default
   up     20190826090628  Remove redundant deployments index
   up     20190826100605  Add group column to events
   up     20190827102026  Migrate code owner approval status to protected branches in batches
   up     20190827222124  Add sourcegraph configuration to application settings
   up     20190828083843  Add index to ci job artifacts on project id for security reports
   up     20190828110802  Add not null constraints to prometheus metrics y label and unit
   up     20190828170945  Create package metadatum
   up     20190828172831  Create package tag
   up     20190829131130  Create external pull requests
   up     20190830075508  Add external pull request id to ci pipelines
   up     20190830080123  Add index to ci pipelines external pull request
   up     20190830080626  Add foreign key to ci pipelines external pull request
   up     20190830140240  Add duplicated to to issue
   up     20190901174200  Add max issue count to list
   up     20190902131045  Replace indexes for counting active users
   up     20190902152329  Add index for ci builds metrics
   up     20190902160015  Remove support bot column from users
   up     20190903150358  Create analytics repository files table
   up     20190903150435  Create analytics repository file edits table
   up     20190904173203  Add index on users unconfirmed email
   up     20190904205212  Remove id column from intermediate release milestones
   up     20190905022045  Add issues prometheus alert event join table
   up     20190905074652  Index timestamp columns for issue metrics
   up     20190905091812  Schedule project any approval rule migration
   up     20190905091831  Schedule merge request any approval rule migration
   up     20190905140605  Add cloud run to clusters providers gcp
   up     20190905223800  Add interruptible to builds metadata
   up     20190905223900  Add concurrent index to builds metadata
   up     20190906104555  Create alerts service data
   up     20190907184714  Add show whitespace in diffs to user preferences
   up     20190909045845  Create project pages metadata
   up     20190909141517  Update cs vulnerability confidence column
   up     20190910000130  Add index on application id on oauth access tokens
   up     20190910103144  Replace events index on group id with partial index
   up     20190910114843  Exclude nulls from index on namespaces type
   up     20190910125852  Create analytics language trend repository languages
   up     20190910211526  Create packages conan file metadata
   up     20190910212256  Add any approver rule unique indexes
   up     20190911115056  Add projects max pages size
   up     20190911115109  Add namespaces max pages size
   up     20190911115207  Add projects max artifacts size
   up     20190911115222  Add namespaces max artifacts size
   up     20190911251732  Sync issuables state
   up     20190912061145  Add index to members on expires at
   up     20190912223232  Add role to users
   up     20190913174707  Add spdx id to software licenses
   up     20190913175827  Add index to software licenses on spdx
   up     20190914223900  Modify concurrent index to builds metadata
   up     20190917173107  Backfill software licenses spdx identifiers
   up     20190918025618  Add user and timestamps to design management versions
   up     20190918102042  Create grafana integrations
   up     20190918104212  Add merge request metrics merged at index
   up     20190918104222  Schedule productivity analytics backfill
   up     20190918104731  Add cleanup status to cluster
   up     20190918121135  Add cleanup status reason to cluster
   up     20190919040324  Add successfull pages deploy partial index on ci builds
   up     20190919091300  Create evidences
   up     20190919104119  Index timestamp columns for merge requests creation date
   up     20190919162036  Add index to clusters providers gcp on cloud run
   up     20190919183411  Add index packages on name trigram to packages packages
   up     20190920194925  Backfill releases table updated at and add not null constraints to timestamps
   up     20190924124627  Add pull mirror branch prefix to projects
   up     20190925055714  Default request access groups
   up     20190925055902  Default request access projects
   up     20190926041216  Add user indexes to design management versions
   up     20190926180443  Schedule epic issues after epics move
   up     20190927055500  Create description versions
   up     20190927055540  Add index to sytem note metadata description version
   up     20190927074328  Add index on snippet content
   up     20190929180751  Create vulnerabilities
   up     20190929180813  Add reference from vulnerability occurrences to occurrences
   up     20190929180827  Add foreign keys and indexes to vulnerabilities
   up     20190930025655  Add incident management throttle columns to application setting
   up     20190930063627  Add management project id to clusters
   up     20190930082942  Add new release to notification settings
   up     20190930153535  Create zoom meetings
   up     20191001040549  Add management project id index fk to clusters
   up     20191002031332  Schedule pages metadata migration
   up     20191002123516  Create clusters applications elastic stack
   up     20191003015155  Add self managed prometheus alerts
   up     20191003060227  Add push event hooks limit to application settings
   up     20191003064615  Create aws roles
   up     20191003161031  Add mark for deletion to projects
   up     20191003161032  Add mark for deletion indexes to projects
   up     20191003195218  Add pendo enabled to application settings
   up     20191003195620  Add pendo url to application settings
   up     20191004080818  Add productivity analytics start date
   up     20191004081520  Fill productivity analytics start date
   up     20191004133612  Create analytics repository file commits
   up     20191007163701  Populate remaining any approver rules for merge requests
   up     20191007163736  Populate remaining any approver rules for projects
   up     20191008013056  Add push event activities limit to application settings
   up     20191008142331  Add ref count to push event payloads
   up     20191008143850  Fix any approver rule for projects
   up     20191008180203  Add issuable state id indexes
   up     20191008200204  Add state id default value
   up     20191009100244  Add geo design repository counters
   up     20191009110124  Add has exposed artifacts to ci builds metadata
   up     20191009110757  Add index to ci builds metadata has exposed artifacts
   up     20191009222222  Add custom http clone url root to application settings
   up     20191010174846  Add snowplow iglu registry url to application settings
   up     20191011084019  Add project deletion adjourned period to application settings
   up     20191013100213  Add squash commit sha to merge requests
   up     20191014025629  Rename design management version user to author
   up     20191014030134  Cleanup design management version user to author rename
   up     20191014030730  Add author index to design management versions
   up     20191014084150  Add index on snippets project id and visibility level
   up     20191014132931  Remove index on snippets project
   up     20191016072826  Replace ci trigger requests index
   up     20191016133352  Create ci subscriptions projects
   up     20191016220135  Add join table for self managed prometheus alert issues
   up     20191017001326  Create users security dashboard projects
   up     20191017045817  Schedule fix gitlab com pages access level
   up     20191017094449  Add remove source branch after merge to projects
   up     20191017134513  Add deployment merge requests
   up     20191017180026  Drop ci build trace sections
   up     20191017191341  Create clusters applications crossplane
   up     20191021101942  Remove empty github service templates
   up     20191022113635  Nullify feature flag plaintext tokens
   up     20191023132005  Add merge requests index on target project and branch
   up     20191023152913  Add default and free plans
   up     20191024134020  Add index to zoom meetings
   up     20191026041447  Change default value of throttle protected paths
   up     20191026124116  Set application settings default project and snippet visibility
   up     20191028162543  Add setup for company to user preferences
   up     20191028184740  Rename snowplow site id to snowplow app
   up     20191029095537  Cleanup application settings snowplow site id rename
   up     20191029125305  Create packages conan metadata
   up     20191029191901  Add enabled to grafana integrations
   up     20191030135044  Create plan limits
   up     20191030152934  Move limits from plans
   up     20191030193050  Remove pendo from application settings
   up     20191031112603  Remove limits from plans
   up     20191101092917  Replace index on metrics merged at
   up     20191103202505  Add eks credentials to application settings
   up     20191104205020  Add license details to application settings
   up     20191105094558  Add report type to vulnerabilities
   up     20191105094625  Set report type for vulnerabilities
   up     20191105140942  Add indices to abuse reports
   up     20191105193652  Add index on deployments updated at
   up     20191107173446  Add sourcegraph admin and user preferences
   up     20191107220314  Add index to projects on marked for deletion
   up     20191111115229  Add group id to import export uploads
   up     20191111115431  Add group fk to import export uploads
   up     20191111121500  Default ci config path
   up     20191112115247  Add cached markdown version to vulnerabilities
   up     20191112115317  Change vulnerabilities title html to nullable
   up     20191112214305  Add indexes for projects api default params
   up     20191112221821  Add indexes for projects api default params authenticated
   up     20191112232338  Ensure no empty milestone titles
   up     20191114173508  Add resolved attributes to vulnerabilities
   up     20191114173602  Add foreign key on resolved by id to vulnerabilities
   up     20191114173624  Set resolved state on vulnerabilities
   up     20191115091425  Create vulnerability issue links
   up     20191120084627  Add encrypted fields to application settings
   up     20191120115530  Encrypt plaintext attributes on application settings
   up     20191122135327  Remove plaintext columns from application settings

I have even upgrade the Distribution Ubuntu 16 to Ubuntu 18 & made a fresh Install… Still the same problem…

Have you any Luck?

I’m not sure if you’re hitting a bug here, a similar issue reads like this: https://gitlab.com/gitlab-org/gitlab/issues/118831 I’ve linked this topic there.

For information (in case it helps), from my v11 snapshot I did again the upgrade :

  • Upgrade from v11.10.4 to 11.11.8 (last availbale version in v11) = OK works greats
  • Then, upgrade from 11.11.8 to v12.4.6 (in case v12.5 was bugged) and I still have the error 500 issue on the web app… :-s

Started GET “/users/sign_in” for 1XX.XX.XX.XX at 2019-12-18 16:49:14 +0100
Processing by SessionsController#new as HTML
Completed 500 Internal Server Error in 482ms (ActiveRecord: 26.2ms | Elasticsearch: 0.0ms)

ActionView::Template::Error (No site key specified.):
36: = render_if_exists ‘devise/shared/email_opted_in’, f: f
37: %div
38: - if show_recaptcha_sign_up?
39: = recaptcha_tags
40: .submit-container
41: = f.submit _(“Register”), class: “btn-register btn”, data: { qa_selector: ‘new_user_register_button’ }

Is there a way to add ‘recaptcha’ keys to the database? I think, that will solve the issue.

Here is the Issue. Mr.Alex has added invisible Recaptcha.

I started again from my v11.10 GITLAB snapshot.
I logged as admin and disabled CAPTCHA in Admin/Reporting/Spam and Anti-bot Protection.
I then upgraded from v11.10 to v11.11.8 and to v12.5.5 and the issue is fixed !
I then re-enabled CAPTCHA and it works.

Thanks @drekolord for the hint.

1 Like

Thanks @foubert. Will try and Update here Soon.

No Luck for me. 503 error now. think i have to reset db too!

Uninstalled with the following commands and it Worked.

sudo gitlab-ctl uninstall
sudo gitlab-ctl cleanse
sudo dpkg -P gitlab-ce

Hi, i wanted to add two alternative ways of fixing it:

Alternative 1

if you have access to the instance, ssh and run gitlab-ctl console and disable recaptcha to regain access to the ui and add the missing keys via the interface:

# Check if recaptha is indeed enable
ApplicationSettings.recaptcha_enabled

# temporarily disable recaptcha
ApplicationSetting.first.update!(recaptcha_enabled: false)

Alternative 2

if you have a personal access token, you can follow the api guide
https://docs.gitlab.com/ee/api/settings.html

in both scenarios you can update recaptcha_private_key and recaptcha_site_key directly via console or API.

The settings for recaptcha via the UI can be found at:
Settings -> Reporting-> Spam and Anti-bot Protection

hope it helps

1 Like

I don’t understand how the fix from kennuzzo is supposed to work. I find that on gitlab-ce-12.7.5 (on Debian Buster) the gitlab-ctl console command does not exist - but gitlab-rails console does.

If I run that command though, none of the ApplicationSetting(s) commands work in the console (which I believe has loaded - I have a prompt like irb(main):001:0> ) and autocomplete does not find them either.

Hunting through search engines for recaptcha_enabled has not led anywhere - can someone ELI5 for me?

Edit: The Snippets page suggests that the syntax should be:

# Display the current setting
Gitlab::CurrentSettings.recaptcha_enabled

This returns

=> true

That’s a start. Then the recaptcha_site_key and recaptcha_private_key are both nil - I’ve never configured recaptcha, so that’s expected too.

If I then run:

ApplicationSetting.first.update!(recaptcha_enabled: false)

it returns:

=> true

But whether or not I run gitlab-ctl reconfigure, I still get the 500 error and CurrentSettings.recaptcha_enabled returns => true.

Edit 2. OK, with sufficient fiddling I think I have it. Load the console with gitlab-rails console. Then:

settings = ApplicationSetting.current
settings.update(recaptcha_enabled: false)

Refresh your login page and it should work.