lancachenet / lancache-dns

DNS Docker service for a lancache.
https://hub.docker.com/r/lancachenet/lancache-dns/
MIT License
280 stars 73 forks source link

Container keeps restarting - Unable to resolve github.com #93

Closed itsRems closed 3 years ago

itsRems commented 5 years ago

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
VibroAxe commented 5 years ago

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

VibroAxe commented 5 years ago

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

itsRems commented 5 years ago

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
itsRems commented 5 years ago

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

Atomis70 commented 4 years ago

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.

stale[bot] commented 3 years ago

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.

stale[bot] commented 3 years ago

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

lprhodes commented 1 year ago

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