FS#49186 - [gitlab-shell] Gitlab self-check fails.

Attached to Project: Community Packages
Opened by Thom Wiggers (twiggers) - Tuesday, 03 May 2016, 09:39 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 27 May 2016, 14:56 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Gitlab-shell self-check (part of gitlab) fails.

This is the output for:

su - git -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.1 exec rake gitlab:check RAILS_ENV=production"

Running /usr/share/webapps/gitlab-shell/bin/check
Ignoring RedCloth-4.2.9 because its extensions are not built. Try: gem pristine RedCloth --version 4.2.9
Ignoring allocations-1.0.4 because its extensions are not built. Try: gem pristine allocations --version 1.0.4
Ignoring bcrypt-3.1.10 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.10
Ignoring charlock_holmes-0.7.3 because its extensions are not built. Try: gem pristine charlock_holmes --version 0.7.3
Ignoring escape_utils-1.1.0 because its extensions are not built. Try: gem pristine escape_utils --version 1.1.0
Ignoring eventmachine-1.0.8 because its extensions are not built. Try: gem pristine eventmachine --version 1.0.8
Ignoring http_parser.rb-0.5.3 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.5.3
Ignoring kgio-2.10.0 because its extensions are not built. Try: gem pristine kgio --version 2.10.0
Ignoring mysql2-0.3.20 because its extensions are not built. Try: gem pristine mysql2 --version 0.3.20
Ignoring nokogiri-1.6.7.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.2
Ignoring pg-0.18.4 because its extensions are not built. Try: gem pristine pg --version 0.18.4
Ignoring posix-spawn-0.3.11 because its extensions are not built. Try: gem pristine posix-spawn --version 0.3.11
Ignoring raindrops-0.15.0 because its extensions are not built. Try: gem pristine raindrops --version 0.15.0
Ignoring redcarpet-3.3.3 because its extensions are not built. Try: gem pristine redcarpet --version 3.3.3
Ignoring rinku-1.7.3 because its extensions are not built. Try: gem pristine rinku --version 1.7.3
Ignoring rugged-0.24.0 because its extensions are not built. Try: gem pristine rugged --version 0.24.0
Ignoring unf_ext-0.0.7.2 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.2
Ignoring unicorn-4.9.0 because its extensions are not built. Try: gem pristine unicorn --version 4.9.0
Ignoring version_sorter-2.0.0 because its extensions are not built. Try: gem pristine version_sorter --version 2.0.0
Could not find rake-10.5.0 in any of the sources
Run `bundle install` to install missing gems.
gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u git -H editor /usr/share/webapps/gitlab-shell/config.yml
Please fix the error above and rerun the checks.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Friday, 27 May 2016, 14:56 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 03 May 2016, 12:19 GMT
I wonder what's required in order to fix this. Do you happen to know what's wrong here?
Comment by Thom Wiggers (twiggers) - Tuesday, 03 May 2016, 12:20 GMT
I'm not sure. I do know that it is actively breaking gitlab-shell.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 03 May 2016, 12:52 GMT
So is your gitlab running after all?
Comment by Thom Wiggers (twiggers) - Tuesday, 03 May 2016, 14:11 GMT
Gitlab ran (or well, the site displayed), but I then tried to restore my backup and gitlab-shell fell over with the same errors when it tried to regenerate authorized_keys.
Comment by Thom Wiggers (twiggers) - Tuesday, 03 May 2016, 14:13 GMT
Migration from the AUR package is far from trivial btw, I had to fix a lot of paths, permissions and symlinks. Actually, there may be another issue: is there a link to database.yml in the gitlab config folder? I had to make it myself.
Comment by Thom Wiggers (twiggers) - Saturday, 07 May 2016, 14:37 GMT
This is still happening for me.
Comment by Thom Wiggers (twiggers) - Saturday, 07 May 2016, 15:00 GMT
Interestingly, if I run sudo -u gitlab ./bin/check in gitlabs home folder, the chceks do work (although I had to fix a lot of permissions and the redis settings...)
Comment by Tobias Göbel (kubax) - Tuesday, 10 May 2016, 21:44 GMT
same here.

Came from aur and gitlab is f**ked after pacaur -Syu

But that's not the problem. I uninstalled gitlab and started from new but now i'm not able to get gitlab-shell to run so gitlab is pretty useless..

Is there any progress on fixing this problem?
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 12 May 2016, 07:09 GMT
It looks like it's trying to build a part of the extensions with the wrong ruby version. Any idea how to fix that?
Comment by Janne Heß (das_j) - Tuesday, 17 May 2016, 10:15 GMT
The shebangs of the shellscripts seem to be wrong.
This command:

sudo sed -i 's:#!/usr/bin/env ruby:\0-2.1:g' /usr/share/webapps/gitlab/bin/* /usr/share/webapps/gitlab-shell/bin/*

fixed it for me. (Just don't run it twice!)
Comment by Tobias Göbel (kubax) - Tuesday, 17 May 2016, 10:27 GMT
Had do move the "ci" folder away for the sed task to work (because it complains that "ci" is not a normal file) but the errors related to missing rake and missing gem's is gone now.

Gitlab-shell however throws this error anyway:

[code]
gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u gitlab -H editor /usr/share/webapps/gitlab-shell/config.yml
Please fix the error above and rerun the checks.
[/code]

but this might be a configuration error on my side.
Comment by Tobias Göbel (kubax) - Tuesday, 17 May 2016, 11:55 GMT
additional i had to change some things in gitlab-shell/config.yml

gitlab_url had to be reverted from https://localhost:8080 to http://localhost:8080 (changed it because of https part in wiki)

and in the redis: section i had to edit it liek this:

# Redis settings used for pushing commit notices to gitlab
redis:
bin: /usr/bin/redis-cli
host: 127.0.0.1
port: 6379
# pass: redispass # Allows you to specify the password for Redis
database: 0
#socket: /var/run/redis/redis.sock # Comment out this line if you want to use TCP
namespace: resque:gitlab


Now gitlab-shell is works when checked... now i only have to get the upload directory check working, and everything is like bevore migrating to community. (at least i hope)

Loading...