Error 404 when accessing project files and commits after upgrade from 4.2 to 5.0
Created by: posiczko
Hello,
I'm having problems accessing the project files and commits after upgrade from 4.2 to 5.0 on Centos. I get 404 error whenever I try to access project files and commits.
I followed the upgrade notes from the wiki. The gitlab installation is located at root directory of the server (no relative root url). I'm running on port 443 with https set to true:
10:39:19 git@anywhere [gitlab] (5-0-stable *%)> bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System: CentOS 6.4
Current User: git
Using RVM: no
Ruby Version: 1.9.3p385
Gem Version: 1.8.23
Bundler Version:1.3.4
Rake Version: 10.0.3
GitLab information
Version: 5.0.0
Revision: 4606380
Directory: /home/git/gitlabhq.git
DB Adapter: mysql2
URL: https://gl.tetrapyloctomy.org/
HTTP Clone URL: https://just.me.at.home//some-project.git
SSH Clone URL: [email protected]:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.2.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/local/bin/git
Initially I thought the issue was related to charlock_holmes
as in #3348 (closed) and #3439 (closed), so I cleaned up the cache and vendor bundle followed by a healthy
bundle install --without development test postgres --deployment
.
Alas, no fat lady, and no cigar. Accessing my-project
files results in the following 404 error being logged without any exceptions being thrown or caught:
Started GET "/my-project/tree/master" for 1.2.3.4 at 2013-03-29 10:46:22 -0600
Processing by TreeController#show as HTML
Parameters: {"project_id"=>"my-project", "id"=>"master"}
Rendered errors/not_found.html.haml within layouts/errors (1.3ms)
Rendered layouts/_head.html.haml (2.3ms)
Rendered layouts/_search.html.haml (26.7ms)
Rendered layouts/_init_auto_complete.html.haml (7.4ms)
Rendered layouts/_head_panel.html.haml (39.3ms)
Rendered layouts/_flash.html.haml (0.2ms)
Filter chain halted as :assign_ref_vars rendered or redirected
Completed 404 Not Found in 85ms (Views: 49.3ms | ActiveRecord: 1.3ms)
Started GET "/assets/logo-white.png" for 1.2.3.4 at 2013-03-29 10:46:23 -0600
Served asset /logo-white.png - 304 Not Modified (0ms)
Started GET "/assets/icon-search.png" for 1.2.3.4 at 2013-03-29 10:46:23 -0600
Served asset /icon-search.png - 304 Not Modified (0ms)
I should also mention that running gitlab:check
does not present anything out of ordinary othar than complaint that init scripts are out of date which is ok since I run on Centos, and that the git-shell is of the wrong version (it wants 1.1.0 but the update provides 1.2.0 - I've since modified lib/tasks/gitlab/check.rake
to remove this bug as in #3404 (closed)):
10:48:36 git@anywhere [gitlab] (5-0-stable *%)> bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...
Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
Checking Gitlab Shell ...
GitLab Shell version? ... OK (1.2.0)
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
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ...
User Name / some-project ... ok
User Name / some-other-project ... ok
my-project ... ok
Checking Gitlab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Checking Sidekiq ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... no
Try fixing it:
Redownload the init script
For more information see:
doc/install/installation.md in section "Install Init Script"
Please fix the error above and rerun the checks.
Projects have satellites? ...
User Name / some-project ... yes
User Name / some-other-project ... yes
my-project ... yes
Checking GitLab ... Finished
I should also mention that clicking on a commit in the commit history results in error 500 with the following being logged:
Started GET "/assets/logo-white.png" for 1.2.3.4 at 2013-03-29 10:58:00 -0600
Served asset /logo-white.png - 304 Not Modified (0ms)
Started GET "/assets/icon-search.png" for 1.2.3.4 at 2013-03-29 10:58:01 -0600
Served asset /icon-search.png - 304 Not Modified (0ms)
Started GET "/my-project/commit/06367c4bc9317865031760c50a13c6a4e8b5e2c7" for 1.2.3.4 at 2013-03-29 10:58:02 -0600
Processing by CommitController#show as HTML
Parameters: {"project_id"=>"my-project", "id"=>"06367c4bc9317865031760c50a13c6a4e8b5e2c7"}
Rendered commits/_commit_box.html.haml (13.8ms)
Rendered commit/show.html.haml within layouts/project_resource (177.7ms)
Completed 500 Internal Server Error in 254ms
ActionView::Template::Error (undefined method `[]' for nil:NilClass):
2:
3: %p.pull-right.cgray
4: This commit has
5: %span.cgreen #{@commit.stats.additions} additions
6: and
7: %span.cred #{@commit.stats.deletions} deletions
8:
app/models/commit.rb:13:in `stats'
app/views/commit/show.html.haml:5:in `_app_views_commit_show_html_haml__560431685491809599_60015060'
Any ideas? Looks like a misconfiguration issue somewhere, but there are no references to /home/gitlab/gitlab
any more other than the documentation:
10:59:42 git@anywhere [gitlab] (5-0-stable *%)> find-grep /home/gitlab/gitlab
./doc/raketasks/maintenance.md:26:Directory: /home/gitlab/gitlab
Thank you!
Pawel