7thSon

Members
  • Posts

    38
  • Joined

  • Last visited

Posts posted by 7thSon

  1. I'm trying to use the transmission script-torrent-done functionality to start another docker container from inside the transmission container.
    To do this I've mounted the /var/run/docker.sock, but there are permissions issues after that.

    My script is located in "/config/postproc.sh", and is run by the user "abc" presumably. I've tried setting the postproc script to print "whoami", but it shows up blank mostly, however I think once it did manage to print "abc" for some reason.

     

    These are the recurring errors I'm getting, the first one is obvious since /root/.docker/config.json doesn't even exist, the question is, what user is trying to access it, and why doesn't it exist?

    WARNING: Error loading config file: /root/.docker/config.json: stat /root/.docker/config.json: permission denied

    The second one is permission error for docker.sock, perhaps because "abc" isn't actually the user trying to access it?

    docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.38/containers/create?name=filebot: dial unix /var/run/docker.sock: connect: permission denied.

    So looking in /etc/passwd I can see that the abc users' home folder is /config. I installed bash and set the abc users shell to /bin/bash in my Dockerfile (below), and created this .bashrc in /config for abc to source:

    if [ -e /var/run/docker.sock ]; then 
        sudo chown abc:docker /var/run/docker.sock; 
    fi
    
    if [ -e /root/.docker/config.json ]; then 
        sudo chown abc:docker /root/.docker/config.json; 
    fi

     

    Dockerfile:

    FROM linuxserver/transmission:latest
    RUN apk update
    RUN apk add docker bash
    RUN usermod -a -G docker abc
    RUN chsh --shell /bin/bash abc


    What more do I need to get the docker socket to be available for the user running a script-torrent-done script?

  2. I'm having issues starting today with the transmission container running on my Synology NAS, something had happened in the past few days and I couldn't connect using transmission-remote-gui to port 9091 anymore. When I check the container activity with "docker logs -ft transmission" I see that it keeps looping over and over with some cron jobs:

     

    2018-04-16T22:26:00.118912370Z crond[230]: wakeup dt=60
    2018-04-16T22:26:00.119820664Z crond[230]: file root:
    2018-04-16T22:26:00.120240118Z crond[230]:  line run-parts /etc/periodic/15min
    2018-04-16T22:26:00.120578958Z crond[230]:  line run-parts /etc/periodic/hourly
    2018-04-16T22:26:00.120908051Z crond[230]:  line run-parts /etc/periodic/daily
    2018-04-16T22:26:00.121254684Z crond[230]:  line run-parts /etc/periodic/weekly
    2018-04-16T22:26:00.121692976Z crond[230]:  line run-parts /etc/periodic/monthly
    2018-04-16T22:26:00.122274140Z crond[230]:  line /config/blocklist-update.sh 2>&1
    2018-04-16T22:27:00.119934553Z crond[230]: wakeup dt=60
    2018-04-16T22:27:00.120979449Z crond[230]: file root:
    2018-04-16T22:27:00.121349029Z crond[230]:  line run-parts /etc/periodic/15min
    2018-04-16T22:27:00.121689309Z crond[230]:  line run-parts /etc/periodic/hourly
    2018-04-16T22:27:00.122074448Z crond[230]:  line run-parts /etc/periodic/daily
    2018-04-16T22:27:00.122412187Z crond[230]:  line run-parts /etc/periodic/weekly
    2018-04-16T22:27:00.122886813Z crond[230]:  line run-parts /etc/periodic/monthly
    2018-04-16T22:27:00.123194023Z crond[230]:  line /config/blocklist-update.sh 2>&1
    2018-04-16T22:28:00.120922269Z crond[230]: wakeup dt=60
    2018-04-16T22:28:00.121834883Z crond[230]: file root:
    2018-04-16T22:28:00.122234549Z crond[230]:  line run-parts /etc/periodic/15min
    2018-04-16T22:28:00.122546785Z crond[230]:  line run-parts /etc/periodic/hourly
    2018-04-16T22:28:00.122811917Z crond[230]:  line run-parts /etc/periodic/daily
    2018-04-16T22:28:00.123184936Z crond[230]:  line run-parts /etc/periodic/weekly
    2018-04-16T22:28:00.123513314Z crond[230]:  line run-parts /etc/periodic/monthly
    2018-04-16T22:28:00.123795709Z crond[230]:  line /config/blocklist-update.sh 2>&1
    2018-04-16T22:29:00.123897329Z crond[230]: wakeup dt=60
    2018-04-16T22:29:00.124822063Z crond[230]: file root:
    2018-04-16T22:29:00.125267840Z crond[230]:  line run-parts /etc/periodic/15min
    2018-04-16T22:29:00.125683464Z crond[230]:  line run-parts /etc/periodic/hourly
    2018-04-16T22:29:00.126120896Z crond[230]:  line run-parts /etc/periodic/daily
    2018-04-16T22:29:00.126486089Z crond[230]:  line run-parts /etc/periodic/weekly
    2018-04-16T22:29:00.126885788Z crond[230]:  line run-parts /etc/periodic/monthly
    2018-04-16T22:29:00.127262263Z crond[230]:  line /config/blocklist-update.sh 2>&1
    2018-04-16T22:30:00.125966011Z crond[230]: wakeup dt=60
    2018-04-16T22:30:00.127182959Z crond[230]: file root:
    2018-04-16T22:30:00.127579155Z crond[230]:  line run-parts /etc/periodic/15min
    2018-04-16T22:30:00.127943840Z crond[230]:  job: 0 run-parts /etc/periodic/15min
    2018-04-16T22:30:00.128167902Z crond[230]:  line run-parts /etc/periodic/hourly
    2018-04-16T22:30:00.128470224Z crond[230]:  line run-parts /etc/periodic/daily
    2018-04-16T22:30:00.128774032Z crond[230]:  line run-parts /etc/periodic/weekly
    2018-04-16T22:30:00.129120691Z crond[230]:  line run-parts /etc/periodic/monthly
    2018-04-16T22:30:00.129423172Z crond[230]:  line /config/blocklist-update.sh 2>&1
    2018-04-16T22:30:00.129726678Z crond[1148]: child running /bin/sh
    2018-04-16T22:30:00.129956405Z crond[230]: USER root pid 1148 cmd run-parts /etc/periodic/15min
    2018-04-16T22:30:10.128887516Z crond[230]: wakeup dt=10
    2018-04-16T22:31:00.129923726Z crond[230]: wakeup dt=50
    2018-04-16T22:31:00.131015858Z crond[230]: file root:
    2018-04-16T22:31:00.131366878Z crond[230]:  line run-parts /etc/periodic/15min
    2018-04-16T22:31:00.131534077Z crond[230]:  line run-parts /etc/periodic/hourly
    2018-04-16T22:31:00.131913003Z crond[230]:  line run-parts /etc/periodic/daily
    2018-04-16T22:31:00.132235543Z crond[230]:  line run-parts /etc/periodic/weekly
    2018-04-16T22:31:00.132560756Z crond[230]:  line run-parts /etc/periodic/monthly
    2018-04-16T22:31:00.132960474Z crond[230]:  line /config/blocklist-update.sh 2>&1
    2018-04-16T22:32:00.132896426Z crond[230]: wakeup dt=60
    2018-04-16T22:32:00.134140080Z crond[230]: file root:
    2018-04-16T22:32:00.134492799Z crond[230]:  line run-parts /etc/periodic/15min
    2018-04-16T22:32:00.134721947Z crond[230]:  line run-parts /etc/periodic/hourly
    2018-04-16T22:32:00.135106433Z crond[230]:  line run-parts /etc/periodic/daily
    2018-04-16T22:32:00.135405947Z crond[230]:  line run-parts /etc/periodic/weekly
    2018-04-16T22:32:00.135675820Z crond[230]:  line run-parts /etc/periodic/monthly
    2018-04-16T22:32:00.136016803Z crond[230]:  line /config/blocklist-update.sh 2>&1
    2018-04-16T22:33:00.134923640Z crond[230]: wakeup dt=60
    2018-04-16T22:33:00.135957225Z crond[230]: file root:
    2018-04-16T22:33:00.136361075Z crond[230]:  line run-parts /etc/periodic/15min
    2018-04-16T22:33:00.136682863Z crond[230]:  line run-parts /etc/periodic/hourly
    2018-04-16T22:33:00.137031869Z crond[230]:  line run-parts /etc/periodic/daily
    2018-04-16T22:33:00.137355044Z crond[230]:  line run-parts /etc/periodic/weekly
    2018-04-16T22:33:00.137653641Z crond[230]:  line run-parts /etc/periodic/monthly
    2018-04-16T22:33:00.137988072Z crond[230]:  line /config/blocklist-update.sh 2>&1

     

    Other than that all I get from the very start of the container launch is the below. The watch dir not having any space is peculiar, I have no idea why that is, the folder has permissions and theres definitely space left.

    2018-04-16T22:12:56.038035807Z -------------------------------------
    2018-04-16T22:12:56.038205625Z GID/UID
    2018-04-16T22:12:56.038315851Z -------------------------------------
    2018-04-16T22:12:56.039945533Z 
    2018-04-16T22:12:56.040247858Z User uid:    1024
    2018-04-16T22:12:56.040461942Z User gid:    100
    2018-04-16T22:12:56.040669955Z -------------------------------------
    2018-04-16T22:12:56.040922241Z 
    2018-04-16T22:12:56.046951854Z [cont-init.d] 10-adduser: exited 0.
    2018-04-16T22:12:56.047264525Z [cont-init.d] 20-config: executing... 
    2018-04-16T22:12:56.060947838Z [cont-init.d] 20-config: exited 0.
    2018-04-16T22:12:56.061185440Z [cont-init.d] done.
    2018-04-16T22:12:56.064945582Z [services.d] starting services
    2018-04-16T22:12:56.082927904Z [services.d] done.
    2018-04-16T22:12:56.085941752Z crond[230]: crond (busybox 1.27.2) started, log level 0
    2018-04-16T22:12:56.086303692Z crond[230]: user:root entry:*/15    *       *       *       *       run-parts /etc/periodic/15min
    2018-04-16T22:12:56.087930269Z crond[230]: user:root entry:0       *       *       *       *       run-parts /etc/periodic/hourly
    2018-04-16T22:12:56.088277033Z crond[230]: user:root entry:0       2       *       *       *       run-parts /etc/periodic/daily
    2018-04-16T22:12:56.088539751Z crond[230]: user:root entry:0       3       *       *       6       run-parts /etc/periodic/weekly
    2018-04-16T22:12:56.088765925Z crond[230]: user:root entry:0       5       1       *       *       run-parts /etc/periodic/monthly
    2018-04-16T22:12:56.089080773Z crond[230]: user:root entry:0 3 * * * /config/blocklist-update.sh 2>&1
    2018-04-16T22:12:59.978902938Z [2018-04-17 00:12:59.976] Transmission 2.93 (3c5870d4f5) started (session.c:740)
    2018-04-16T22:12:59.979630357Z [2018-04-17 00:12:59.977] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:971)
    2018-04-16T22:12:59.979832088Z [2018-04-17 00:12:59.977] RPC Server Serving RPC and Web requests on port 127.0.0.1:9091/transmission/ (rpc-server.c:1213)
    2018-04-16T22:12:59.980159973Z [2018-04-17 00:12:59.977] RPC Server Password required (rpc-server.c:1220)
    2018-04-16T22:12:59.980367358Z [2018-04-17 00:12:59.977] UDP Failed to set receive buffer: requested 4194304, got 425984 (tr-udp.c:84)
    2018-04-16T22:12:59.980512177Z [2018-04-17 00:12:59.977] UDP Please add the line "net.core.rmem_max = 4194304" to /etc/sysctl.conf (tr-udp.c:89)
    2018-04-16T22:12:59.980663913Z [2018-04-17 00:12:59.977] UDP Failed to set send buffer: requested 1048576, got 425984 (tr-udp.c:95)
    2018-04-16T22:12:59.980796676Z [2018-04-17 00:12:59.977] UDP Please add the line "net.core.wmem_max = 1048576" to /etc/sysctl.conf (tr-udp.c:100)
    2018-04-16T22:12:59.981037827Z [2018-04-17 00:12:59.977] DHT Reusing old id (tr-dht.c:307)
    2018-04-16T22:12:59.981287222Z [2018-04-17 00:12:59.977] DHT Bootstrapping from 148 IPv4 nodes (tr-dht.c:156)
    2018-04-16T22:12:59.981463145Z [2018-04-17 00:12:59.977] Using settings from "/config" (daemon.c:528)
    2018-04-16T22:12:59.981591487Z [2018-04-17 00:12:59.977] Saved "/config/settings.json" (variant.c:1266)
    2018-04-16T22:12:59.981725141Z [2018-04-17 00:12:59.977] Saved pidfile "/transmission.pid" (daemon.c:543)
    2018-04-16T22:12:59.981886441Z [2018-04-17 00:12:59.977] transmission-daemon requiring authentication (daemon.c:554)
    2018-04-16T22:12:59.982121182Z [2018-04-17 00:12:59.977] Watching "/watch" for new .torrent files (daemon.c:573)
    2018-04-16T22:12:59.982522411Z [2018-04-17 00:12:59.977] watchdir:inotify Failed to setup watchdir "/watch": No space left on device (28) (watchdir-inotify.c:176)
    2018-04-16T22:12:59.982740871Z [2018-04-17 00:12:59.977] Loaded __ torrents (session.c:2034)
    2018-04-16T22:12:59.982918527Z [2018-04-17 00:12:59.977] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:70)
    2018-04-16T22:12:59.983168351Z [2018-04-17 00:12:59.977] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:70)

    My docker settings in JSON format from the NAS:

    {
       "cap_add" : [],
       "cap_drop" : [],
       "cmd" : "",
       "cpu_priority" : 50,
       "devices" : null,
       "enable_publish_all_ports" : false,
       "enable_restart_policy" : false,
       "enabled" : false,
       "entrypoint_default" : "/init",
       "env_variables" : [
          {
             "key" : "TRANSMISSION_WATCH_DIR_ENABLED",
    		 "value" : "false"
    	  },
          {
             "key" : "PATH",
             "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
          },
          {
             "key" : "PS1",
             "value" : "$(whoami)@$(hostname):$(pwd)$ "
          },
          {
             "key" : "HOME",
             "value" : "/root"
          },
          {
             "key" : "TERM",
             "value" : "xterm"
          },
          {
             "key" : "TZ",
             "value" : "Europe/Berlin"
          },
          {
             "key" : "PGID",
             "value" : "100"
          },
          {
             "key" : "PUID",
             "value" : "1024"
          }
       ],
       "exporting" : false,
       "id" : "77b1d0b0c044071360b962d48ac8471f1c15c4c93ca0e97eb7cdeea43dd2ff37",
       "image" : "linuxserver/transmission:latest",
       "is_ddsm" : false,
       "is_package" : false,
       "links" : [],
       "memory_limit" : 0,
       "name" : "transmission",
       "network" : [
          {
             "driver" : "bridge",
             "name" : "bridge"
          }
       ],
       "network_mode" : "bridge",
       "port_bindings" : [
          {
             "container_port" : 8888,
             "host_port" : 0,
             "type" : "tcp"
          },
          {
             "container_port" : 9091,
             "host_port" : 0,
             "type" : "tcp"
          }
       ],
       "privileged" : false,
       "shortcut" : {
          "enable_shortcut" : true,
          "enable_status_page" : false,
          "enable_web_page" : true,
          "web_page_url" : "http://192.168.1.100:9091"
       },
       "ulimits" : null,
       "use_host_network" : false,
       "volume_bindings" : [
          {
             "host_volume_file" : "/docker/watch",
             "mount_point" : "/watch",
             "type" : "rw"
          },
          {
             "host_volume_file" : "/docker/incomplete",
             "mount_point" : "/incomplete",
             "type" : "rw"
          },
          {
             "host_volume_file" : "/docker/downloads",
             "mount_point" : "/downloads",
             "type" : "rw"
          },
          {
             "host_volume_file" : "/homes/admin/.config/transmission",
             "mount_point" : "/config",
             "type" : "rw"
          },
          {
             "host_volume_file" : "/scripts/filebot",
             "mount_point" : "/volume1/scripts/filebot",
             "type" : "rw"
          }
       ],
       "volumes_from" : null
    }

     

    Any ideas what to try next? I can't seem to figure out why the cron job just loops and loops,

  3. 18 hours ago, Gog said:

    1- the incoming connection port is a setting that comes from your VPN provider. Read their doc to see what range they let though (if any, some don't). Opening ports on your router doesn't help.

    2-check the file permissions in your appdata, the deluge config file may be read only

     

    Got the port forwarding working perfectly, thanks for that.

     

    The file permissions are still troubling me, I'm checking the files in /config in the container, but all files are read/write enabled except perms.txt and auth.
    What file(s) contains the settings from the GUI/webUI (they should be the same, since if I enable a plugin in either one, it immediately show up in the other)?

  4. Two questions:

     

    1. In my Deluge GUI client I get an error notification in the bottom status bar "No incoming connections!", after connecting to the docker deluge daemon running on the same machine. The "test active port"  test for incoming ports in the deluge GUI client settings also results in a yellow exclamation mark, the port here set to 58946. I've opened port 58946 for both TCP and UDP in my router, so is this really an issue, or is it a false indicator?

     

    2. How can I make my deluge plugins persistently activated between container launches and shutdowns (I always shut down the container when I'm not using deluge), I use LabelPlus, but every time the container is restarted the plug-in is disabled.

     

    Cheers

  5. 1 hour ago, wgstarks said:

    You need to adjust your connection manager settings.

    14yb9uc.jpg

    I have that setting checked already, just like in the picture, it doesn't auto-connect.

     

    It actually does, but I had to give the container some time in my launch script to start up, then launch the Deluge GUI, and now it works.

  6. 2 hours ago, 7thSon said:

    admin gives me "username does not exist" error, also tried my local username and root, neither worked.

     

    I'm trying that as we speak, the ip should be 127.0.0.1 if the container is running on the same machine still, right? (I also got the container IP from "docker inspect delugevpn", but if I use that IP the GUI client greys out the "Connect" button in the connection manager window).

    I seem unsuccessful to log in though, as stated above, I have no idea what the username should be.

     

    If I have deluge installed on the same machine I'm running the container on, and has an auth file, is that going to interfere with the GUI client?

     

    Okay so I got my deluge desktop GUI client working, I had to edit the /config/auth file to read admin:deluge:10, those were not the standard values in my case.

    I have one question left;

    • I have my downloads in a folder /mnt/disk1/downloads locally, but in the delugevpn container the mounted volume path to that folder is /downloads.
      This means that when I go into the desktop GUI client, I can't use "Open folder" function, or double click on a file to open, because I get a path error saying "/downloads is not found", since it's in the container. Is there a nice way to fix this, or do I need to set the path in the container to "/mnt/disk1/downloads"  too?
  7. 13 minutes ago, wgstarks said:

    For me it was admin@<IP>:58846

    admin gives me "username does not exist" error, also tried my local username and root, neither worked.

     

    11 minutes ago, joelstitch said:

    You have to add the deluge VPN daemon on the connection settings on the desktop deluge. So add the up of the container and port 58846

    Sent from my SM-N950U using Tapatalk
     

    I'm trying that as we speak, the ip should be 127.0.0.1 if the container is running on the same machine still, right? (I also got the container IP from "docker inspect delugevpn", but if I use that IP the GUI client greys out the "Connect" button in the connection manager window).

    I seem unsuccessful to log in though, as stated above, I have no idea what the username should be.

     

    If I have deluge installed on the same machine I'm running the container on, and has an auth file, is that going to interfere with the GUI client?

  8. 6 minutes ago, joelstitch said:

    The default password is deluge or deluged

     

    Yes I read that, but I was asking about the username.

     

    EDIT: Ahhhhh crap... I just tried entering the webUI from Opera instead of Pale Moon, and now I can connect with just the password (that prompt didn't even show in Pale Moon!). Ridiculous. Oh well, now I'll see what I can do to get every torrent out of the "error" state.

     

    How can I connect from the deluge desktop GUI client to the container daemon?

  9. When I get to the Deluge WebUI and try to add a connection via the connection manager nothing happens when I click "Add".

    So first off - what is the username to be inserted in the the deluge webUI? And what could be the problem when the "Add" button does nothing, and the lower left corner of the webUI says "Not Connected"? Is the daemon not running?

     

    These are basic questions, but I can't find any mention in the documentation, and the forum search function here is broken.

  10. I'm trying to get this docker to work but I've hit a snag and I also have a special issue to ask about as well, so here goes:

    • I've successfully installed docker (I never used it before)
    • and the deluge-vpn docker container,
    • and I can access the web ui via http://localhost:8112
    • but it says "Not connected" in the lower left corner. In this case I've disabled both VPN and Privoxy, so they're not interfering I guess? The connection manager in the web UI is blank, do I need to add a daemon address there pointing to something in the container?

     

    My config at the moment:

     

    docker run -d \
        --cap-add=NET_ADMIN \
        -p 8112:8112 \
        -p 8118:8118 \
        -p 58846:58846 \
        -p 58946:58946 \
        --name=delugevpn \
        -v /apps/docker/deluge/data:/data \
        -v /apps/docker/deluge/config:/config \
        -v /etc/localtime:/etc/localtime:ro \
        -e VPN_ENABLED=no \
        -e VPN_USER=username \
        -e VPN_PASS=password \
        -e VPN_PROV=custom \
        -e VPN_OPTIONS='' \
        -e STRICT_PORT_FORWARD=no \
        -e ENABLE_PRIVOXY=no \
        -e LAN_NETWORK=192.168.1.0/24 \
        -e NAME_SERVERS=xxx.xxx.xxx.xxx  \
        -e DEBUG=false \
        -e UMASK=000 \
        -e PUID=1000 \
        -e PGID=100 \
        binhex/arch-delugevpn

     

    My other issue is that I've used Deluge on my linux system without docker previously, and I'm dual booting Windows 10 from another disk. So I've made a script that allows me to launch deluge with the same state file from both OS's; i.e. a script that rewrites the paths in the torrents.state file since the path from linux is something like /mnt/downloads/... and in Windows it's D:\downloads\...

    How can I use the same principal with the docker container? What I'm thinking is I should maybe do something like

    1. Create a volume in docker pointing to the downloads folder (/mnt/downloads), something like /downloads inside the container
    2. Make sure that deluge in docker also points to the torrents.state file  on my Windows disk (i.e. create the volume /config/state in the container pointing to the folder /mnt/windows/deluge/state)
    3. Run a script on the torrents.state in the container, replacing the paths to point to the /downloads folder in the container

    Is this a feasible solution? Happy to get any help, first off just getting everything up and running though