Substra/substra-backend

403 on substra-backend.node-1.com

Closed this issue · 5 comments

Spoiler alert: This seems to be firefox-only issue, so you know...

I am getting a 403 - Forbidden: Request for an Unsupported Host Nome (webpage title) when I try to access http://substra-backend.node-1.com/, but everything is fine on http://substra-backend.node-2.com/. Frontend 1 & 2 are working as expected. And curl http://substra-backend.node-1.com/ is working perfectly. CLI login on this node is OK. I am not finding errors in the logs...

The webpage displayed is:

Unknown Host Request Forbidden

Your request to this server is for a Host Name that is unknown to this server or unsupported by this server.

Additional Information:

You are seeing this message because a request for a Web Site or Domain Name was directed to this server, but this server has not been configured to support requests for that Web Site or Domain Name.  Possible causes are (1) the domain name you were requesting has been incorrectly configured to point to the IP address of this server, (2) a Host File on your system/network has been incorrectly configured to direct requests for the domain name you specified to the IP address of this server, or (3) another web site on the internet has been incorrectly configured to redirect requests for the domain name you specified to the IP address of this server. It may also be possible that the incorrect configuration is not accidental but rather intentional designed with a malevolent intent. You should contact the holder or the administrator of the domain name you were requesting for investigation and resolution. 
  • GET Request headers:
Host: substra-backend.node-1.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
Cookie: csrftoken=CRw0ntGtzVEeIhHWW9PMPQeGXqZoR1orD8996ZSwnodIohqLTTFPvxTRadENrwAw; sessionid=lgip14h9bko6vq3jlm6kxdpuxpbfymmj
Upgrade-Insecure-Requests: 1
If-Modified-Since: Mon, 21 Mar 2005 22:15:26 GMT
If-None-Match: "5a6-3f2da10a25b80"
Cache-Control: max-age=0
  • GET Response headers (attention: http error is 304 (Not Modified) and not 403 as displayed in the webpage title):
HTTP/1.1 304 Not Modified
Date: Mon, 10 Feb 2020 14:14:55 GMT
Connection: keep-alive
Keep-Alive: timeout=30
Server: Apache/2
ETag: "5a6-3f2da10a25b80"
Expires: Mon, 10 Feb 2020 15:14:55 GMT
Cache-Control: max-age=3600
Vary: Host
Accept-Ranges: bytes
Age: 0

Configuration:

  • Ubuntu Desktop: 19.10
  • Firefox: 72.0.2
  • Tried the same request deactivating all extensions => Same result
  • No weird hosts config
  • Works perfectly with Chromium...

Do you have any clue to make it work with Firefox? Any specific log to check?

Actually, I am getting the exact same issue on http://substra-frontend.node-1.com/...

@natct10 What you're seeing is the page rendered by http://node-1.com/

Firefox is trying to find substra-backend.node-1.com on the public internet instead of resolving it on your local machine. It's a DNS issue (probably a DNS cache issue)

I would try a combination of the following:

  • Hard reload (Ctrl + Shift + R)
  • Restart Firefox (make sure all processes are killed)
  • Restart Ubuntu DNS cache: /etc/init.d/networking restart

Thank you @AurelienGasser ! I will try this suggestion and I will let you know!

Thank you @AurelienGasser !
@natct10 Does it solve your problem ?

Thank you @AurelienGasser & @Kelvin-M it was indeed a dns issue that occurred because of the DNS over HTTPS parameter activated in my Firefox. Everything is fine without it!

Note: On Ubuntu 19.10, I had to use sudo systemd-resolve --flush-caches to flush the dns cache and sudo systemctl restart systemd-resolved to restart the dns (instead of /etc/init.d/networking restart).

Thank you!