Referer checking failed because domain does not match any trusted origins

You may see the following error in the Hue access.log file if the Knox Gateway DNS does not resolve properly due to some issue and you try to access Hue through the Knox Gateway UI: ”POST /accounts/login HTTP/1.1" — Referer checking failed - https://<ip_address>:<knoxui_port>/gateway/cdp-proxy/hue/hue/accounts/login?next=%2F%253FdoAs%253Dknoxui does not match any trusted origins.”

The Knox Gateway DNS may not resolve due to various reasons. Verify the following before proceeding:
  • Verify that the Knox proxyuser configuration is set properly in the Hue configuration
  • Check whether the hostnames specified in the Hue service > Configuration > Knox Proxy Hosts fiels are spelled correctly
  • Make sure that the DNS is working properly by logging into the DNS server and pinging a few hosts
  • Make sure that the /etc/hosts file has the correct mapping of the IP address and the hosts
  1. Go to Clusters > $Knox service > Instances and click on the Knox Gateway hostname.
  2. Note the IP address of the Knox Gateway host from the Details section.
  3. Go to Clusters > $Hue service > Configurations and search for the Knox Proxy Hosts field.
  4. Enter the IP address of the Knox Gateway host that you noted earlier.
  5. Click Save Changes.
  6. Verify whether you can access the Knox Gateway through the following URL: