dial tcp: lookup gitlab.example.com on [::1]:53: read udp [::1]:34251-\u003e[::1]:53: read: connection refused
Hello there,
since our recent GitLab CE 14 upgrade, pages on custom domains are no longer served correctly, but instead render an error 502. The logs shows (when attempting to fetch https://group.example.com/path/):
{"correlation_id":"01F8ZC54HS0FHFZ9S4XFB1BBV9","error":"Get \"https://gitlab.example.com/api/v4/internal/pages?host=group.example.com\": dial tcp: lookup gitlab.example.com on [::1]:53: read udp [::1]:34251-\u003e[::1]:53: read: connection refused","host":"group.example.com","level":"error","msg":"could not fetch domain information from a source","path":"/path/","time":"2021-06-24T16:02:56Z"}
The deployment is using the official GitLab CE Docker image, so I am not surprised that no DNS resolver is listening at ::1. ;-)
A search brought up #534 (closed), but I assume that there is also no systemd involved either for our instance due to the Docker-based deployment.
Versions:
- GitLab CE 14.0.0
- GitLab Pages 1.40.0
Pages is configured like this:
gitlab_pages['enable'] = true
gitlab_pages['inplace_chroot'] = true
gitlab_pages['external_http'] = ['0.0.0.0:81']
pages_nginx['enable'] = false
gitlab_pages['access_control'] = false
When disabling inplace_chroot (via gitlab_pages['inplace_chroot'] = false) as an attempt for a workaround, the pages daemon fails to start:
{"level":"info","msg":"GitLab Pages Daemon","revision":"0e711de","time":"2021-06-24T16:43:05Z","version":"1.40.0"}
{"level":"info","msg":"URL: https://gitlab.com/gitlab-org/gitlab-pages","time":"2021-06-24T16:43:05Z"}
{"gid":998,"in-place":false,"level":"info","msg":"running the daemon as unprivileged user","pages-root":"/var/opt/gitlab/gitlab-rails/shared/pages","time":"2021-06-24T16:43:05Z","uid":998}
{"error":"operation not permitted","level":"info","msg":"unsharing mount namespace","time":"2021-06-24T16:43:05Z"}
{"error":"failed to bind mount /var/opt/gitlab/gitlab-rails/shared/pages on /tmp/gitlab-pages-1624552985474668987/var/opt/gitlab/gitlab-rails/shared/pages. operation not permitted","level":"info","msg":"chroot build failed","time":"2021-06-24T16:43:05Z"}
{"error":"failed to bind mount /var/opt/gitlab/gitlab-rails/shared/pages on /tmp/gitlab-pages-1624552985474668987/var/opt/gitlab/gitlab-rails/shared/pages. operation not permitted","level":"fatal","msg":"could not create pages daemon","time":"2021-06-24T16:43:05Z"}
{"level":"info","msg":"GitLab Pages Daemon","revision":"0e711de","time":"2021-06-24T16:43:06Z","version":"1.40.0"}
{"level":"info","msg":"URL: https://gitlab.com/gitlab-org/gitlab-pages","time":"2021-06-24T16:43:06Z"}
{"gid":998,"in-place":false,"level":"info","msg":"running the daemon as unprivileged user","pages-root":"/var/opt/gitlab/gitlab-rails/shared/pages","time":"2021-06-24T16:43:06Z","uid":998}
{"error":"operation not permitted","level":"info","msg":"unsharing mount namespace","time":"2021-06-24T16:43:06Z"}
{"error":"failed to bind mount /var/opt/gitlab/gitlab-rails/shared/pages on /tmp/gitlab-pages-1624552986541389671/var/opt/gitlab/gitlab-rails/shared/pages. operation not permitted","level":"info","msg":"chroot build failed","time":"2021-06-24T16:43:06Z"}
{"error":"failed to bind mount /var/opt/gitlab/gitlab-rails/shared/pages on /tmp/gitlab-pages-1624552986541389671/var/opt/gitlab/gitlab-rails/shared/pages. operation not permitted","level":"fatal","msg":"could not create pages daemon","time":"2021-06-24T16:43:06Z"}
Any ideas?
Thanks,
Thilo
P.S.: The problem still happens with the GitLab 14.0.1 update that just arrived