Fail to Sign into Grafana with GitLab after changing the domain name
Summary
(Summarize the bug encountered concisely)
Fail to login Grafana using Sign in With GitLab
after changing the domain name of the GitLab instance.
Steps to reproduce
(How one can reproduce the issue - this is very important)
- Change the
external_url
; - Run
gitlab-ctl reconfigure
; - Login Grafana using
Sign in With GitLab
;
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
(What actually happens)
It said
The redirect URI included is not valid.
Then I edit the authorize url to use the previous domain name of GitLab, it works.
What is the expected correct behavior?
(What you should see instead)
Redirect to page Authorize GitLab Grafana to use your account?
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) ``` # gitlab-rake gitlab:env:info System information System: Current User: git Using RVM: no Ruby Version: 2.6.6p146 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.9 Git Version: 2.26.2 Sidekiq Version:5.2.7 Go Version: unknown GitLab information Version: 13.0.6 Revision: 5aa982e01ea Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 11.7 URL: http://git.example.com HTTP Clone URL: http://git.example.com/some-group/some-project.git SSH Clone URL: git@git.example.com:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.2.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git ``` (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)# gitlab-rake gitlab:check SANITIZE=true Checking GitLab subtasks ... Checking GitLab Shell ... GitLab Shell: ... GitLab Shell version >= 13.2.0 ? ... OK (13.2.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful Checking GitLab Shell ... Finished Checking Gitaly ... Gitaly: ... default ... OK Checking Gitaly ... Finished Checking Sidekiq ... Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1 Checking Sidekiq ... Finished Checking Incoming Email ... Incoming Email: ... Checking Reply by email ... IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped Checking Reply by email ... Finished Checking Incoming Email ... Finished Checking LDAP ... LDAP: ... LDAP is disabled in config/gitlab.yml Checking LDAP ... Finished Checking GitLab App ... Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 5/1 ... yes 7/7 ... yes 5/8 ... yes 5/9 ... yes 6/10 ... yes 4/11 ... yes 7/12 ... yes 12/14 ... yes 12/15 ... yes 12/16 ... yes 5/17 ... yes 5/18 ... yes 22/20 ... yes 6/21 ... yes 6/22 ... yes 6/23 ... yes 6/24 ... yes 6/25 ... yes 6/26 ... yes 6/27 ... yes 6/28 ... yes 13/32 ... yes 5/33 ... yes 5/34 ... yes 5/35 ... yes 5/36 ... yes 7/37 ... yes 7/38 ... yes 7/39 ... yes 7/40 ... yes 5/41 ... yes 6/45 ... yes 13/46 ... yes 13/47 ... yes 7/48 ... yes 5/49 ... yes 11/50 ... yes 66/52 ... yes 13/53 ... yes 13/54 ... yes 13/55 ... yes 13/57 ... yes 13/58 ... yes 13/59 ... yes 13/60 ... yes 13/61 ... yes 13/62 ... yes 13/63 ... yes 13/64 ... yes 13/65 ... yes 13/66 ... yes 5/67 ... yes 4/68 ... yes 4/69 ... yes 7/70 ... yes 7/71 ... yes 7/72 ... yes 7/73 ... yes 7/74 ... yes 7/75 ... yes 7/76 ... yes 7/77 ... yes 7/78 ... yes 7/79 ... yes 6/80 ... yes 6/81 ... yes 6/82 ... yes 6/83 ... yes 6/84 ... yes 7/85 ... yes 13/86 ... yes 13/87 ... yes 13/88 ... yes 13/89 ... yes 4/90 ... yes 13/91 ... yes 13/93 ... yes 11/94 ... yes 22/95 ... yes 17/96 ... yes 2/98 ... yes 7/99 ... yes 36/100 ... yes 5/101 ... yes 5/102 ... yes 13/103 ... yes 4/104 ... yes 2/105 ... yes 21/107 ... yes 23/109 ... yes 23/111 ... yes 23/112 ... yes 24/113 ... yes 23/114 ... yes 24/115 ... yes 24/116 ... yes 24/117 ... yes 24/118 ... yes 24/119 ... yes 24/120 ... yes 24/121 ... yes 5/123 ... yes 5/124 ... yes 5/125 ... yes 11/126 ... yes 3/127 ... yes 23/128 ... yes 10/129 ... yes 39/130 ... yes 40/131 ... yes 40/132 ... yes 2/133 ... yes 41/134 ... yes 41/135 ... yes 41/136 ... yes 41/137 ... yes 2/138 ... yes 42/140 ... yes 64/141 ... yes 64/142 ... yes 64/143 ... yes 64/144 ... yes 64/145 ... yes 64/146 ... yes 30/147 ... yes 17/148 ... yes 17/149 ... yes 17/150 ... yes 17/151 ... yes 17/152 ... yes 17/153 ... yes 17/154 ... yes 17/155 ... yes 17/159 ... yes 22/160 ... yes 46/161 ... yes 36/162 ... yes 2/163 ... yes 3/164 ... yes 14/170 ... yes 15/172 ... yes 13/173 ... yes 5/174 ... yes 32/175 ... yes 32/176 ... yes 33/177 ... yes 19/178 ... yes 32/179 ... yes 24/180 ... yes 11/181 ... yes 11/182 ... yes 8/184 ... yes 32/185 ... yes 4/186 ... yes 22/187 ... yes 8/188 ... yes 8/189 ... yes 2/190 ... yes 47/191 ... yes 19/192 ... yes 24/193 ... yes 48/194 ... yes 11/195 ... yes 48/196 ... yes 48/197 ... yes 24/198 ... yes 19/199 ... yes 49/201 ... yes 48/202 ... yes 49/203 ... yes 23/204 ... yes 2/205 ... yes 24/207 ... yes 48/209 ... yes 24/210 ... yes 24/211 ... yes 24/212 ... yes 2/213 ... yes 19/215 ... yes 48/216 ... yes 24/217 ... yes 2/218 ... yes 48/219 ... yes 46/220 ... yes 52/221 ... yes 19/222 ... yes 19/224 ... yes 33/225 ... yes 19/226 ... yes 2/227 ... yes 52/229 ... yes 87/230 ... yes 52/231 ... yes 2/232 ... yes 13/233 ... yes 2/234 ... yes 46/235 ... yes 15/236 ... yes 64/238 ... yes 64/239 ... yes 24/241 ... yes 51/242 ... yes 64/243 ... yes 51/244 ... yes 22/245 ... yes 22/246 ... yes 4/247 ... yes 55/248 ... yes 56/249 ... yes 56/250 ... yes 56/251 ... yes 56/252 ... yes 58/253 ... yes 58/254 ... yes 58/255 ... yes 58/256 ... yes 58/258 ... yes 60/259 ... yes 60/260 ... yes 60/261 ... yes 60/262 ... yes 60/263 ... yes 60/264 ... yes 60/265 ... yes 60/266 ... yes 62/267 ... yes 62/268 ... yes 62/269 ... yes 62/270 ... yes 62/271 ... yes 62/272 ... yes 62/273 ... yes 62/274 ... yes 62/275 ... yes 62/276 ... yes 62/277 ... yes 59/278 ... yes 59/279 ... yes 59/280 ... yes 59/281 ... yes 59/282 ... yes 61/283 ... yes 61/284 ... yes 61/285 ... yes 61/286 ... yes 61/287 ... yes 61/288 ... yes 61/289 ... yes 61/290 ... yes 61/291 ... yes 61/292 ... yes 24/293 ... yes 24/294 ... yes 15/295 ... yes 51/296 ... yes 51/297 ... yes 51/298 ... yes 36/299 ... yes 19/300 ... yes 46/301 ... yes 19/302 ... yes 21/303 ... yes 59/304 ... yes 8/305 ... yes 33/306 ... yes 46/307 ... yes 24/308 ... yes 46/309 ... yes 65/310 ... yes 65/311 ... yes 7/312 ... yes 65/313 ... yes 68/314 ... yes 68/315 ... yes 69/316 ... yes 69/317 ... yes 70/318 ... yes 70/320 ... yes 48/321 ... yes 78/322 ... yes 11/323 ... yes 11/324 ... yes 47/325 ... yes 7/326 ... yes 33/327 ... yes 10/328 ... yes 11/329 ... yes 46/330 ... yes 22/331 ... yes 47/332 ... yes 11/333 ... yes 47/334 ... yes 46/335 ... yes 15/337 ... yes 13/338 ... yes 33/339 ... yes 8/340 ... yes 8/341 ... yes 2/342 ... yes 46/343 ... yes 73/344 ... yes 10/345 ... yes 14/347 ... yes 71/348 ... yes 11/349 ... yes 46/350 ... yes 78/351 ... yes 53/352 ... yes 7/353 ... yes 7/354 ... yes 78/355 ... yes 53/356 ... yes 7/358 ... yes 82/359 ... yes 46/360 ... yes 46/361 ... yes 73/362 ... yes 46/363 ... yes 73/365 ... yes 47/366 ... yes 73/367 ... yes 73/368 ... yes 73/369 ... yes 73/370 ... yes 47/371 ... yes 73/372 ... yes 73/373 ... yes 73/377 ... yes 11/378 ... yes 73/379 ... yes 46/381 ... yes 73/382 ... yes 2/383 ... yes 2/384 ... yes 11/385 ... yes 84/386 ... yes 84/387 ... yes 46/388 ... yes 8/389 ... yes 46/390 ... yes 84/391 ... yes 85/392 ... yes 87/393 ... yes 46/395 ... yes 46/396 ... yes 85/397 ... yes 85/398 ... yes 85/400 ... yes 85/401 ... yes 47/402 ... yes 85/403 ... yes 8/406 ... yes 73/407 ... yes 24/408 ... yes 8/409 ... yes 71/410 ... yes 24/411 ... yes 88/412 ... yes 14/414 ... yes 85/415 ... yes 90/416 ... yes 89/417 ... yes 46/419 ... yes 91/420 ... yes 90/421 ... yes 33/422 ... yes 91/423 ... yes 15/425 ... yes 88/426 ... yes 17/427 ... yes 97/430 ... yes 97/431 ... yes 97/432 ... yes 97/433 ... yes 97/434 ... yes 97/435 ... yes 97/436 ... yes 85/437 ... yes 88/438 ... yes 85/439 ... yes 98/440 ... yes 98/441 ... yes 90/442 ... yes 99/443 ... yes 100/444 ... yes 100/445 ... yes 100/446 ... yes 78/447 ... yes 101/448 ... yes 101/449 ... yes 101/450 ... yes 101/451 ... yes 11/452 ... yes 90/453 ... yes 23/454 ... yes 90/456 ... yes 103/457 ... yes 103/458 ... yes 104/461 ... yes 105/462 ... yes 85/463 ... yes 106/464 ... yes 85/465 ... yes 85/466 ... yes 11/467 ... yes 88/470 ... yes 85/471 ... yes 2/472 ... yes 10/473 ... yes 46/474 ... yes 85/476 ... yes 2/477 ... yes 2/478 ... yes 90/479 ... yes 108/480 ... yes 46/481 ... yes 46/482 ... yes 109/483 ... yes 46/484 ... yes 46/485 ... yes 8/486 ... yes 8/487 ... yes 15/489 ... yes 8/490 ... yes 2/491 ... yes 46/492 ... yes 46/493 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.6) Git version >= 2.22.0 ? ... yes (2.26.2) Git user has default SSH configuration? ... yes Active users: ... 21 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... no Try fixing it: Please migrate all projects to hashed storage as legacy storage is deprecated in 13.0 and support will be removed in 14.0. For more information see: doc/administration/repository_storage_types.md Checking GitLab App ... Finished Checking GitLab subtasks ... Finished
(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)