[SOLVED] rpc doesn't listen when launched as nonroot user

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
Locked
uqasz
Posts: 11
Joined: Mon Jun 08, 2009 10:53 pm

[SOLVED] rpc doesn't listen when launched as nonroot user

Post by uqasz »

hi

i have installed newest version of transmission daemon (Transmission 2.04) and i can't launch it using non root user. below is my log and settings.json. those are when launching under non root user. i am using ubuntu karmic and debian squeeze. on both same error.

output of ps aux

Code: Select all

ukasz    26584  0.0  0.9  35088  4760 ?        Ssl  15:29   0:00 /usr/bin/transmission-daemon --config-dir /etc/transmission-daemon -m
output of:

Code: Select all

 netstat -tapn
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:9090          0.0.0.0:*               LISTEN      7165/xbmc.bin   
tcp        0      0 0.0.0.0:43624           0.0.0.0:*               LISTEN      3040/rpc.statd  
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      8006/smbd       
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      3001/portmap    
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN      7090/X          
tcp        0      0 0.0.0.0:2001            0.0.0.0:*               LISTEN      26584/transmission-
tcp        0      0 0.0.0.0:59316           0.0.0.0:*               LISTEN      7165/xbmc.bin   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3395/sshd       
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      10965/master    
tcp        0      0 0.0.0.0:63836           0.0.0.0:*               LISTEN      7165/xbmc.bin   
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      8006/smbd       
tcp        1      1 172.30.30.238:36889     81.171.114.69:5869      LAST_ACK    -               
tcp        0      0 172.30.30.238:53641     194.187.180.18:9982     ESTABLISHED 7165/xbmc.bin   
tcp        1      1 172.30.30.238:48955     208.71.112.202:2710     LAST_ACK    -               
tcp        0      0 172.30.30.238:22        87.99.33.180:57019      ESTABLISHED 21792/0         
tcp        0      1 172.30.30.238:45890     85.17.80.248:80         FIN_WAIT1   -               
tcp        0      0 172.30.30.238:22        87.99.33.180:44927      ESTABLISHED 22659/1         
tcp6       0      0 :::8080                 :::*                    LISTEN      7165/xbmc.bin   
tcp6       0      0 :::6000                 :::*                    LISTEN      7090/X          
tcp6       0      0 :::2001                 :::*                    LISTEN      26584/transmission-
tcp6       0      0 :::22                   :::*                    LISTEN      3395/sshd       

Code: Select all

ssion-daemon[26584]: Transmission 2.04 (11151) started (session.c:622)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: RPC Server Adding address to whitelist: 0.0.0.0/0 (rpc-server.c:767)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: RPC Server Serving RPC and Web requests on port 90 (rpc-server.c:940)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: RPC Server Password required (rpc-server.c:947)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: Bound socket 8 to port 2001 on 0.0.0.0 (net.c:389)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: Bound socket 9 to port 2001 on :: (net.c:389)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: setrlimit( RLIMIT_NOFILE, 1024 ) (fdlimit.c:846)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: socket limit is 512 (fdlimit.c:854)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: DHT Initializing DHT (tr-dht.c:330)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: DHT Reusing old id (tr-dht.c:374)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: DHT DHT initialized (tr-dht.c:409)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: DHT Bootstrapping from 79 nodes (tr-dht.c:146)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: LPD Local Peer Discovery disabled (session.c:636)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: Using settings from "/etc/transmission-daemon" (daemon.c:443)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: Writing 1970 bytes to temporary file "/etc/transmission-daemon/settings.json.tmp.M2lauk" (bencode.c:1638)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: Renaming "/etc/transmission-daemon/settings.json.tmp.M2lauk" as "/etc/transmission-daemon/settings.json" (bencode.c:1647)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: Saved "/etc/transmission-daemon/settings.json" (bencode.c:1651)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: transmission-daemon requiring authentication (daemon.c:461)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: Watching "/media/big/incoming/watch/" for new .torrent files (daemon.c:473)
Oct  4 15:29:52 XBMCLive transmission-daemon[26584]: Using inotify to watch directory "/media/big/incoming/watch/" (watch.c:72)

Code: Select all

{
    "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, 
    "dht-enabled": true, 
    "download-dir": "/media/big/incoming/", 
    "encryption": 1, 
    "incomplete-dir": "/media/big/incoming/incomplete", 
    "incomplete-dir-enabled": false, 
    "lazy-bitfield-enabled": true, 
    "lpd-enabled": false, 
    "message-level": 3, 
    "open-file-limit": 32, 
    "peer-limit-global": 512, 
    "peer-limit-per-torrent": 200, 
    "peer-port": 2001, 
    "peer-port-random-high": 65535, 
    "peer-port-random-low": 1024, 
    "peer-port-random-on-start": false, 
    "peer-socket-tos": 0, 
    "pex-enabled": true, 
    "port-forwarding-enabled": true, 
    "preallocation": 2, 
    "proxy": "", 
    "proxy-auth-enabled": false, 
    "proxy-auth-password": "", 
    "proxy-auth-username": "", 
    "proxy-enabled": false, 
    "proxy-port": 80, 
    "proxy-type": 0, 
    "ratio-limit": 0.0001, 
    "ratio-limit-enabled": true, 
    "rename-partial-files": true, 
    "rpc-authentication-required": true, 
    "rpc-bind-address": "0.0.0.0", 
    "rpc-enabled": true, 
    "rpc-password": "{3273d209b16d485913060d7243bbdeed90445946VNkpdTfZ", 
    "rpc-port": 90, 
    "rpc-username": "ukasz", 
    "rpc-whitelist": "0.0.0.0/0", 
    "rpc-whitelist-enabled": false, 
    "script-torrent-done-enabled": false, 
    "script-torrent-done-filename": "", 
    "speed-limit-down": 100, 
    "speed-limit-down-enabled": false, 
    "speed-limit-up": 600, 
    "speed-limit-up-enabled": true, 
    "start-added-torrents": true, 
    "trash-original-torrent-files": false, 
    "umask": 18, 
    "upload-slots-per-torrent": 3, 
    "watch-dir": "/media/big/incoming/watch/", 
    "watch-dir-enabled": true
}
uqasz
Posts: 11
Joined: Mon Jun 08, 2009 10:53 pm

Re: bug. rpc doesn't listen when launched as non root user

Post by uqasz »

i have changed setting by setting one by one and restarted transmission daemon after that and problem seems to be when chcnging rpc port number. when changed from 9091 to 90 rpc doesn't listen.
Longinus00
Posts: 137
Joined: Fri Aug 21, 2009 5:46 am

Re: bug. rpc doesn't listen when launched as non root user

Post by Longinus00 »

That's because only root can bind to ports < 1024.
Drey.Tee
Posts: 4
Joined: Tue Jan 04, 2011 7:59 am

Re: bug. rpc doesn't listen when launched as non root user

Post by Drey.Tee »

Longinus00 wrote:That's because only root can bind to ports < 1024.
DOh!
Thanks, forgot! :D
Locked