Error 500 After Upgrade

i upgraded gitlab-ce with the command “apt-get upgrade gitlab-ce” on debian8.
Normally system is running. GIT service is working. Old web sessions are working. But after logout from current session, signin page is 500 error.

GitLab information
Version: 8.6.5
Revision: e63f120
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://gitlab.xxxxx.com
HTTP Clone URL: http://gitlab.xxxx.com/some-group/some-project.git
SSH Clone URL: git@gitlab.xxxx.com:some-group/some-project.git
Using LDAP: no
Using Omniauth: yes
Omniauth Providers: github

Active sesssions are working properly. After Logout or restart machine, gives 500 error!

and…

curl -X POST “https://gitlab.xxxxx.com/api/v3/session?login=john_smith&password=strongpassw0rd

this url is working

Please past the output of sudo gitlab-ctl tail as you perform the login/logout action. Also include the output of sudo gitlab-rake gitlab:check SANITIZE=true and your gitlab.rb file

tail log:

==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET “/users/sign_in” for 1.1.1.1 at 2016-04-12 14:25:53 +0300
Processing by SessionsController#new as HTML
(0.7ms) SELECT COUNT() FROM “users”
ActiveRecord::SchemaMigration Load (0.7ms) SELECT “schema_migrations”.
FROM “schema_migrations”
(0.2ms) BEGIN
(0.2ms) ROLLBACK
Completed 500 Internal Server Error in 149ms (ActiveRecord: 5.7ms)
** [Raven] Event not sent due to excluded environment: production

ActionController::UrlGenerationError (No route matches {:action=>“passthru”, :controller=>“omniauth_callbacks”, :provider=>:saml} missing required keys: [:provider]):
app/controllers/sessions_controller.rb:123:in auto_sign_in_with_provider' lib/gitlab/middleware/go.rb:16:in call’

==> /var/log/gitlab/gitlab-workhorse/current <==
2016-04-12_11:25:53.52323 2016/04/12 14:25:53 ErrorPage: serving predefined error page: 500
2016-04-12_11:25:53.52346 gitlab.xxxx.com @ - - [2016-04-12 14:25:53.333853487 +0300 EEST] “GET /users/sign_in HTTP/1.1” 500 2205 “” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36” 0.189490

==> /var/log/gitlab/nginx/gitlab_access.log <==
85.105.10.112 - - [12/Apr/2016:14:25:53 +0300] “GET /users/sign_in HTTP/1.1” 500 2205 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36”

==> /var/log/gitlab/gitlab-workhorse/current <==
2016-04-12_11:25:53.61666 2016/04/12 14:25:53 Send static file “/opt/gitlab/embedded/service/gitlab-rails/public/favicon.ico” ("") for GET “/favicon.ico”
2016-04-12_11:25:53.61683 gitlab.xxxxx.com @ - - [2016-04-12 14:25:53.61651773 +0300 EEST] “GET /favicon.ico HTTP/1.1” 200 5430 “http://gitlab.xxxx.com/users/sign_in” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36” 0.000245

==> /var/log/gitlab/nginx/gitlab_access.log <==
85.105.10.112 - - [12/Apr/2016:14:25:53 +0300] “GET /favicon.ico HTTP/1.1” 200 5430 “http://gitlab.xxxxx.com/users/sign_in” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36”

root@gitlab:/etc/gitlab# gitlab-rake gitlab:check SANITIZE=true

Checking GitLab Shell …

GitLab Shell version >= 2.6.12 ? … OK (2.6.12)
Repo base directory exists? … yes
Repo base directory is a symlink? … no
Repo base owned by git:git? … yes
Repo base access is drwxrws—? … yes
hooks directories in repos are links: …
4/5 … ok
2/6 … ok
2/8 … ok
2/9 … ok
2/10 … repository is empty
2/11 … ok
2/12 … repository is empty
2/13 … repository is empty
2/14 … repository is empty
6/16 … ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/var/opt/gitlab/git-data/repositories: OK
/var/opt/gitlab/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.24
Send ping to redis server: PONG
gitlab-shell self-check successful

Checking GitLab Shell … Finished

Checking Sidekiq …

Running? … yes
Number of Sidekiq processes … 1

Checking Sidekiq … Finished

Checking Reply by email …

Reply by email is disabled in config/gitlab.yml

Checking Reply by email … Finished

Checking LDAP …

LDAP is disabled in config/gitlab.yml

Checking LDAP … Finished

Checking GitLab …

Git configured with autocrlf=input? … yes
Database config exists? … yes
All migrations up? … yes
Database contains orphaned GroupMembers? … no
GitLab config exists? … yes
GitLab config outdated? … no
Log directory writable? … yes
Tmp directory writable? … yes
Uploads directory setup correctly? … 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: …
4/5 … yes
2/6 … yes
2/8 … yes
2/9 … yes
2/10 … yes
2/11 … yes
2/12 … yes
2/13 … yes
2/14 … yes
6/16 … yes
Redis version >= 2.8.0? … yes
Ruby version >= 2.1.0 ? … yes (2.1.8)
Your git bin path is “/opt/gitlab/embedded/bin/git”
Git version >= 2.7.3 ? … yes (2.7.4)
Active users: 9

Checking GitLab … Finished

external_url ‘http://gitlab.xxxxx.com


gitlab_rails[‘omniauth_enabled’] = true
gitlab_rails[‘omniauth_allow_single_sign_on’] = false
gitlab_rails[‘omniauth_auto_sign_in_with_provider’] = ‘saml’
gitlab_rails[‘omniauth_block_auto_created_users’] = true
gitlab_rails[‘omniauth_auto_link_ldap_user’] = false

gitlab_rails[‘smtp_enable’] = true
gitlab_rails[‘smtp_address’] = “mail.xxxx.com
gitlab_rails[‘smtp_port’] = 587
gitlab_rails[‘smtp_user_name’] = “abc@xxxxx.com
gitlab_rails[‘smtp_password’] = “12345678”
gitlab_rails[‘smtp_domain’] = “xxxx.com
gitlab_rails[‘smtp_authentication’] = “plain”
gitlab_rails[‘smtp_enable_starttls_auto’] = false
gitlab_rails[‘smtp_tls’] = false

Another check :

root@gitlab:/etc/gitlab# gitlab-rake gitlab:app:check
Checking GitLab …

Git configured with autocrlf=input? … yes
Database config exists? … yes
All migrations up? … y
yes
Database contains orphaned GroupMembers? … no
GitLab config exists? … yes
GitLab config outdated? … no
Log directory writable? … yes
Tmp directory writable? … yes
Uploads directory setup correctly? … 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: …
Emre Erdogan / itsp … yes
leapvox / itsp … yes
leapvox / ios … yes
leapvox / android … yes
leapvox / leaptab … yes
leapvox / itsp-man … yes
leapvox / panel … yes
leapvox / leaphub … yes
leapvox / leaphub-gui … yes
Batur Orkun / php-ami-react … yes
Redis version >= 2.8.0? … yes
Ruby version >= 2.1.0 ? … yes (2.1.8)
Your git bin path is “/opt/gitlab/embedded/bin/git”
Git version >= 2.7.3 ? … yes (2.7.4)
Active users: 9

Checking GitLab … Finished

i set : gitlab_rails[‘omniauth_enabled’] = false

gitlab is working now. This error was due to omniauth.

Thanks for Kelvin messages. it is a generic error but an unrelated reasons.
i searched on permission and cache subjects.