Hello all!
I am trying to figure out why my Transmission docker image does not upload what it is seeding. This might turn out a a large post as I will try to give as much details as possible.
I am using a Ubuntu 18 virtual machine. I use opentracker with it’s default config.
this section of my docker-compose file is about the tracker and transmission images. The other part if for my Flask app and Nginx containers
tracker:
build:
dockerfile: compose/opentracker/Dockerfile
context: .
ports:
- 6969:6969
- 6969:6969/udp
volumes:
- ~/api_file_server/opentracker:/etc/opentracker
hostname: tracker
container_name: tracker
transmission:
build:
dockerfile: compose/transmission/Dockerfile
context: .
container_name: transmission
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Bucharest
- TRANSMISSION_WEB_HOME=/combustion-release/ #optional
volumes:
- ~/api_file_server/converted:/downloads
- ~/api_file_server/converted:/watch
ports:
- 9091:9091
- 51413:51413
- 51413:51413/udp
restart: unless-stopped
hostname: transmission
In ~/api_file_server/converted
I have my files that I will like to seed with Transmission so that I can download then on other devices on my network.
Transmission is configured to be quite permissive at this point and the downloads folder is set where my files exist so when the torrent is added it’s sent directly into seeding.
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "/downloads",
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/downloads/incomplete",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 200,
"peer-limit-per-torrent": 50,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": true,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": false,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-host-whitelist": "*",
"rpc-host-whitelist-enabled": true,
"rpc-password": "{1ddd3f1f6a71d655cde7767242a23a575b44c909n5YuRT.f",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "",
"rpc-whitelist": "*",
"rpc-whitelist-enabled": false,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 2,
"upload-slots-per-torrent": 14,
"utp-enabled": true,
"watch-dir": "/watch",
"watch-dir-enabled": true
}
I create the torrent using python, point it to the docker tracker announce (both docker network and host network) and then add it to transmission with a POST request.
class BoxTorrent:
ANNOUNCE_URLS = ['http://tracker:6969/announce/', 'udp://tracker:6969/announce/', 'http://0.0.0.0:6969/announce/']
TORRENT_PATH = 'converted/'
TRANSMISSION_HOST = 'transmission'
TRANSMISSION_PORT = 9091
TRANSMISSION_HOST_RPC = 'http://{}:{}/transmission/rpc'.format(TRANSMISSION_HOST, TRANSMISSION_PORT)
def __init__(self, uid):
self.torrent = Torrent.create_from(self.TORRENT_PATH + uid + '.mp4')
self.torrent.announce_urls = self.ANNOUNCE_URLS
self.torrent_file = self.TORRENT_PATH + uid + '.torrent'
self.torrent.to_file(self.torrent_file)
self.magnet = self.torrent.get_magnet()
@property
def get_magnet(self):
return self.torrent.get_magnet()
def addtorrent(self):
with open(self.torrent_file, 'rb') as f:
metainfo = b64encode(f.read())
h = Http(".cache")
resp, content = h.request(self.TRANSMISSION_HOST_RPC, "GET")
headers = { "X-Transmission-Session-Id": resp['x-transmission-session-id'] }
body = dumps({'method': 'torrent-add', 'arguments': {'metainfo': metainfo}})
conn = HTTPConnection(host=self.TRANSMISSION_HOST, port=self.TRANSMISSION_PORT)
conn.request('POST', '/transmission/rpc', body, headers)
r1 = conn.getresponse()
conn.close()
The result is that the torrent is added to transmission, transmission sees the tracker and starts seeding
I open the torrent in Transmission GUI(in host OS) and hope it will start downloading.
Tracker seems to monitor the activity
But I get no download in Transmission GUI. where did I mess up?