I got this error today in GitLab FOSS/CE running in docker compose when testing a webhook.

This solution helped me, specifically removing the hostname: from the compose config.

version: '3.6'
services:
  web:
    image: 'gitlab/gitlab-ce:latest'
    restart: unless-stopped
#    hostname: 'git.quinncasey.com'
    environment:
        ...

This might break things cascading down from this one config option, but time will tell.