Traefik+docker swarm not working with chrome

Hi,

I am attending Udemy course with lab material from:
https://github.com/56kcloud/traefik-training/blob/master/05-Middlewares/docker-compose.auth.yml

All the examples (i.e. docker-compose.auth.yml ) which are tested as http://catapp.localhost/ works only on Firefox but not on Chrome, Opera, Brave browsers.
In Chrome ... there is no response, just rolling wheel forever. On the other hand the Dashboard page on http://0.0.0.0:8080 is accessible from all browsers. Same behavior on different machines. Any idea what is wrong here?

Ubuntu 20.04.3 LTS
Docker version 26.1.4, build 5650f9b

Regards,Sašo

Addition to original text of the topic:
What is interesting here is that Chrome shows this page when it is served using my domain name as instructed here:
https://github.com/56kcloud/traefik-training/blob/master/04-HTTPS-TLS/docker-compose.dns.yml

My DNS records are stored at CloudFlare and the page is shown flawlessly with all tested browsers.
Docker+traefik are inside ubuntu VM on Proxmox host and I have defined port forwarding on my router for port 443 to this VM.

Sašo

It seems you have a complicated setup. subdomain.localhost should resolve to 127.0.0.1. So you need to make sure the target service (or a forwarding service) is listening on this IP.

Thank you for this, you are right.

When I ping catapp.localhost, I got (::1) and not 127.0.0.1:

saso@ubunt-20-04-03-LTS:~$ ping catapp.localhost
PING catapp.localhost(ip6-localhost (::1)) 56 data bytes
64 bytes from ip6-localhost (::1): icmp_seq=1 ttl=64 time=0.030 ms
64 bytes from ip6-localhost (::1): icmp_seq=2 ttl=64 time=0.031 ms

then I disable ipv6:
in /etc/sysctl.conf I add

net.ipv6.conf.all.disable_ipv6 = 1

then

sudo sysctl -p

and after that:

saso@ubunt-20-04-03-LTS:~$ ping catapp.localhost
PING catapp.localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.045 ms

and then http://catapp.localhost/ has response as expected also in Chrome, Opera, Brave.

What setup can work seamlessly with ipv4 and ipv6?

Thank you again,
Sašo

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.