500 Error after update to 8.12.3 (MissingAttributeError)

360 views
Skip to first unread message

Urs Liska

unread,
Oct 2, 2016, 9:39:08 AM10/2/16
to GitLab
It seems it's a common problem that after updating Gitlab-omnibus
something doesn't work anymore.

This time, updating from (ca.) 8.10 to 8.12.3 causes "500" errors to
appear on any page request, so I can't use Gitlab at all.

gitlab-rake gitlab:env:info

System information
System: Ubuntu 14.04
Current User: git
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.6.6
Bundler Version:1.13.1
Rake Version: 10.5.0
Sidekiq Version:4.1.4

GitLab information
Version: 8.12.3
Revision: 467e1ca
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://git.openlilylib.org
HTTP Clone URL: https://git.openlilylib.org/some-group/some-project.git
SSH Clone URL: g...@git.openlilylib.org:some-group/some-project.git
Using LDAP: no
Using Omniauth: yes
Omniauth Providers: github

GitLab Shell
Version: 3.6.1
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git

##########

and

# tail -n 25 gitlab-rails/production.log
ActiveModel::MissingAttributeError (missing attribute: issues_enabled):
app/models/ability.rb:315:in `project_disabled_features_rules'
app/models/ability.rb:98:in `anonymous_project_abilities'
app/models/ability.rb:59:in `anonymous_abilities'
app/models/ability.rb:5:in `allowed'
app/controllers/application_controller.rb:126:in `can?'
app/controllers/projects/application_controller.rb:29:in `project'
lib/gitlab/middleware/go.rb:16:in `call'


Started GET
"/bfsc/das-trunkne-lied/blob/508f7aa37b34d5cd9a95eb852db95dd617b1d24e/printed-parts/BassoonII.ly"
for 164.132.161.34 at 2016-10-02 15:35:53 +0200
Processing by Projects::BlobController#show as */*
Parameters: {"namespace_id"=>"bfsc", "project_id"=>"das-trunkne-lied",
"id"=>"508f7aa37b34d5cd9a95eb852db95dd617b1d24e/printed-parts/BassoonII.ly"}
Completed 500 Internal Server Error in 42ms (ActiveRecord: 3.8ms)

ActiveModel::MissingAttributeError (missing attribute: issues_enabled):
app/models/ability.rb:315:in `project_disabled_features_rules'
app/models/ability.rb:98:in `anonymous_project_abilities'
app/models/ability.rb:59:in `anonymous_abilities'
app/models/ability.rb:5:in `allowed'
app/controllers/application_controller.rb:126:in `can?'
app/controllers/projects/application_controller.rb:29:in `project'
lib/gitlab/middleware/go.rb:16:in `call'

Any suggestion to further pin down or even fix the issue?

Thank you very much
Urs

Stan Hu

unread,
Oct 2, 2016, 9:43:20 AM10/2/16
to gitl...@googlegroups.com
This sounds like a missing migration. Have you tried running the following?

sudo gitlab-rake db:migrate:status
sudo gitlab-rake db:migrate

Urs

--
You received this message because you are subscribed to the Google Groups "GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gitlabhq/4cf876ac-5a6c-3747-7ef6-79cce34eed23%40ursliska.de.
For more options, visit https://groups.google.com/d/optout.

Urs Liska

unread,
Oct 2, 2016, 9:48:25 AM10/2/16
to gitl...@googlegroups.com

I had not done db:migrate before but db:migrate:status had exclusively reported "up" entries. Doing db:migrate now didn't change anything unfortunately.

also gitlab-rake gitlab:check

succeeded.

Any further ideas?

Urs

To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gitlabhq/CAMBWrQn5-Y4%3DpfZc4VQuUmqcj1b2-m-YAwVdO3EAdY9z_Zprow%40mail.gmail.com.

Urs Liska

unread,
Oct 2, 2016, 9:59:22 AM10/2/16
to gitl...@googlegroups.com

I noticed one more thing:

I'm running Gitlab on nginx, and my gitlab.rb contains an entry

nginx['enable'] = false

