Good day.
I made an oopsie with my GitLab install last week Friday. I messed up the permissions for everything and now I can’t get my server back up and running. Can I reinstall GitLab and just copy the files to the new instance?
For those who would like to troubleshoot it, here is my output for gitlab-ctl tail | grep error:
2022-08-22_06:53:52.51090 error: stat of /var/log/gitlab/gitlab-workhorse/*.log failed: Permission denied
2022-08-22_07:32:30.98287 error: error opening /var/log/gitlab/puma/puma_stdout.log: Permission denied
2022-08-22_10:17:19.00038 error: error setting owner of /var/log/gitlab/puma/puma_stderr.log.1 to uid 984 and gid 0: Operation not permitted
{"level":"warning","msg":"[core] [Channel #4 SubChannel #5] grpc: addrConn.createTransport failed to connect to {\n \"Addr\": \"/var/opt/gitlab/gitaly/run/gitaly-40077/sock.d/ruby.1\",\n \"ServerName\": \"/var/opt/gitlab/gitaly/run/gitaly-40077/sock.d/ruby.1\",\n \"Attributes\": null,\n \"BalancerAttributes\": null,\n \"Type\": 0,\n \"Metadata\": null\n}. Err: connection error: desc = \"transport: Error while dialing dial unix /var/opt/gitlab/gitaly/run/gitaly-40077/sock.d/ruby.1: connect: no such file or directory\"","pid":40077,"system":"system","time":"2022-08-22T10:34:42.188Z"}
from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
{"correlation_id":"","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused","level":"error","method":"GET","msg":"","time":"2022-08-22T12:39:38+02:00","uri":""}
{"correlation_id":"01GB2J63KFRAZCWZ7KRY6D57C6","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused","level":"error","method":"GET","msg":"","time":"2022-08-22T12:39:45+02:00","uri":"/"}
{"correlation_id":"01GB2J645Z16XC9KQNTH760XCK","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused","level":"error","method":"GET","msg":"","time":"2022-08-22T12:39:45+02:00","uri":"/favicon.ico"}
{"correlation_id":"","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused","level":"error","method":"GET","msg":"","time":"2022-08-22T12:39:48+02:00","uri":""}
{"correlation_id":"01GB2J6AZTTHJCD6YX4G66MWBE","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused","level":"error","method":"POST","msg":"","time":"2022-08-22T12:39:52+02:00","uri":"/api/v4/jobs/request"}
{"correlation_id":"01GB2J6BR2AP2X03Y512HJBKXG","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused","level":"error","method":"POST","msg":"","time":"2022-08-22T12:39:53+02:00","uri":"/api/v4/jobs/request"}
==> /var/log/gitlab/nginx/error.log <==
==> /var/log/gitlab/nginx/gitlab_error.log <==
2022-08-22_10:17:52.28973 level=error ts=2022-08-22T10:17:52.289Z caller=manager.go:316 component="discovery manager scrape" msg="Cannot create service discovery" err="unable to load specified CA cert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: open /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: no such file or directory" type=kubernetes
2022-08-22_10:17:52.28987 level=error ts=2022-08-22T10:17:52.289Z caller=manager.go:316 component="discovery manager scrape" msg="Cannot create service discovery" err="unable to load specified CA cert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: open /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: no such file or directory" type=kubernetes
2022-08-22_10:17:52.28987 level=error ts=2022-08-22T10:17:52.289Z caller=manager.go:316 component="discovery manager scrape" msg="Cannot create service discovery" err="unable to load specified CA cert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: open /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: no such file or directory" type=kubernetes
2022-08-22_10:17:57.29773 level=error ts=2022-08-22T10:17:57.297Z caller=manager.go:196 component="scrape manager" msg="error creating new scrape pool" err="error creating HTTP client: unable to load specified CA cert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: open /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: no such file or directory" scrape_pool=kubernetes-nodes
2022-08-22_10:17:57.29775 level=error ts=2022-08-22T10:17:57.297Z caller=manager.go:196 component="scrape manager" msg="error creating new scrape pool" err="error creating HTTP client: unable to load specified CA cert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: open /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: no such file or directory" scrape_pool=kubernetes-pods
2022-08-22_10:17:57.29776 level=error ts=2022-08-22T10:17:57.297Z caller=manager.go:196 component="scrape manager" msg="error creating new scrape pool" err="error creating HTTP client: unable to load specified CA cert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: open /var/run/secrets/kubernetes.io/serviceaccount/ca.crt: no such file or directory" scrape_pool=kubernetes-cadvisor
2022-08-22_10:17:49.14924 {"@level":"debug","@message":"datasource: registering query type handler","@timestamp":"2022-08-22T12:17:49.149239+02:00","queryType":"random_walk_with_error"}
2022-08-22_10:17:49.14926 {"@level":"debug","@message":"datasource: registering query type handler","@timestamp":"2022-08-22T12:17:49.149248+02:00","queryType":"server_error_500"}
{"correlation_id":"","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused","level":"error","method":"GET","msg":"","time":"2022-08-22T12:39:58+02:00","uri":""}