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

Multiple Steam IPS not working

dark-swordsman opened this issue · comments

Issue Description:

Trying to assign multiple IPs to STEAMCACHE_IP is failing.

Docker Run Command:

#!/bin/bash

HOST_IP="10.1.0.135"
STEAM_IPS="10.1.0.136 10.1.0.137 10.1.0.138 10.1.0.139 10.1.0.140 10.1.0.141 10.1.0.142 10.1.0.143 10.1.0.144 10.1.0.145"

sudo docker run --restart unless-stopped --name steamcache-dns --detach -p 53:53/udp -e USE_GENERIC_CACHE=true -e UPSTREAM_DNS=8.8.8.8 -e LANCACHE_IP=$HOST_IP -e STEAMCACHE_IP=$STEAM_IPS steamcache/steamcache-dns:latest

Docker Container Output:

mon@mon:~$ ./sdns_install.sh
Unable to find image '10.1.0.137:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:45761->[::1]:53: read: connection refused.
See 'docker run --help'.

Pretty sure this is your shell failing to tokenise. I think you need to requote $STEAM_IPS

sudo docker run --restart unless-stopped --name steamcache-dns --detach -p 53:53/udp -e USE_GENERIC_CACHE=true -e UPSTREAM_DNS=8.8.8.8 -e LANCACHE_IP="${HOST_IP}" -e STEAMCACHE_IP="${STEAM_IPS}" steamcache/steamcache-dns:latest

So I tried it with both "${STEAM_IPS}" and

`STEAM_IPS`

but neither of them seem to work.

The output doesn't yell about "Unable to find image..." anymore:

mon@mon:~$ ./monolithic_install.sh
1c8ac78bf19a934e67ec028b9259470769d13844ce6ec48f37c1ff9e4a5b4deb
817659f974857a6f8bebb33895a019248baf2a2682d04427759c8c5aad519253
435ff3e6d7196273ef9c4508cdc69a0ed0b3f0f90da09537007f74b1e4d84122
steamcache-dns running on: 10.1.0.135
lancache running on: 10.1.0.136
steamcache backup IPS: 10.1.0.137 10.1.0.138 10.1.0.139 10.1.0.140 10.1.0.141 10.1.0.142 10.1.0.143 10.1.0.144 10.1.0.145
mon@mon:~$ ping google.com
ping: google.com: Temporary failure in name resolution

However, it still doesn't work. I try to peek into the container and it doesn't work:

mon@mon:~$ ./peek.sh steamcache-dns
Error response from daemon: Container 1c8ac78bf19a934e67ec028b9259470769d13844ce6ec48f37c1ff9e4a5b4deb is restarting, wait until the container is running
mon@mon:~$ ./peek.sh lancache
OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caused "exec: \"/bin/\": permission denied": unknown
mon@mon:~$ ./peek.sh steamcache-dns
Error response from daemon: Container 1c8ac78bf19a934e67ec028b9259470769d13844ce6ec48f37c1ff9e4a5b4deb is restarting, wait until the container is running

The peek script is just this:

#!/bin/bash
sudo docker exec -it $1 /bin/$2

I started creating a more complex installer script that can be used on a fresh ubuntu install with the only other requirement of updating your netplan or interface file. I did this because I think because I keep stopping and removing the containers and then reinstalling with the same name without purging the actual data, it's causing issues. I'm writing this script with the expectation to constantly use fresh Ubuntu installs.

In that script, I am currently getting the following error:

creating steamcache-dns...
docker: invalid reference format.
See 'docker run --help'.

Here is the command:

sudo docker run --restart unless-stopped --name steamcache-dns --detach -p $HOST_IP:53:53/udp -e USE_GENERIC_CACHE=true -e UPSTREAM_DNS=$DNS_IPS -e LANCACHE_IP=$LANCACHE_IP -e STEAMCACHE_IP=$STEAMCACHE_IPS steamcache/steamcache-dns:latest

Disregard that last issue, I just figured it out.

