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.
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-pleskGET / HTTP/1.0
andGET /favicon.ico HTTP/1.0
are the respective messages. I'm not sure how to get further info.gitlab-ctl status
)