diff --git a/10-systems/hosts/transmission.md b/10-systems/hosts/transmission.md index 30aecb0..e72db98 100644 --- a/10-systems/hosts/transmission.md +++ b/10-systems/hosts/transmission.md @@ -19,15 +19,16 @@ ## Services - **Flood** (web UI for the torrent client): `node /usr/bin/flood --host 0.0.0.0 --port 3000 --config /home/ubuntu/.flood/config.json --allowedpath /home/ubuntu/jf_storage`. Public URL: https://transmission.gnexus.space (nginx on internal-proxy-vps `.226` → `http://192.168.1.154:3000`). -- **transmission-daemon 2.94**: RPC on `127.0.0.1:9091`, path `/transmission/rpc`, rpc-version 15. Credentials are in the Flood config (`torrentClient` section of `/home/ubuntu/.flood/config.json`): user `gmikcon`. +- **transmission-daemon 2.94**: RPC on `127.0.0.1:9091`, path `/transmission/rpc`, rpc-version 15. Credentials are in the Flood config (`torrentClient` section of `/home/ubuntu/.flood/config.json`): user `gmikcon`, password `mr.robot` (JSONC config — comments break json.load, parse with grep). - Gotcha: Flood config points the client at `http://192.168.68.210:9091`, which does not respond from the VM; the RPC is reachable on `127.0.0.1:9091`. Flood itself works. +- RPC requires BOTH basic-auth (gmikcon/mr.robot) and the X-Transmission-Session-Id header. A cached session id in `/tmp/.tr_rpc_session` can go stale or get poisoned by bad parsing (awk grabbing HTML) — validate it matches `[A-Za-z0-9]{20,}` or just delete the cache file and re-fetch. ## Storage (NFS mounts on the VM) | Mount on VM | NFS export | Free space (2026-09-30) | Contents | | --- | --- | --- | --- | | `/home/ubuntu/jf_storage/firstraid5_storage` | `192.168.1.130:/mnt/firstraid5` | 71 GB (97% used) — was 100% full on 2026-09-29, do NOT use for new downloads | films, games, music, serials | -| `/home/ubuntu/jf_storage/secraid5_storage` | `192.168.1.130:/mnt/secraid5/jellyfin_storage` | ~198 GB (91% used) | films, serials | +| `/home/ubuntu/jf_storage/secraid5_storage` | `192.168.1.130:/mnt/secraid5/jellyfin_storage` | ~188 GB (91% used) | films, serials | | `/home/ubuntu/jf_storage/NetTera8` | `192.168.1.131:/mnt/NetTera8` | ~250 GB (97% used) | films, serials | Default transmission `download-dir`: `/home/ubuntu/jf_storage/secraid5_storage`. Flood diskScanPaths also list `NetTera1` and `eserv_storage`, which are not currently mounted. @@ -46,6 +47,16 @@ Adding a rutor.info **magnet** via `torrent-add` (filename=magnet:...) can stall forever: metadata never arrives, `peersConnected` stays 0 even though trackers report peers. Root cause observed: the swarm peers were unreachable from the VM (TCP connect to every peer timed out/refused — NAT deadlock, both sides behind NAT), and the magnet carried only 2 trackers. Fix that worked: download the **.torrent file directly on the VM** (`curl -o /tmp/x.torrent https://d.rutor.info/download/` — VM has working internet) and add it via `metainfo` (base64). Note: re-adding the same info_hash while the magnet torrent exists returns `torrent-duplicate` and does NOT refresh metadata — remove the stalled torrent first (`torrent-remove`, `delete-local-data: false`), then add the .torrent. Extra public trackers can be attached with `torrent-set` `trackerAdd`. +### Gotcha: CGNAT — inbound peer connections are impossible (diagnosed 2026-10-01) + +The ISP hands out **private-range WAN addresses** (pfSense WAN `re3` = `172.32.2.78/24`, RFC1918) — the home network is behind carrier-grade NAT. Consequences verified live: + +- Transmission `port-test` returns `port-is-open: false` even with a fixed peer port (51413, set via `session-set` on 2026-10-01; `peer-port-random-on-start` disabled), VM firewall open (iptables INPUT policy ACCEPT, ufw inactive), and the port listening on 0.0.0.0. +- A pfSense port-forward would NOT help — there is no public IP to forward to. Do not waste time on port-forwarding for torrent connectivity. +- Torrents only download via **outbound connections to connectable peers** (seedboxes). Swarms dominated by NATed peers stall at 0 bytes even when trackers report 4-6 seeds. +- Practical pattern: popular releases with seedbox-heavy swarms download fine in bursts (x264 New-Team release pulled ~6 GB in the first hour on 2026-10-01), then stall when the connectable seed leaves. `torrent-reannounce` every ~5 min + DHT + PEX re-catches connectable seeds when they return. +- Escape hatches if a download must finish fast: (a) any host with a public IP (external VPS) downloads the torrent and the file is rsynced/scp-pulled to the VM — blocked on 2026-10-01 because SSH credentials for the new VPS IP are not in gnexus-creds; (b) direct HTTP sources (archive.org, cloud.mail.ru public links) — plain HTTPS works fine through CGNAT. + ## Helper script: add-torrent.py (2026-09-30) Deployed at `/home/ubuntu/bin/add-torrent.py` on the VM (master copy in Navi workspace, `workspace/add-torrent.py`). Wraps the whole manual cycle into one command; prefer it over hand-rolled RPC calls. @@ -81,4 +92,4 @@ - 2026-09-30: torrent id 9 `The Gentlemen (Season 2) WEB-DL 1080p` (rutor.info 1107212, WEB-DL 1080p, dub Red Head Sound, 8 episodes, 24.69 GB) added to `/home/ubuntu/jf_storage/NetTera8/serials`, downloading normally (~0.5 MB/s at start, 52 seeds). Season 1 of the same show already lives on the same mount. - 2026-09-30: torrent id 12 `Кобра.Cobra.1986.UHD.BDRip-HEVC.1080p.mkv` (rutor.info 780564, UHD BDRip-HEVC 1080p from RIPS CLUB, Arrow Films remaster, D/P/P2/A/L1, 10.32 GB) added to `/home/ubuntu/jf_storage/secraid5_storage/films`, downloading (~1.2 MB/s, 3 peers). First attempt with rutor 1043082 (BDRip 1080p x264, 12.32 GB) stalled at 0 peers — magnet-only add + dead swarm (see gotcha above); removed. - 2026-09-30: helper script `add-torrent.py` deployed to `/home/ubuntu/bin/` on the VM and tested (see section above). -- 2026-10-01: torrent id 13 `Deepwater.Horizon.2016.BDRip.1080p.(qqss44).mkv` (rutor.info 540676, BDRip 1080p x264 New-Team & qqss44, лицензия-дубляж, 7.74 GiB) added to `/home/ubuntu/jf_storage/secraid5_storage/films` via `add-torrent.py` with the rutor page URL; downloading (~2.5 MB/s, 2 peers at start, ETA ~1h). Fallback if it stalls: rutor.info 853488 (BDRip-HEVC 1080p HEVC-CLUB, 8.31 GB, 4 seeds). +- 2026-10-01: Deepwater Horizon (2016) download saga. Torrent id 13 (rutor 540676, BDRip 1080p x264 New-Team & qqss44, 7.74 GiB) downloaded ~6 GB in the first hour (~2.5 MB/s), then stalled at 79.67% with 0 peers when the connectable seed left; restart+reannounce did not revive it; removed with local data. Fallback id 14 (rutor 853488, BDRip-HEVC 1080p 10bit Spartanec, 8.31 GB) added — trickles (0.03%) through a single NATed peer. Re-added the x264 release as id 15 (same info_hash family, fresh start) — 0 peers, waiting for a connectable seed. A reannounce loop (`/tmp/dh_watch.sh`, every 5 min, log `/tmp/dh_watch.log`) runs on the VM for ids 14+15. Peer port fixed at 51413 (see CGNAT gotcha). External-VPS escape hatch blocked: old IP 194.61.53.43 dead (OpenVPN tunnel on .226 inactive, hostname NXDOMAIN), gnexus.space now resolves to 51.83.131.93 (OVH) but no SSH credentials for it exist in gnexus-creds — ask the owner.