Transmission: I can't get it to work

I'm trying to install 'Transmission' on OpenWRT, but I can't get it to work :upside_down_face:
(FYI: Transmission works fine on PC's behind the router)

So I decided to install OpenWRT in a VM using this 'excellent' tutorial:

After installation I did the following

Logged in and updated OPKG lists

opkg update

Installed transmission packages

opkg install\
 transmission-cli-openssl\
 transmission-daemon-openssl\
 transmission-remote-openssl\
 transmission-web-control\
 luci-app-transmission

Enabled and started transmission

uci set transmission.@transmission[0].enabled='1'
uci commit transmission
service transmission enable
service transmission start

Looked at transmission ports

grep 'port ' /etc/config/transmission
	option peer_port '51413'
	option rpc_port '9091'

Verified if transmission ports where active

netstat -an|grep '0 0'
tcp        0      0 0.0.0.0:9091            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:51413           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
udp        0      0 0.0.0.0:51413           0.0.0.0:*

Configured the firewall to open 51413 on WAN port

uci add firewall rule
uci set firewall.@rule[-1].name='Allow-Transmission'
uci set firewall.@rule[-1].src='wan'
uci set firewall.@rule[-1].dest_port='51413'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall
service firewall restart

Logged into 'Web Control'
Opened a browser at http://192.168.56.2:9091 and added a torrent for the OpenWRT User Manual:
https://archive.org/download/manualzilla-id-5739861/manualzilla-id-5739861_archive.torrent

Result
Nothing is downloading, the torrent is stalling.

Troubleshooting
Port 51413 is open, tested it with nmap/netcat

Then I stopped the transmission service, then installed the 'sudo' package to impersonate the transmission user:

service transmission stop
opkg install sudo

then ran the transmission command with user 'transmission'

sudo -u transmission /usr/bin/transmission-daemon -f -g /tmp/transmission --log-debug

This is the output:

[2021-08-20 09:37:58.540] Transmission 3.00 (bb6b5a062e) started (session.c:769)
[2021-08-20 09:37:58.541] Couldn't read "/tmp/transmission/stats.benc": No such file or directory (utils.c:263)
[2021-08-20 09:37:58.541] Cache Maximum cache size set to 2.00 MiB (128 blocks) (cache.c:260)
[2021-08-20 09:37:58.542] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:956)
[2021-08-20 09:37:58.542] RPC Server Adding address to whitelist: 192.168.1.* (rpc-server.c:956)
[2021-08-20 09:37:58.543] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:956)
[2021-08-20 09:37:58.543] RPC Server Adding address to whitelist: 192.168.1.* (rpc-server.c:956)
[2021-08-20 09:37:58.543] RPC Server Serving RPC and Web requests on 0.0.0.0:9091/transmission/ (rpc-server.c:1244)
[2021-08-20 09:37:58.544] RPC Server Started listening on 0.0.0.0:9091 (rpc-server.c:834)
[2021-08-20 09:37:58.544] Bound socket 15 to port 51413 on 0.0.0.0 (net.c:462)
[2021-08-20 09:37:58.545] Bound socket 16 to port 51413 on :: (net.c:462)
[2021-08-20 09:37:58.545] DHT Initializing DHT (tr-dht.c:338)
[2021-08-20 09:37:58.545] Couldn't read "/tmp/transmission/dht.dat": No such file or directory (utils.c:263)
[2021-08-20 09:37:58.546] DHT Generating new id (tr-dht.c:389)
[2021-08-20 09:37:58.546] DHT DHT initialized (tr-dht.c:413)
[2021-08-20 09:37:58.547] Using settings from "/tmp/transmission" (daemon.c:646)
[2021-08-20 09:37:58.547] Saved "/tmp/transmission/settings.json" (variant.c:1221)
[2021-08-20 09:37:58.547] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:73)
[2021-08-20 09:37:58.548] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:73)
[2021-08-20 09:38:06.539] Port Forwarding (UPnP) UPNP_GetValidIGD failed (errno 0 - No error information) (upnp.c:208)
[2021-08-20 09:38:06.539] Port Forwarding (UPnP) If your router supports UPnP, please make sure UPnP is enabled! (upnp.c:209)
[2021-08-20 09:38:06.539] Port Forwarding Port Forwarding (port-forwarding.c:107)
[2021-08-20 09:38:06.539] Searching for web interface file "/var/run/transmission/.local/share/transmission/web/index.html" (platform.c:472)
[2021-08-20 09:38:06.539] Searching for web interface file "/usr/share/transmission/web/index.html" (platform.c:472)
[2021-08-20 09:38:34.540] web will verify tracker certs using envvar CURL_CA_BUNDLE: none (web.c:456)
[2021-08-20 09:38:34.540] web NB: this only works if you built against libcurl with openssl or gnutls, NOT nss (web.c:457)
[2021-08-20 09:38:34.541] web NB: invalid certs will show up as 'Could not connect to tracker' like many other errors (web.c:458)
[2021-08-20 09:38:36.533] Couldn't read "/tmp/transmission/resume/821bc5fde86e276c94c58a46b9be2f5a845e9c3b.resume": No such file or directory (utils.c:263)
[2021-08-20 09:38:36.533] manualzilla-id-5739861 Couldn't read "/tmp/transmission/resume/821bc5fde86e276c94c58a46b9be2f5a845e9c3b.resume": No such file or directory (resume.c:813)
[2021-08-20 09:38:36.533] Couldn't read "/tmp/transmission/resume/manualzilla-id-5739861.821bc5fde86e276c.resume": No such file or directory (utils.c:263)
[2021-08-20 09:38:36.533] manualzilla-id-5739861 Couldn't read "/tmp/transmission/resume/manualzilla-id-5739861.821bc5fde86e276c.resume" either: No such file or directory (resume.c:820)
[2021-08-20 09:38:36.533] Saved "/tmp/transmission/torrents/821bc5fde86e276c94c58a46b9be2f5a845e9c3b.torrent" (variant.c:1221)
[2021-08-20 09:38:36.533] manualzilla-id-5739861 Queued for verification (verify.c:272)
[2021-08-20 09:38:36.533] manualzilla-id-5739861 Verifying torrent (verify.c:220)
[2021-08-20 09:38:36.533] manualzilla-id-5739861 verifying torrent... (verify.c:52)
[2021-08-20 09:38:36.534] manualzilla-id-5739861 Verification is done. It took 0 seconds to verify 38147368 bytes (38147368 bytes per second) (verify.c:162)
[2021-08-20 09:38:37.535] manualzilla-id-5739861 Announcing to tracker (announcer.c:1723)
[2021-08-20 09:38:37.535] manualzilla-id-5739861 Announcing to tracker (announcer.c:1723)
[2021-08-20 09:38:45.539] manualzilla-id-5739861 Got 2 peers from tracker (torrent.c:604)
[2021-08-20 09:38:45.539] manualzilla-id-5739861 Announce response contained scrape info; rescheduling next scrape to 1800 seconds from now. (announcer.c:1248)
[2021-08-20 09:38:47.541] DHT Attempting bootstrap from dht.transmissionbt.com (tr-dht.c:299)
[2021-08-20 09:38:50.534] manualzilla-id-5739861 Tracker gave HTTP response code 0 (No Response) (announcer.c:1085)
[2021-08-20 09:38:50.535] manualzilla-id-5739861 Retrying announce in 20 seconds. (announcer.c:1094)
[2021-08-20 09:38:52.539] manualzilla-id-5739861 IPv4 DHT not ready (broken, 0 nodes) (tr-dht.c:744)
[2021-08-20 09:39:01.542] manualzilla-id-5739861 IPv4 DHT not ready (broken, 0 nodes) (tr-dht.c:744)
[2021-08-20 09:39:10.541] manualzilla-id-5739861 IPv4 DHT not ready (broken, 1 nodes) (tr-dht.c:744)
[2021-08-20 09:39:11.535] manualzilla-id-5739861 Announcing to tracker (announcer.c:1723)
[2021-08-20 09:39:17.533] manualzilla-id-5739861 Got 2 peers from tracker (torrent.c:604)
[2021-08-20 09:39:17.533] manualzilla-id-5739861 Announce response contained scrape info; rescheduling next scrape to 1800 seconds from now. (announcer.c:1248)
[2021-08-20 09:39:19.535] manualzilla-id-5739861 IPv4 DHT not ready (broken, 2 nodes) (tr-dht.c:744)
[2021-08-20 09:39:24.541] manualzilla-id-5739861 IPv4 DHT not ready (broken, 4 nodes) (tr-dht.c:744)