while gitlab.rb.save has this set to true.

Can this be the source of the issue?

Urs Liska

unread,
Oct 2, 2016, 10:29:24 AM10/2/16
to gitl...@googlegroups.com

Hmm, after doing an apt-get dist-upgrade (Gitlab was updated during "apt-get upgrade") I get the following error log:

# tail -n 25 /var/log/gitlab/gitlab-rails/production.log

Started GET "/" for 79.194.101.200 at 2016-10-02 16:28:06 +0200
Processing by RootController#index as HTML
Completed 500 Internal Server Error in 60ms (ActiveRecord: 9.0ms)

LoadError (cannot load such file -- active_record/associations/has_many_through_association):
  app/models/user.rb:830:in `projects_union'
  app/models/user.rb:418:in `authorized_projects'
  app/controllers/dashboard/projects_controller.rb:7:in `index'
  app/controllers/root_controller.rb:13:in `index'
  lib/gitlab/middleware/go.rb:16:in `call'


Started GET "/" for 79.194.101.200 at 2016-10-02 16:28:08 +0200
Processing by RootController#index as HTML
Completed 500 Internal Server Error in 52ms (ActiveRecord: 2.8ms)

LoadError (cannot load such file -- active_record/associations/has_many_through_association):
  app/models/user.rb:830:in `projects_union'
  app/models/user.rb:418:in `authorized_projects'
  app/controllers/dashboard/projects_controller.rb:7:in `index'
  app/controllers/root_controller.rb:13:in `index'
  lib/gitlab/middleware/go.rb:16:in `call'


Urs Liska

unread,
Oct 2, 2016, 11:31:35 AM10/2/16
to gitl...@googlegroups.com

One more item to debug: accessing repositories over ssh (git@... URLs) works fine, but direct Git access through https: URLs does *not*. So the Gitlab application does work obviously, only not HTTPS and thus the web interface

Urs Liska

unread,
Oct 12, 2016, 4:43:30 AM10/12/16
to gitl...@googlegroups.com

There have been some updates to the gitlab-ce package in the meantime, but they don't sort out my problem that my Gitlab instance isn't available. I'm desperately in need to get this running again and so would be glad about any advice or even guesses.

Urs

####################

gitlab-rake db:migrate
gitlab-rake db:migrate:status
gitlab-rake gitlab:check

all return "OK" (and have always been throughout this process).

But the end of my production.log is now different than in the beginning and is actually telling me to check config files (which it hadn't originally):

Started GET "/" for 188.98.168.133 at 2016-10-12 10:37:13 +0200


Processing by RootController#index as HTML

Completed 401 Unauthorized in 43ms (ActiveRecord: 6.9ms)
Started GET "/users/sign_in" for 188.98.168.133 at 2016-10-12 10:37:14 +0200
Processing by SessionsController#new as HTML
Completed 500 Internal Server Error in 46ms (ActiveRecord: 6.0ms)

LoadError (cannot load such file -- devise/parameter_sanitizer):
  app/controllers/application_controller.rb:233:in `configure_permitted_parameters'
  lib/gitlab/middleware/go.rb:16:in `call'


Invalid cron_jobs config key: 'historical_data_worker'. Check your gitlab config file.
Invalid cron_jobs config key: 'update_all_mirrors_worker'. Check your gitlab config file.
Invalid cron_jobs config key: 'update_all_remote_mirrors_worker'. Check your gitlab config file.
Invalid cron_jobs config key: 'ldap_sync_worker'. Check your gitlab config file.
Invalid cron_jobs config key: 'geo_bulk_notify_worker'. Check your gitlab config file.
** [Raven] Raven 2.0.2 configured not to capture errors.
** [Raven] Raven 2.0.2 configured not to capture errors.

########################################################

Aleksey Tsalolikhin

unread,
Oct 12, 2016, 11:06:20 AM10/12/16
to gitl...@googlegroups.com

Do you have a backup from before the upgrade, by any chance?  Are you able to go back to last known working configuration to restore service?



--
You received this message because you are subscribed to the Google Groups "GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages