-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getaddrinfo EAI_AGAIN error, then backend container crashes #156
Comments
Hello! Thanks for the clear bug report and the nice comment. Awesome to see a k8s setup here :) EDIT: https://stackoverflow.com/questions/45805483/kubernetes-pods-cant-resolve-hostnames |
Thanks for the link - my coredns had restarted a couple of times. Redeploying it does not seem to have fixed the error though. I have triple checked and the error presented above is still reproducable, but it looks like the backend container can resolve the DNS of
I will deploy some other apps into my home lab (this one was actually the first one 😊 ) and see if I run into DNS issues in those. If I do, and it leads to me finding the fix, I will report back here too. |
Been doing a bit more investigating into this issue this evening but haven't had much luck. I did find this recent post which appears to describe the same issue, so hopefully someone responds to it with a solution. There is also this post which suggest that Kubernetes is the root cause, but also no resolution there. That might be why I am the only one reporting this, if the vast majority of users deploy the app using the provided docker-compose script. This post supports that theory, saying that running an alpine image in Kubernetes can lead to these DNS issues. I'll keep slowly ticking away at this when I have a chance. |
Alright I resolved it! The posts I linked to above had all the clues needed - the backend container didn't work due to a combination of the node package, the alpine base image, and Kubernetes. I forked the repo, modified the Dockerfile.production image to change the base image from alpine to debian, and then redeployed the stack and it worked! I've raised a pull request with an additional dockerfile with my changes in case you are interested @Yooooomi , but no sweat if not. Regardless, I will close this ticket. |
@brandonhinds I have had great success with deploying this on k8s without changing the base image. For reference: https://github.com/samip5/k8s-cluster/tree/c028b26ef65a52706674299e49ef191c7ae3f1a3/archive/misc/my_spotify |
@samip5 interesting. Your manifest files look very similar to what I am using. What "distro" of Kubernetes are you running? I am using Microk8s on a Ubuntu 22.04 server. I wonder if my issues are related to the cut-down set of typical services that Microk8s uses. |
I'm using k3s on Ubuntu but I also have Kyverno doing fun things like tweaking DNS config in pods. |
Ok, that is probably where our differences are, as the issue seems to be related to DNS within the pods. Re: the pull request, as this issue seems to be isolated to my setup specifically I think it is reasonable to have the PR denied, and this ticket and the accompanying PR can be used as a reference for anyone who has similar issues in the future. If someone is using Kubernetes they are likely also comfortable building their own Docker image. |
Describe the bug
After authenticating with Spotify I get a triggerUncaughtException error, and then the backend container crashes and restarts. After turning on debug logging I found a
getaddrinfo EAI_AGAIN accounts.spotify.com
error message right before the container crash.Expected behavior
After authenticating with Spotify you are turned to the frontend site.
Additional context
The output of the debug logs for the backend container are below:
Debug Log
I also don't use docker-compose to deploy this app - I use Kubernetes. Those files can be found below in case they are helpful:
Kubernetes Manifests
Thanks for sharing what looks like an awesome app. I am very keen to get it setup.
The text was updated successfully, but these errors were encountered: