2

I tried to install GitLab on a small personal server and configure it so that it will work on a Plesk WebAdmin subdomain. I installed GitLab normally via the Omnibus package. I changed the following settings in the gitlab.rb file:

nginx['enable'] = false
web_server['external_users'] = ['www-data', 'PLESK_USER']
web_server['group'] = 'psacln'
gitlab_workhorse['listen_network'] = "tcp"
gitlab_workhorse['listen_addr'] = "127.0.0.1:8181"

where PLESK_USER is the user linked to that plesk subdomain.

I redirected HTTP to HTTPS on the subdomain, which works, the SSL certificate also works.

In Plesk, under "additional directives for HTTPS", I pasted the text from this page in the <VirtualHost *:443> tag. https://gitlab.com/gitlab-org/gitlab-recipes/blob/master/web-server/apache/gitlab-omnibus-ssl-apache24.conf

and I replaced YOUR_SERVER_FQDN as well as the 3 SSLCertificateFile lines (with the ones I found under /var/www/vhosts/system/fqdn/conf/last_nginx.conf

Visiting my domain, I immediately get a 500 error. This is before even creating a root user. The message appears GitLab specific, having the GitLab logo and corresponding text, so I do believe the routing to GitLab itself seems to be working.

In the Production Log, I only get the following output for each site visit:

Started GET "/-/metrics" for 127.0.0.1 at 2019-05-27 11:59:44 +0000
Processing by MetricsController#index as HTML
Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.0ms | Elasticsearch: 0.0ms)

and using gitlab-ctl tail

==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/-/metrics" for 127.0.0.1 at 2019-05-27 12:01:29 +0000
Processing by MetricsController#index as HTML
Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.0ms | Elasticsearch: 0.0ms)

==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/-/metrics","format":"html","controller":"MetricsController","action":"index","status":200,"duration":2.64,"view":0.41,"db":0.0,"time":"2019-05-27T12:01:29.670Z","params":[],"remote_ip":null,"user_id":null,"username":null,"ua":null,"queue_duration":null,"correlation_id":"98970bd1-9618-41ea-85a2-5f59b26fd16b"}

These messages show up immediately and exactly once for every browser request I make.

sudo gitlab-rake gitlab:check --trace also doesn't reveal any further missing information. The lack of any concrete error messages leads me to believe that there is a problem with the linking between Plesk and GitLab rather than the GitLab installation itself, but I can't find this concrete problem anywhere else and I'm really out of ideas on what to check.

I'm grateful for any help.

Edit: Checking the log in /var/log/gitlab/gitlab-workhorse/current, on startup of the application (after each restart) I can see the following error messages

2019-05-27_13:11:49.39615 time="2019-05-27T13:11:49Z" level=error msg="unknown error" error="keywatcher: pubsub receive: EOF"
2019-05-27_13:11:49.39617 time="2019-05-27T13:11:49Z" level=info msg="redis: dialing" address=/var/opt/gitlab/redis/redis.socket network=unix
2019-05-27_13:11:49.39617 time="2019-05-27T13:11:49Z" level=error msg="unknown error" error="keywatcher: dial unix /var/opt/gitlab/redis/redis.socket: connect: no such file or directory"

However since I have not changed any settings past the ones I initially mentioned, I can't really find any connection to my specific configuration.

7
  • The GET /-/metrics is purely internal to gitlab. None of your requests from browser are actually reaching gitlab. The 500 error is served by the webserver you configured with plesk. The info your looking for will probably be in the webserver's error log. I don't use plesk at all but this might help: websavers.ca/view-web-server-logs-plesk May 27 '19 at 12:29
  • Thank you. I do believe the requests are reaching GitLab because the line shows up precisely and exactly once for every time I make a browser request. The 500 error is also GitLab specific (With a GitLab logo, and the message "Please contact your GitLab administrator if this problem persists.") Checking the logs, there is two errors 500 for each request in my Plesk interface: GET / HTTP/1.0 and GET /favicon.ico HTTP/1.0 are the respective messages. I'm not sure how to get further info.
    – xerox102
    May 27 '19 at 12:55
  • You should edit your question and add those pieces of information there. In this case, you might get some relevant info in /var/log/gitlab/gitlab-workhorse/current May 27 '19 at 13:05
  • Thanks. I've checked the specific logfile and found two error messages that pop up on startup (see edit), but checking on google, the specific situations don't really seem to apply to my configuration since I didn't actually change the default values of the redis configuration to begin with. I've also checked to see that both the workhorse and unicorn are listening on their ports (8080 and 8181), which they are
    – xerox102
    May 27 '19 at 13:28
  • Did you check that all gitlab services are up and running ? (gitlab-ctl status) May 27 '19 at 13:38
1

I have now solved this problem.

In my Plesk Interface under "Tools & Settings" - "Apache Web Server" the module "proxy_http" was not enabled. Enabling the module solves the issue perfectly with the above configuration! Hopefully this can help someone in the future with the same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.