At the very least, the issue still stands that for some reason, the steamcache-dns is not listening on port 53. It can boot up just fine and the instance runs for a moment, but then it dies.

I was able to quickly get a report of ifconfig and saw this:

eth0      Link encap:Ethernet  HWaddr 02:42:AC:11:00:02
          inet addr:172.17.0.2  Bcast:172.17.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:516 (516.0 B)  TX bytes:0 (0.0 B)

Is this correct? Should it not be running on 10.1.0.135 (the host IP I set)?

Setting the -p manually like -p 10.1.0.135:53:53/udp instead of passing a variable like $HOST_IP:53:53/udp works, while the variable returns a weird error.

Now that I passed the IP manually, which is not preferred, the steamcache doesn't crash, but I still can't resolve outside addresses, there's nothing listening on port 53, and the address is still 172.17.0.2.

Was able to get a custom HOST IP to work by defining a variable as such:

BIND="${HOST_IP}:53:53/udp"

sudo docker run... -p $BIND...

Here is the htop of the steamcache. Is this right?
image

Still not seeing Port 53 bound on the host like it was when it was working.

Just seeing if there is any help I can get on this.

Hey there! Still looking for any input on this. It's still acting the same way, and it doesn't even seem to work with a single steam IP or no steam IP at all.

We haven't swapped over from our old lancache yet because that at least works, but it's slow for steam, and then kills itself when it gets full (i.e: doesn't purge games and then downloads at 0.5-1 MB/s).

We would like to use monolithic since it's the most promising, but this is hindering us.

Edit: Also, just to reiterate. The issue is that the steamcache-dns can not bind on port 53. It was originally because the Ubuntu dns service was running, and the first few times it worked, it was because I disabled that program. Now the steamcache-dns docker image doesn't bind to the host at all, and no traffic is sent on port 53, so all the traffic fails when it pings the lancache.

@dark-swordsman you haven't given us any log output from the containers to help diagnose!! What's the output of docker log steamcache-dns

Thanks for the reply. Sorry about the logs.

When I first looked, it gave me an error saying there was no semi-colon ; between the upstream dns ips, so I tried that. Now the log output is just this, except it seems to repeat this every 5 seconds:

     _                                      _                       _   
    | |                                    | |                     | |  
 ___| |_ ___  __ _ _ __ ___   ___ __ _  ___| |__   ___   _ __   ___| |_ 
/ __| __/ _ \/ _` | '_ ` _ \ / __/ _` |/ __| '_ \ / _ \ | '_ \ / _ \ __|
\__ \ ||  __/ (_| | | | | | | (_| (_| | (__| | | |  __/_| | | |  __/ |_ 
|___/\__\___|\__,_|_| |_| |_|\___\__,_|\___|_| |_|\___(_)_| |_|\___|\__|


configuring /etc/resolv.conf to stop from looping to ourself

Bootstrapping DNS from https://github.com/uklans/cache-domains

----------------------------------------------------------------------
Using Generic Server: 10.1.0.135
Make sure you are using a monolithic cache or load balancer at 10.1.0.135
----------------------------------------------------------------------

It also doesn't appear port 53 is being used still:

mon@mon:~$ ./mon listen
docker-pr  1032            root    4u  IPv6 33991644      0t0  TCP *:443 (LISTEN)
docker-pr  1167            root    4u  IPv6 33987584      0t0  TCP *:80 (LISTEN)
sshd       1308            root    3u  IPv4    13941      0t0  TCP *:22 (LISTEN)
sshd       1308            root    4u  IPv6    13943      0t0  TCP *:22 (LISTEN)
container 16771            root    7u  IPv4 33962101      0t0  TCP 127.0.0.1:38495 (LISTEN)
mon@mon:~$ 

I don't have the time at the moment to do any testing, but I will later today, probably in about 6-7 hours. Thanks again for replying.

Can you confirm your exact docker run command from your script? (Stick an echo in front of it, I'm less interested in the bash variables but need the actual command)

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