What am I missing or doing wrong ?

1 Like

if you ran transmission-daemon with the same params, as root, the files (and dirs) will be owned by root, and your non-root user will probably not be able to read/write them.

I'd do (as root) a rm -rf /tmp/transmission/ and retry.

I ran it with sudo as user 'transmission', its not finding the file because it does not exist.

[2021-08-20 09:37:58.545] Couldn't read "/tmp/transmission/dht.dat": No such file or directory (utils.c:263)
drwxr-xr-x    7 transmis transmis       180 Aug 20 09:39 /tmp/transmission
-rw-------    1 transmis transmis      2333 Aug 20 09:39 /tmp/transmission/settings.json
drwxr-xr-x    2 transmis transmis        40 Aug 20 09:35 /tmp/transmission/incomplete
drwxr-xr-x    2 transmis transmis        40 Aug 20 09:35 /tmp/transmission/done
-rw-r--r--    1 transmis transmis         0 Aug 20 09:35 /tmp/transmission/stats.json
drwxr-xr-x    2 transmis transmis        40 Aug 20 09:35 /tmp/transmission/blocklists
drwxr-xr-x    2 transmis transmis        60 Aug 20 09:38 /tmp/transmission/torrents
-rw-------    1 transmis transmis      4898 Aug 20 09:38 /tmp/transmission/torrents/821bc5fde86e276c94c58a46b9be2f5a845e9c3b.torrent
drwxr-xr-x    2 transmis transmis        60 Aug 20 09:39 /tmp/transmission/resume
-rw-------    1 transmis transmis       920 Aug 20 09:39 /tmp/transmission/resume/821bc5fde86e276c94c58a46b9be2f5a845e9c3b.resume

Download and probe a Ubuntu torrent distro last server or desktop or other distro (linux mint, debian, etc.) with more seeds