'connection failed' running as unprivileged user

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
ctrlspatie
Posts: 1
Joined: Wed Jan 15, 2014 11:58 pm

'connection failed' running as unprivileged user

Post by ctrlspatie »

Dear all,

When transmission runs as root, everything runs smoothly

Code: Select all

sudo transmission-daemon -f -g /etc/transmission-daemon
When transmission runs as the user `transmission`, everything seems to start nicely. However, the web interface gives the error „connection failed”.

Code: Select all

sudo -u transmission transmission-daemon -f -g /etc/transmission-daemon
Log:

Code: Select all

[01:11:45.688] Transmission 2.52 (13304) started (session.c:718)
[01:11:45.688] Cache Maximum cache size set to 4.00 MiB (256 blocks) (cache.c:249)
[01:11:45.688] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:803)
[01:11:45.688] RPC Server Adding address to whitelist: 192.168.1.* (rpc-server.c:803)
[01:11:45.688] RPC Server Serving RPC and Web requests on port 127.0.0.1:81/transmission/ (rpc-server.c:997)
[01:11:45.688] RPC Server Whitelist enabled (rpc-server.c:1001)
[01:11:45.688] Bound socket 11 to port 51413 on 0.0.0.0 (net.c:371)
[01:11:45.688] Bound socket 12 to port 51413 on :: (net.c:371)
[01:11:45.688] UDP Failed to set receive buffer: requested 4194304, got 262142 (tr-udp.c:75)
[01:11:45.688] UDP Please add the line "net.core.rmem_max = 4194304" to /etc/sysctl.conf (tr-udp.c:80)
[01:11:45.688] UDP Failed to set send buffer: requested 1048576, got 262142 (tr-udp.c:86)
[01:11:45.688] UDP Please add the line "net.core.wmem_max = 1048576" to /etc/sysctl.conf (tr-udp.c:91)
[01:11:45.688] Using settings from "/etc/transmission-daemon" (daemon.c:488)
[01:11:45.688] Saved "/var/lib/transmission-daemon/info/settings.json" (bencode.c:1731)
[01:11:45.688] Watching "/data/transmission/_watch-dir" for new .torrent files (daemon.c:520)
[01:11:45.688] Using inotify to watch directory "/data/transmission/_watch-dir" (watch.c:73)
[01:11:45.688] Arcade Fire - Reflektor [MP3-V0] Read resume file "/etc/transmission-daemon/resume/Arcade Fire - Reflektor [MP3-V0].b0db3ae839088d76.resume" (resume.c:692)
[01:11:45.688] Arcade Fire - Reflektor [MP3-V0] Resume file found 15 files marked for download (resume.c:205)
[01:11:45.688] Darkside - 2013 - Psychic -V2% Read resume file "/etc/transmission-daemon/resume/Darkside - 2013 - Psychic -V2%.983378cd922c8f93.resume" (resume.c:692)
[01:11:45.688] Darkside - 2013 - Psychic -V2% Resume file found 8 files marked for download (resume.c:205)
[01:11:45.688] Jon Hopkins - Immunity [V0] Read resume file "/etc/transmission-daemon/resume/Jon Hopkins - Immunity [V0].98929cabba5edd2a.resume" (resume.c:692)
[01:11:45.688] Jon Hopkins - Immunity [V0] Resume file found 9 files marked for download (resume.c:205)
[01:11:45.688] Loaded 3 torrents (session.c:1937)
[01:11:45.688] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:72)
[01:11:45.688] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:72)
[01:11:45.688] Port Forwarding (UPnP) upnpDiscover failed (errno 0 - Success) (upnp.c:104)
[01:11:45.688] Port Forwarding (UPnP) Found Internet Gateway Device "http://192.168.1.1:49000/upnp/control/WANIPConn1" (upnp.c:202)
[01:11:45.688] Port Forwarding (UPnP) Local Address is "192.168.1.2" (upnp.c:204)
[01:11:45.688] Port Forwarding (UPnP) Port forwarding through "http://192.168.1.1:49000/upnp/control/WANIPConn1", service "urn:schemas-upnp-org:service:WANIPConnection:1". (local address: 192.168.1.2:51413) (upnp.c:279)
[01:11:45.688] Port Forwarding (UPnP) Port forwarding successful! (upnp.c:282)
[01:11:45.688] Port Forwarding State changed from "Not forwarded" to "Forwarded" (port-forwarding.c:93)
Note: For convenience reasons I symlinked /etc/transmission-daemon -> /var/lib/transmission-daemon/info/

My system is Debian Wheezy 7.3.

All config files and download-directories are owned by the user `transmission`.

Thanks in advance
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: 'connection failed' running as unprivileged user

Post by mike.dld »

I guess using port 81 for RPC may be the reason. Ports below 1024 are considered privileged on most *NIX systems, and normal users are not allowed to bind on those. This is why default RPC port is set to 9091 (which is >= 1024). Try choosing another port and let us know if that helps.

P.S. Don't let "Serving RPC and Web requests on port ..." line confuse you, it merely dispays the configured settings and not the real fact that binding on the port succeeded.
Post Reply