lancachenet / lancache-dns

DNS Docker service for a lancache.

Home Page:https://hub.docker.com/r/lancachenet/lancache-dns/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Container keeps restarting - Unable to resolve github.com

itsRems opened this issue · comments

Issue Description:
Hi. I'm having in issue while starting lancache-dns on a static ip. Apparently the dns is screwed up and the lancache dns is not able to update its server list from github, although it's accessible from the host and I setup the UPSTREAM_DNS.

Docker Run Command:

sudo docker run --restart unless-stopped --name lancache-dns --detach -p 192.168.1.20:53:53/udp -e USE_GENERIC_CACHE=true -e LANCACHE_IP=192.168.1.20 -e UPSTREAM_DNS=8.8.8.8 lancachenet/lancache-dns:latest

Docker Container Output:

Executing hook /hooks/entrypoint-pre.d/10_generate_config.sh
/opt/cache-domains /scripts
fatal: unable to access 'https://github.com/uklans/cache-domains.git/': Could not resolve host: github.com

@itsrens ignore my last, I'm an idiot and didn't see this

Can you try the following from the docker host nslookup GitHub.com 8.8.8.8

Can you try the following from the docker host nslookup GitHub.com 8.8.8.8

Works!

nslookup github.com 8.8.8.8
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   github.com
Address: 140.82.114.3


That's my big problem w/this. It's just... supposed to work but it doesn't

Could you tell me which operating system your lancache-dns runs on? @itsRems

I had a problem like this (ubuntu 18.04) and my problem was the systemd-resolved process. Indeed I managed to make everything work by performing these manipulations:

sudo systemctl disable systemd-resolved
sudo systemctl stop systemd-resolved
-> edit /etc/resolv.conf with the DNS server of your choice (this allows your server to make resolutions even if the lancache-dns docker turns on port 53).

This is my docker command:
docker run --restart unless-stopped --detach --name lancache-dns -p 53:53/udp -e USE_GENERIC_CACHE=true -e LANCACHE_IP=$MyIpAdress -e UPSTREAM_DNS="1.1.1.1; 1.0.0.1 ;8.8.8.8; 8.8.4.4" lancachenet/lancache-dns:latest

Indeed I determined that the process prevented the lancache-dns docker from working properly, it restarted constantly.

commented

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

commented

This issue has been automatically closed after being inactive for 30 days. If you require further assistance please reopen the issue with more details or talk to us on discord

Been having similar issues to this with macOS as the docker host. Sometimes lancache-dns works, sometimes it can't resolve GitHub.com and sometimes it does initially then stops after some time.

I tried with 1.1.1.1 and 8.8.8.8 separately which didn't work but now the combination of "1.1.1.1; 1.0.0.1; 8.8.8.8; 8.8.4.4" seems to have done the trick thanks @Atomis70