I run TTRSS on a Kubernetes cluster (v1.27.2) with the latest stock docker images.
Now when I upgrade ttrss-web-nginx to the latest image (1fe1132a) I get these errors:
2023/11/13 16:18:29 [error] 36#36: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.11:53
So it seems the latest commit (1fe1132a1a68bd0fedc313823b942130167fad86) with changes to nginx.conf is causing some internal Kubernetes resolving issues for my setup.
When reverting to the previous commit (image cthulhoo/ttrss-web-nginx:61910acb) it works perfectly again.
Does anybody else have the same the issue with the stock docker images on k8s?
I have the exact same issue @FWD . Thanks for opening a post, I was about to. I also run ttrss on a k8s cluster and exact same message. I haven’t tried all the images in between the broken one (the latest) and the one that was working 12 days ago so can’t confirm which commit broke it, but I believe you are right.
Thanks. I’m passing the environment variable for the Kubernetes resolver to nginx now. However somehow resolving is still not working.
I now get this error:
2023/11/13 17:59:59 [error] 39#39: *7 app could not be resolved (3: Host not found), client: 10.244.x.x, server: , request: “GET /tt-rss/ HTTP/1.1”, host: “MYDOMAINNAME”
However when I use a shell on this nginx pod resolving is working fine:
nslookup MYDOMAINNAME kube-dns.kube-system.svc.cluster.local
Server: kube-dns.kube-system.svc.cluster.local
Address: 10.96.x.x:53
NB: I use traefik in front of nginx to do SSL termination / Let’s Encrypt renewals.
If you spot what I do wrong please enlighten me. I’ll debug my k8s setup more when I’ve more time…
you’re looking up MYDOMAINNAME while the DNS record that doesn’t resolve is the backend upstream name (‘app’) which is also configurable via environment. do pay more attention to the error messages.
figure out correct hostname for the app container/pod and go from there.
i think i see the problem - using resolver like this (as opposed to built-in resolving nginx upstream directive did before) does not use implied dns namespace suffix from resolv.conf which needs to be appended manually.
It seems podman (aardvark-DNS) listens on the Bridge-Interface for DNS-requests and configures /etc/resolv.conf with a nameserver entry for each bridge the container is connected to. As these bridge network ip addresses could change, I cannot configure them in advance for use in NGINX config.
Using the setup described using podman and the official NGINX image (docker.io/nginx:alpine) I experience occasional dns lookup faults “Uncaught PDOException: SQLSTATE[08006] [7] could not translate host name “ttrss_db” to address: Name does not resolve”.