Ubuntu / Steam Cache help

Discussion in 'Programming & Software Development' started by Gooliez, Oct 31, 2018.

  1. Gooliez

    Gooliez Member

    Joined:
    Mar 25, 2004
    Messages:
    422
    Location:
    Nw Coast, Tasmania
    Hi guys i've been racking my brain with creating a steam cache server for the last couple fo days and having absolutely no luck

    i have NEVER used ubuntu before so please keep explanations as simple as possible for me thanks.


    i've been following this guide to a tea, but have had things not showing up during the checks.


    here's a list of all the commands i've done

    • sudo apt install nfs-common
    • sudo apt-get install curl
    • sudo curl -sSL https://get.docker.com/ | sh

    • sudo mkdir -p /srv/steamcache/data/
    • sudo chmod -R 777 /srv/steamcache/data

    • sudo vi etc/network/interfaces

    • -------interfaces file----------
    • auto lo
    • iface lo inet loopback

    • auto eth0
    • iface eth0 inet static
    • address 10.1.1.78
    • netmask 255.255.255.0
    • gateway 10.1.1.1
    • dnsnameservers 8.8.8.8
    • ----------------------------------

    • sudo docker run --name steamcache --restart=always -d -v /srv/steamcache/data:/data/cache -p 80:80 steamcache/steamcache:latest

    • sudo docker run --name steamcache-dns -p 10.1.1.78:53:53 -e STEAMCACHE_IP=$STEAMCACHE_IP steamcache/steamcache-dns

    • sudo docker ps

    • sudo docker exec steamcache /scripts/watchlog.sh

    so here's when i get stuck.
    everything works great till i get to the interfaces file, cause i've tried this multiple times when i type the command "sudo vi etc/network/interfaces" it shows an error saying there is a copy open or stuff, so i ok and edit the file again. save it, reopen and the file is blank everytime. with the error show up each time i open it. i've deleted all the files in the "var / tmp" directory ( had to sudo SU to delete them) and run again and it creates yet another file in that directory and still comes up with the error.

    -------------------------
    E325: ATTENTION
    Found a swap file by the name "/var/tmp/interfaces.swp"
    owned by: root dated: Wed Oct 31 13:35:19 2018
    file name: etc/network/interfaces
    modified: YES
    user name: root host name: Steamserver
    process ID: 5659
    While opening file "etc/network/interfaces"

    (1) Another program may be editing the same file. If this is the case,
    be careful not to end up with two different instances of the same
    file when making changes. Quit, or continue with caution.
    (2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r etc/network/interfaces"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/var/tmp/interfaces.swp"
    to avoid this message.
    -----------------------------

    after this section i make the steamcache and steamcache-dns files and it automatically downloads the files. ( so that seems to be done right )
    do the "docker ps" and it always shows only the steamcache active and not the dns one.

    i've read pages and pages of error helps and it still only shows the 1, is this due to the interfaces file issues ?

    my network ip address is 10.1.1.78 for the server i'm setting up, gateway is 10.1.1.1

    hopefully fresh eyes with someone know what the hell they are doing would be a great start

    thanks !

    Edit: i'm also happy to completly reinstall ubuntu if it's going to make life easier
     
    Last edited: Oct 31, 2018
  2. elh9

    elh9 Member

    Joined:
    Feb 28, 2016
    Messages:
    96
    Location:
    Perth NOR
    Could try editing the interfaces with the Network Manager
    nm-connection-editor in terminal will open it.
     
  3. OP
    OP
    Gooliez

    Gooliez Member

    Joined:
    Mar 25, 2004
    Messages:
    422
    Location:
    Nw Coast, Tasmania
    thanks. will give that a try
     
  4. OP
    OP
    Gooliez

    Gooliez Member

    Joined:
    Mar 25, 2004
    Messages:
    422
    Location:
    Nw Coast, Tasmania
    no luck
     
  5. miicah

    miicah Member

    Joined:
    Jun 3, 2010
    Messages:
    5,558
    Location:
    Brisbane, QLD
    Are you sure you were supposed to start/edit the docker containers BEFORE setting up the network interfaces?

    If I was guessing you are trying to edit the interfaces file after the containers have booted, which docker doesn't like; it has to create a virtual network interface to allow the containers to access the internet.
     
    Gooliez likes this.
  6. OP
    OP
    Gooliez

    Gooliez Member

    Joined:
    Mar 25, 2004
    Messages:
    422
    Location:
    Nw Coast, Tasmania
    i've followed everything in the order that it shows in the video, the ones i've listed here arent exactly in order.
    but yeah, it sets up the network first then the containers.
     

Share This Page