Repository navigation
Description
Description
When deploying Jellyseerr into a Kubernetes environment (with CoreDNS), the container image (fallenbagel/jellyseerr:latest) fails to properly resolve service names or external domains inside the pod when using standard Kubernetes DNS (dnsPolicy: ClusterFirst).
This causes things like fetch errors to TMDB, Github api, etc and http 500 in web ui.
Changing the jellyseerr deployment to:
spec:
template:
spec:
dnsPolicy: None
dnsConfig:
nameservers:
- 8.8.8.8
- 1.1.1.1
fixes this (but breaks internal k8s dns resolution, e.g. jellyfin or radarr).
This is a known issue as per the k8 docs:
Some Linux distributions (e.g. Ubuntu) use a local DNS resolver by default (systemd-resolved). Systemd-resolved moves and replaces /etc/resolv.conf with a stub file that can cause a fatal forwarding loop when resolving names in upstream servers. This can be fixed manually by using kubelet's --resolv-conf flag to point to the correct resolv.conf (With systemd-resolved, this is /run/systemd/resolve/resolv.conf). kubeadm automatically detects systemd-resolved, and adjusts the kubelet flags accordingly.
Kubernetes installs do not configure the nodes' resolv.conf files to use the cluster DNS by default, because that process is inherently distribution-specific. This should probably be implemented eventually.
Linux's libc (a.k.a. glibc) has a limit for the DNS nameserver records to 3 by default and Kubernetes needs to consume 1 nameserver record. This means that if a local installation already uses 3 nameservers, some of those entries will be lost. To work around this limit, the node can run dnsmasq, which will provide more nameserver entries. You can also use kubelet's --resolv-conf flag.
If you are using Alpine version 3.17 or earlier as your base image, DNS may not work properly due to a design issue with Alpine. Until musl version 1.24 didn't include TCP fallback to the DNS stub resolver meaning any DNS call above 512 bytes would fail. Please upgrade your images to Alpine version 3.18 or above.
As far as i can tell the helm chart for jellyseerr uses the same image, so has the same problem.
Version
2.5.2
Steps to Reproduce
- Deploy using yaml files (deployment, service, ingress, etc) using dnsPolicy: ClusterFirst.
- Try to load web ui.
- Web ui gives error 500, Failed to fetch errors in log. (external DNS queries like nslookup work, but application-layer fetches fail).
Screenshots
No response
Logs
[warn][GitHub API]: Failed to retrieve GitHub releases. This may be an issue on GitHub's end. Jellyseerr can't check if it's on the latest version. {"errorMessage":"fetch failed"}
[debug][API]: Something went wrong retrieving regions {"errorMessage":"[TMDB] Failed to fetch countries: fetch failed"}
[debug][API]: Something went wrong retrieving languages {"errorMessage":"[TMDB] Failed to fetch languages: fetch failed"}
[debug][API]: Something went wrong retrieving trending items {"errorMessage":"[TMDB] Failed to fetch all trending: fetch failed"}
[debug][API]: Something went wrong retrieving the movie genre slider {"errorMessage":"[TMDB] Failed to fetch movie genres: fetch failed"}
[debug][API]: Something went wrong retrieving popular movies {"errorMessage":"[TMDB] Failed to fetch discover movies: fetch failed"}
[debug][API]: Something went wrong retrieving popular series {"errorMessage":"[TMDB] Failed to fetch discover TV: fetch failed"}
[debug][API]: Something went wrong retrieving the series genre slider {"errorMessage":"[TMDB] Failed to fetch TV genres: fetch failed"}Platform
desktop
Database
SQLite (default)
Device
Desktop
Operating System
Ubuntu 24.04, k8s v1.32
Browser
Firefox
Additional Context
No response
Code of Conduct
- I agree to follow Jellyseerr's Code of Conduct
Activity
fallenbagel commentedon Apr 28, 2025
Please try with
developtag.M0NsTeRRR commentedon Apr 28, 2025
Hello,
I use
dnsPolicy: ClusterFirstin a dual-stack cluster (Ubuntu Server with k3s), and so far I have had no issues resolving domains inside my cluster, within my local network, or on the internet (e.g., the TMDB API).It's more likely a cluster configuration issue, or maybe I didn't understand your point. 😄
The Jellyseerr image uses Alpine 3.21, so it shouldn't be affected by what you mentioned.
EgorBryantsev commentedon Apr 28, 2025
The same error happens with
fallenbagel/jellyseerr:develop.I used kubeadm for my cluster, and apart from jellyseerr, dns works for other pods (at least for debian/ubuntu based pods). Maybe it's a k3s vs kubeadm thing.
In the jellyseerr pod, nslookup works (can resolve domains), but app-level requests like
fetch,apk add, etc fail./etc/resolv.confinside the pod also points to the correct coredns IP, and kubelet has the correct--resolv-conf=/run/systemd/resolve/resolv.confflag.To be honest I started using k8s only few weeks ago because I ran out of things to do in my homelab, so it could just be me messing something up. This does seem like a musl-based alpine problem though, glibc containers work fine.
@M0NsTeRRR Could you share your jellyseerr
deployment.yaml/helm-values.yaml? Also, are you using systemd-resolved?Thanks for the help.
M0NsTeRRR commentedon Apr 28, 2025
https://github.com/M0NsTeRRR/homelabv3-infra/tree/main/argocd/media/jellyseerr
Yes
apk addalso works for me.Looks like more the global fetch/axios issue @fallenbagel is it the same behaviour on docker (nslookup work but apk etc... not) ?
fallenbagel commentedon Apr 28, 2025
@M0NsTeRRR we dont use fetch anymore in develop. It's axios.
EgorBryantsev commentedon Apr 28, 2025
Changing the jellyseerr deployment to:
fixes it. Is this just a limitation of musl?
M0NsTeRRR commentedon Apr 29, 2025
Not as I know as it works for me with 4 nameservers
ccureau commentedon Jul 1, 2025
I can confirm that this is related to IPv6 being enabled in the cluster. I disabled by setting the appropriate lines in
/etc/sysctl.confand restarted all nodes, and all of my communication between pods works as expected.If @EgorBryantsev still has their original setup, I wonder if it would be enough to set
spec.ipFamilyPolicytoSingleStackin each of the services would make a difference.I'll eventually get to testing it myself, but that's for another day.
M0NsTeRRR commentedon Jul 1, 2025
It's maybe related to #1747. I haven't had access to my cluster so far, but I think I use IPv4 first, and you might have IPv6 first it's why I've never faced the issue until somebody reported it.
M0NsTeRRR commentedon Jul 15, 2025
I've made some fixes regarding IPv6, and I believe the axios issue is related to
fetch failederror. If you could test it, @EgorBryantsev and @ccureau, with the updated develop image, that would be great.Monoboy4ik commentedon Jul 22, 2025
version 2.7.2
2025-07-22T07:34:12.064Z [debug][API]: Something went wrong retrieving regions{"errorMessage":"[TMDB] Failed to fetch countries: Hostname/IP does not match certificate's altnames: Host: api.themoviedb.org. is not in the cert's altnames: DNS:synology.monoboy.ru"}
its another bug?
M0NsTeRRR commentedon Jul 22, 2025
Not the same issue at least.
Monoboy4ik commentedon Jul 22, 2025
thx!
restart container resolved problem....
gauthier-th commentedon Jul 22, 2025
@EgorBryantsev can this be closed?
github-actions commentedon Oct 5, 2025
This issue is stale because it has been open 30 days with no activity. Please provide an update or the requested information to keep it open.
github-actions commentedon Nov 4, 2025
This issue was closed because it has been stalled for 30 days with no activity. Feel free to reopen it once you provide the required update or information.