Gitlab Error 500 after refresh while browsing projects

dpkg-query -W gitlab gitlab 7.3.2-omnibus-1

We have gitlab 6.9.2 running on Ubuntu 14.04.1 LTS. Following the instructions found here https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md

everything seemed fine for the upgrade to 7.3.2, however we get a 500 error when trying to view the project.

Every time I try to access one of the pages I see this error on startup sudo gitlab-ctl tail postgresql

ERROR:  relation "users_star_projects" does not exist at character 323
STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a 
LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"users_star_projects"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

      

Also i see this error mentioned in /var/log/gitlab/gitlab-rails/production.log:

Completed 500 Internal Server Error in 42ms

ActiveRecord::StatementInvalid (PG::Error: ERROR:  relation "users_star_projects" does not exist
LINE 5:                WHERE a.attrelid = '"users_star_projects"'::r...
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"users_star_projects"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum
):
  app/models/user.rb:522:in `starred?'
  app/controllers/projects_controller.rb:63:in `show'

      

If there is a way, can I fix or add the missing relation?

+3


source to share


1 answer


I posted a question on gitlab that helped me solve the problem. https://gitlab.com/gitlab-org/omnibus-gitlab/issues/277

In case anyone else has this problem or is facing it, I am posting a quick analysis of how I fixed it. In my case, I was missing some relationship with the DB. Therefore, you can check this by doing sudo gitlab-rake db:migrate:status

If any of them say they will not be applied.



You can try to fix this by doing sudo gitlab-ctl reconfigure

in my case it did not fix the problem. I had to manually communicate this in order to migrate the DB using the following command: sudo gitlab-rake db:migrate

After that, when I ran it sudo gitlab-rake db:migrate:status

, everything was fine and I have over 500 errors while using the website.

+11


source







All Articles