Pages Fail with 502 Error Code (Omnibus) dial tcp: lookup git.example.com on [::1]:53: read udp
Our Gitlab pages fail since 13.7.x. Previously it worked flawlessly. Here the config:
external_url "https://git.example.com"
pages_external_url "https://git.example.com"
letsencrypt['enable'] = false
nginx['ssl_certificate'] = "/path/to/node_certificate.pem"
nginx['ssl_certificate_key'] = "/path/to/node_key_nocrypt.pem"
nginx['redirect_http_to_https'] = true
pages_nginx['redirect_http_to_https'] = true
pages_nginx['ssl_certificate'] = "/path/to/node_certificate.pem"
pages_nginx['ssl_certificate_key'] = "/path/to/node_key_nocrypt.pem"
In the logs we see:
current:{"error":"Get \"https://git.example.com/api/v4/internal/pages?host=documentation.git.example.com\": dial tcp: lookup git.example.com on [::1]:53: read udp [::1]:58929-\u003e[::1]:53: read: connection refused","level":"error","msg":"could not fetch domain information from a source","time":"2021-01-25T12:54:54Z"
In the troubleshooting guide it is described that this error occurs for docker instances in combination with access control. We have no access control enabled and the server does not run in a docker image.
Any hints?
Possible solution
The DNS error dial tcp: lookup git.example.com on [::1]:53: read udp means that Pages could not resolve the hostname git.example.com.
If you are running inside a closed network, you can try setting the internal_gitlab_server value with your main GitLab server hostname
gitlab_pages['internal_gitlab_server'] = "https://git.example.com"
See more settings in https://docs.gitlab.com/ee/administration/pages/#global-settings
Edited by Jaime Martinez