application*.css redirect to login or 404 if logged in.
Created by: d3xt3r01
Hi peeps,
Something weird thing happened today after I updated to 8.6.0 after I had 8.5.8 for some time ..
The main login page asks for
assets/application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css
Which I see it just fine in the FS
-rw-r--r-- 1 git git 511670 Mar 22 17:12 ./public/assets/application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css
On the main sign_in page, when trying to access that css, it redirects to the sign_in page ! (huh ?) so the whole page looks funny. If logged in, the request for that css returns 404.
Here are the logs for the main page:
Started GET "/git/" for 127.0.0.1 at 2016-03-22 18:17:01 +0200
Processing by RootController#index as HTML
Completed 401 Unauthorized in 10ms (ActiveRecord: 0.7ms)
Started GET "/git/users/sign_in" for 127.0.0.1 at 2016-03-22 18:17:01 +0200
Processing by SessionsController#new as HTML
Completed 200 OK in 35ms (Views: 9.8ms | ActiveRecord: 1.5ms)
Started GET "/git/assets/application-4e86c00c55b95abdbf7f8f360e06d1293dead62b7f472432d5a4bb6cd0fc7e07.js" for 127.0.0.1 at 2016-03-22 18:17:01 +0200
Started GET "/git/assets/application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css" for 127.0.0.1 at 2016-03-22 18:17:01 +0200
Started GET "/git/assets/print-6939eb32d7a168d8fe54b11c4873498ba343870a6f7d2eb15147f7035a0154e2.css" for 127.0.0.1 at 2016-03-22 18:17:01 +0200
Processing by ProjectsController#show as HTML
Parameters: {"namespace_id"=>"assets", "id"=>"application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css"}
Completed 401 Unauthorized in 38ms (ActiveRecord: 1.1ms)
Started GET "/git/users/sign_in" for 127.0.0.1 at 2016-03-22 18:17:01 +0200
Processing by SessionsController#new as HTML
Completed 200 OK in 38ms (Views: 9.8ms | ActiveRecord: 1.2ms)
After logging in I get a 404 directly .. :
Started POST "/git/users/sign_in" for 127.0.0.1 at 2016-03-22 18:17:33 +0200
Processing by SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "user"=>{"login"=>"asandu", "password"=>"[FILTERED]", "remember_me"=>"0"}}
Redirected to https://d3xbucharest.go.ro/git/assets/application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css
Completed 302 Found in 133ms (ActiveRecord: 25.8ms)
Started GET "/git/assets/application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css" for 127.0.0.1 at 2016-03-22 18:17:33 +0200
Processing by ProjectsController#show as HTML
Parameters: {"namespace_id"=>"assets", "id"=>"application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css"}
Filter chain halted as :project rendered or redirected
Completed 404 Not Found in 25ms (Views: 0.4ms | ActiveRecord: 1.5ms)
I then try to get /git/ again:
Started GET "/git/" for 127.0.0.1 at 2016-03-22 18:18:16 +0200
Processing by RootController#index as HTML
Read fragment views/namespaces/1-20150314121842000000000/projects/14-20160120105955000000000/root/index/application_settings/1-20160102215327000000000/v2.2/86aa46c6c228c49e9392077e9782690a (0.1ms)
Read fragment views/namespaces/1-20150314121842000000000/projects/12-20160102222416000000000/root/index/application_settings/1-20160102215327000000000/v2.2/86aa46c6c228c49e9392077e9782690a (0.1ms)
Read fragment views/namespaces/1-20150314121842000000000/projects/13-20160102221013000000000/root/index/application_settings/1-20160102215327000000000/v2.2/86aa46c6c228c49e9392077e9782690a (0.1ms)
Read fragment views/namespaces/1-20150314121842000000000/projects/11-20160102215632000000000/root/index/application_settings/1-20160102215327000000000/v2.2/skipped/86aa46c6c228c49e9392077e9782690a (0.1ms)
Read fragment views/namespaces/1-20150314121842000000000/projects/9-20160102215648000000000/root/index/application_settings/1-20160102215327000000000/v2.2/skipped/86aa46c6c228c49e9392077e9782690a (0.1ms)
Read fragment views/namespaces/1-20150314121842000000000/projects/8-20151130101626000000000/root/index/application_settings/1-20160102215327000000000/v2.2/skipped/86aa46c6c228c49e9392077e9782690a (0.1ms)
Read fragment views/namespaces/1-20150314121842000000000/projects/7-20151109224604000000000/root/index/application_settings/1-20160102215327000000000/v2.2/86aa46c6c228c49e9392077e9782690a (0.1ms)
Read fragment views/namespaces/1-20150314121842000000000/projects/3-20150704122100000000000/root/index/application_settings/1-20160102215327000000000/v2.2/86aa46c6c228c49e9392077e9782690a (0.1ms)
Read fragment views/namespaces/1-20150314121842000000000/projects/4-20150314160841000000000/root/index/application_settings/1-20160102215327000000000/v2.2/86aa46c6c228c49e9392077e9782690a (0.1ms)
Read fragment views/namespaces/1-20150314121842000000000/projects/6-20150314142113000000000/root/index/application_settings/1-20160102215327000000000/v2.2/86aa46c6c228c49e9392077e9782690a (0.1ms)
Completed 200 OK in 59ms (Views: 30.0ms | ActiveRecord: 5.7ms)
Started GET "/git/assets/application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css" for 127.0.0.1 at 2016-03-22 18:18:17 +0200
Processing by ProjectsController#show as HTML
Parameters: {"namespace_id"=>"assets", "id"=>"application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css"}
Filter chain halted as :project rendered or redirected
Completed 404 Not Found in 21ms (Views: 0.4ms | ActiveRecord: 1.5ms)
This git instance is behind an apache reverse proxy but that isn't the issue.
A request on the git backend directly yells the same results.
# find / -iname "application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css"
/home/git/gitlab/public/assets/application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css
# mv /home/git/gitlab/public/assets/application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css ~git/application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css.backup
# sudo -u git -H bundle clean
# sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
I, [2016-03-22T21:27:05.229491 #28174] INFO -- : Writing /home/git/gitlab/public/assets/application-c0f2658d29adbe2eb8bff8f10d06476438d47a6f3d756ab00e20ed87803333e9.css
# /etc/init.d/gitlab restart
Shutting down GitLab Unicorn
Shutting down GitLab Sidekiq
Shutting down gitlab-workhorse
.
GitLab is not running.
Starting GitLab Unicorn
Starting GitLab Sidekiq
Starting gitlab-workhorse
The GitLab Unicorn web server with pid 29133 is running.
The GitLab Sidekiq job dispatcher with pid 29195 is running.
The gitlab-workhorse with pid 29180 is running.
GitLab and all its components are up and running.
No luck.