Gitlab fails to load some assets

Problems with packages? Post here, using [tags] of the package name.

Gitlab fails to load some assets

Postby LaszloLeonard » Tue Feb 23, 2016 5:36 pm

Hello!

I've recently built and installed latest version (8.5.0-1) of Gitlab from the AUR repository for armv7h architecture. I configured it using this tutorial:

Gitlab wiki

The program seems to work, but I encountered a problem. When I access the web interface, the unicorn server fails to send SOME of the assets, so the page looks as you can see on the following image:

Image

It takes 60 seconds for the browser to load the page. This matches the timeout time of the unicorn web server. During this 60 seconds the server's processor is heavily loaded.

The error I see in my browser is:

$this->bbcode_second_pass_code('', 'Failed to load resource: net::ERR_EMPTY_RESPONSE
http://localhost:8080/assets/application-cd4e557b2d6d44b68c2445862d96def8.js
http://localhost:8080/assets/application-9880f992b4a3c109f2a12a3f4553d0fe.css')

I checked if the missing assets exist on the file system. The files are in the assets directory together with other assets the web server can deliver and they have the same access rules!

$this->bbcode_second_pass_code('', '
ls -la /usr/share/webapps/gitlab/public/assets/application-*
-rw-r--r-- 1 gitlab gitlab 1472502 Feb 22 11:51 /usr/share/webapps/gitlab/public/assets/application-140004440b5557ee3118431b2d8c76cb.js
-rw-r--r-- 1 gitlab gitlab 422810 Feb 22 11:51 /usr/share/webapps/gitlab/public/assets/application-140004440b5557ee3118431b2d8c76cb.js.gz
-rw-r--r-- 1 gitlab gitlab 491499 Feb 22 11:51 /usr/share/webapps/gitlab/public/assets/application-2c778293d25fd107e6a97ac0cdf49cd0.css
-rw-r--r-- 1 gitlab gitlab 74059 Feb 22 11:51 /usr/share/webapps/gitlab/public/assets/application-2c778293d25fd107e6a97ac0cdf49cd0.css.gz
-rw-r--r-- 1 gitlab gitlab 502116 Feb 23 11:08 /usr/share/webapps/gitlab/public/assets/application-9880f992b4a3c109f2a12a3f4553d0fe.css
-rw-r--r-- 1 gitlab gitlab 77683 Feb 23 11:08 /usr/share/webapps/gitlab/public/assets/application-9880f992b4a3c109f2a12a3f4553d0fe.css.gz
-rw-r--r-- 1 gitlab gitlab 1345491 Feb 23 11:08 /usr/share/webapps/gitlab/public/assets/application-cd4e557b2d6d44b68c2445862d96def8.js
-rw-r--r-- 1 gitlab gitlab 392106 Feb 23 11:08 /usr/share/webapps/gitlab/public/assets/application-cd4e557b2d6d44b68c2445862d96def8.js.gz
')

The error log of the unicorn server contains the following logs:

$this->bbcode_second_pass_code('', '
....
I, [2016-02-23T11:17:00.068140 #1102] INFO -- : listening on addr=/run/gitlab/gitlab.socket fd=10
I, [2016-02-23T11:17:00.070188 #1102] INFO -- : listening on addr=localhost:8080 fd=11
I, [2016-02-23T11:17:00.102664 #1114] INFO -- : worker=0 ready
I, [2016-02-23T11:17:00.130051 #1117] INFO -- : worker=1 ready
I, [2016-02-23T11:17:00.151900 #1102] INFO -- : master process ready
I, [2016-02-23T11:17:00.156568 #1122] INFO -- : worker=2 ready
E, [2016-02-23T11:18:22.230164 #1102] ERROR -- : worker=0 PID:1114 timeout (61s > 60s), killing
E, [2016-02-23T11:18:22.230675 #1102] ERROR -- : worker=2 PID:1122 timeout (61s > 60s), killing
E, [2016-02-23T11:18:22.292609 #1102] ERROR -- : reaped #<Process::Status: pid 1114 SIGKILL (signal 9)> worker=0
E, [2016-02-23T11:18:22.293171 #1102] ERROR -- : worker=2 PID:1122 timeout (61s > 60s), killing
E, [2016-02-23T11:18:22.352367 #1102] ERROR -- : reaped #<Process::Status: pid 1122 SIGKILL (signal 9)> worker=2
I, [2016-02-23T11:18:22.358288 #1398] INFO -- : worker=0 ready
I, [2016-02-23T11:18:22.383225 #1401] INFO -- : worker=2 ready
E, [2016-02-23T11:19:23.436692 #1102] ERROR -- : worker=1 PID:1117 timeout (61s > 60s), killing
E, [2016-02-23T11:19:23.437210 #1102] ERROR -- : worker=0 PID:1398 timeout (61s > 60s), killing
E, [2016-02-23T11:19:23.492788 #1102] ERROR -- : reaped #<Process::Status: pid 1398 SIGKILL (signal 9)> worker=0
E, [2016-02-23T11:19:23.493775 #1102] ERROR -- : worker=1 PID:1117 timeout (61s > 60s), killing
E, [2016-02-23T11:19:23.552392 #1102] ERROR -- : reaped #<Process::Status: pid 1117 SIGKILL (signal 9)> worker=1
I, [2016-02-23T11:19:23.557649 #1643] INFO -- : worker=0 ready
I, [2016-02-23T11:19:23.581295 #1646] INFO -- : worker=1 ready
I, [2016-02-23T12:04:24.731376 #1102] INFO -- : reaped #<Process::Status: pid 1401 exit 0> worker=2
I, [2016-02-23T12:04:24.731730 #1102] INFO -- : reaped #<Process::Status: pid 1643 exit 0> worker=0
I, [2016-02-23T12:04:24.731942 #1102] INFO -- : reaped #<Process::Status: pid 1646 exit 0> worker=1
I, [2016-02-23T12:04:24.732179 #1102] INFO -- : master complete
')

Please help me to solve this problem!
LaszloLeonard
 
Posts: 4
Joined: Tue Feb 23, 2016 5:25 pm

Re: Gitlab fails to load some assets

Postby Zhenn » Thu Feb 25, 2016 5:17 pm

Heya, I'm seeing the same issue using the same version and architecture (Pi model 2).

So far I've tried changing permissions in /var/tmp/cache, /tmp, and /var/lib/gitlab/assets. I've also compiled and recompiled the assets.

Failing to load;
...3d0fe.css
...6def8.js

On a quick testing note, setting the timeout to 5s causes fast load times (but the files are still missing). Setting it to 500+ results in the same missing content, just a longer wait.

EDIT/UPDATE

Rebuilt using the latest version (gitlab 8.5.1-1), and the affected files are as follows;

$this->bbcode_second_pass_code('', '
/assets/application-bb56f416d10e8e01f8b15cebab7ce21c.js
/assets/application-de11fac706e0b30585f710b260d51e7b.css')

I was able to test both of the files by editing a cached copy of /users/sign_in, after using SCP to grab the files from the /assets/ dir on the Pi. The files are definitely fine, as far as I can tell. But they are not being served properly by unicorn.

/var/log/gitlab/production.log seems normal, unfortunately.

$this->bbcode_second_pass_code('', 'Started GET "/users/sign_in" for 192.168.x.x at 2016-02-26 03:04:14 -0700
Processing by SessionsController#new as HTML
Completed 200 OK in 766ms (Views: 232.3ms | ActiveRecord: 18.0ms)
Started GET "/assets/print-2cb1262fb60ceb73f2fe76fd1a61dccf.css" for 192.168.x.x at 2016-02-26 03:04:14 -0700
Started GET "/assets/application-bb56f416d10e8e01f8b15cebab7ce21c.js" for 192.168.x.x at 2016-02-26 03:04:15 -0700
Started GET "/assets/application-de11fac706e0b30585f710b260d51e7b.css" for 192.168.x.x at 2016-02-26 03:04:15 -0700
Started GET "/assets/application-bb56f416d10e8e01f8b15cebab7ce21c.js" for 192.168.x.x at 2016-02-26 03:05:15 -0700
Started GET "/assets/application-de11fac706e0b30585f710b260d51e7b.css" for 192.168.x.x at 2016-02-26 03:05:15 -0700
')
Zhenn
 
Posts: 1
Joined: Thu Feb 25, 2016 5:01 pm

Re: Gitlab fails to load some assets

Postby polylux » Mon Mar 21, 2016 2:07 pm

Same issue here on both my RPi1 and 2. You guys don't have any solution already? Another option would be - assuming Unicorn is unable to serve the files - to host gitlab via apache or similar.
polylux
 
Posts: 3
Joined: Thu Mar 19, 2015 10:51 am


Return to Packages

Who is online

Users browsing this forum: No registered users and 8 guests