SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.02k stars 1.23k forks source link

ruTorrent doesn't work after upgrading to 3.7-8 #2243

Closed meats10 closed 8 years ago

meats10 commented 8 years ago

HELP!!!

I upgraded the package since a new update was available and now ruTorrent wont work at ALL. I've tried changing permissions on the web and rutorrent folder but the package will not start and if I try connecting to the web server, i get the following.

[07.04.2016 23:13:57] WebUI started. [07.04.2016 23:13:57] No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.

if i try to run rtorrent manually i get the following message "could not read resource file ~/.rtorrent.rc"

I should have never upgraded, can someone provide some assistance?

Dr-Bean commented 8 years ago

I would suggest to uninstall rutorrent, and start off with a clean install of the package. The rutorrent package is in beta and it hasn't been updated for a long time. Along with that, if you've made manual changes to the setup, either then or now, that might not have helped things.

It's probably best to start off with a clean slate, but if you want to keep certain settings, save /usr/local/rutorrent/var/ (in particular .rtorrent.rc), and the contents of /var/services/web/rutorrent/conf. Don't replace those after the clean install, but compare the contents of the individual files instead, and only replace values of things you actually need.

sofiane11 commented 8 years ago

Same issue here! After upgrading won't even start up Removed and Reinstalled but nothing

Dr-Bean commented 8 years ago

Follow instructions in CONTRIBUTING please: https://github.com/SynoCommunity/spksrc/blob/master/CONTRIBUTING.md#issue-content

sofiane11 commented 8 years ago

Issue description: Can't start rtorrent in synology package since updated to 3.7-8 Model: 3.7-8 Architecture: DSM version: 5.2-5644 Log file: empty

Dr-Bean commented 8 years ago

Missing information:

Seeing as I can't reproduce it, try this as well:

/var/packages/rutorrent/scripts/start-stop-status start
sofiane11 commented 8 years ago

model is DS214play - synology_evansport_214play tried to start via command line but still not starting Is there a way or a download link to use the previous version?

meats10 commented 8 years ago

my model is also DS214play, DSM 6.0-7321.

i have also uninstalled and re-installed a few times without any success. i will look into other information in here. i can also setup a screen share if that helps.

meats10 commented 8 years ago

starting with command line doesnt appear to work:

/var/packages/rutorrent/scripts/start-stop-status start

i get a "Starting ruTorrent ..." response, but it goes back to command line. I refresh the rutorrent webpage and it still says no connection to rtorrent.

there is no log file in /usr/local/rutorrent/var/ the only files i see is a .PID and .rtorrent.rc that i put there.

Alondite commented 8 years ago

Same problem here... Also tried to start it manually without success.

DS214Play / DSM 6.0-7321

I would also appreciate a link to download an older version while this gets fixed.

GoodOmens83 commented 8 years ago

What is the contents of config.php (/volume1/web/rutorrent/conf, specifically $scgi_port = xxxx

What are the user / owner permissions of all the folders in /usr/local/rutorrent/

Do you see the rtorrent process running in the console or via the top command?

meats10 commented 8 years ago

config.php is

`<?php // configuration parameters

// for snoopy client
@define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0', true);
@define('HTTP_TIME_OUT', 30, true); // in seconds
@define('HTTP_USE_GZIP', true, true);
$httpIP = null;             // IP string. Or null for any.

@define('RPC_TIME_OUT', 5, true);   // in seconds

@define('LOG_RPC_CALLS', false, true);
@define('LOG_RPC_FAULTS', true, true);

// for php  
@define('PHP_USE_GZIP', false, true);
@define('PHP_GZIP_LEVEL', 2, true);

$schedule_rand = 10;            // rand for schedulers start, +0..X seconds

$do_diagnostic = true;
$log_file = '/tmp/errors.log';      // path to log file (comment or leave blank to disable logging)

$saveUploadedTorrents = true;       // Save uploaded torrents to profile/torrents directory or not
$overwriteUploadedTorrents = false;     // Overwrite existing uploaded torrents in profile/torrents directory or make unique name

$topDirectory = '/volume1/';            // Upper available directory. Absolute path with trail slash.
$forbidUserSettings = false;

$scgi_port = 8050;
$scgi_host = "127.0.0.1";

// For web->rtorrent link through unix domain socket 
// (scgi_local in rtorrent conf file), change variables 
// above to something like this:
//
// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";

$XMLRPCMountPoint = "/RPC2";        // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!

$pathToExternals = array(
    "php"   => '',          // Something like /usr/bin/php. If empty, will be found in PATH.
    "curl"  => '',          // Something like /usr/bin/curl. If empty, will be found in PATH.
    "gzip"  => '',          // Something like /usr/bin/gzip. If empty, will be found in PATH.
    "id"    => '',          // Something like /usr/bin/id. If empty, will be found in PATH.
    "stat"  => '',          // Something like /usr/bin/stat. If empty, will be found in PATH.
);

$localhosts = array(            // list of local interfaces
    "127.0.0.1", 
    "localhost",
);

$profilePath = '../share';      // Path to user profiles
$profileMask = 0777;            // Mask for files and directory creation in user profiles.
                    // Both Webserver and rtorrent users must have read-write access to it.
                    // For example, if Webserver and rtorrent users are in the same group then the value may be 0770.

$tempDirectory = '/usr/local/rutorrent/tmp/';           // Temp directory. Absolute path with trail slash. If null, then autodetect will be used.

$canUseXSendFile = true;        // Use X-Sendfile feature if it exist

$locale = "UTF8";`

i think i added slash on the $tempDirectory as suggested in some other suggestions.

I set permissions on /usr/local/rutorrent/ to 0777 owner is http. i dont think winscp would let me change this, so I had to SSH in via putty and do it. I'm a linux noob, so I dont know how to check the top command or console.

GoodOmens83 commented 8 years ago

Do you see the rtorrent process running via the console resource monitoring app? Under process. Should come up as rtorrent main

fritz001 commented 8 years ago

[root@ds214p: /volume1/web]# screen -c ${USER} -u ${USER} -p ${PID_FILE} -- -D -m ${RTORRENT} screen: error while loading shared libraries: libelf.so.0: cannot open shared object file: No such file or directory

fritz001 commented 8 years ago

fixed, in order to make it work, downloaded

http://launchpadlibrarian.net/158018450/libelfg0_0.8.13-5_i386.deb

and extracted libelf.so.0 in /usr/local/rutorrent/lib

Alondite commented 8 years ago

I can manually run rtorrent after some permissions issues but now I'm getting this error:

[08.04.2016 17:50:26] WebUI started. [08.04.2016 17:50:27] Webserver user can't access 'stat' program. Some functionality will be unavailable. [08.04.2016 17:50:27] rss: Some functionality will be unavailable. Webserver user can't access external program (curl). [08.04.2016 17:50:27] _task: Some functionality will be unavailable. rTorrent user can't access external program (pgrep). [08.04.2016 17:50:27] mediainfo: Plugin will not work. rTorrent user can't access external program (mediainfo). [08.04.2016 17:50:29] Unpack plugin: rTorrent user can't access 'unzip' program.

meats10 commented 8 years ago

i was able to figure out TOP and it does look like rtorrent is running.

`top - 13:04:15 up 12:06, 2 users, load average: 7.94, 8.16, 8.20 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie %Cpu(s): 3.3 us, 2.3 sy, 0.0 ni, 94.2 id, 0.0 wa, 0.0 hi, 0.2 si, 0.0 st GiB Mem : 0.683 total, 0.125 free, 0.319 used, 0.239 buff/cache GiB Swap: 2.410 total, 2.372 free, 0.038 used. 0.147 avail Mem

PID USER PR NI VIRT RES %CPU %MEM TIME+ S COMMAND 12462 root 20 0 33.8m 6.3m 0.0 0.9 0:00.33 S /usr/local/rutorrent/bin/rtorrent `

GoodOmens83 commented 8 years ago

there is no log file in /usr/local/rutorrent/var/ the only files i see is a .PID and .rtorrent.rc that i put there.

Did you customize the rc file? What scgi port is listed in that file?

meats10 commented 8 years ago

below is my .rtorrent.rc file

`scgi_port = localhost:8050 directory = /volume1/Downloads session = /usr/local/rutorrent/var/.session max_memory_usage = 300M log.open_file = "rtorrent.log", "/usr/local/rutorrent/var/rtorrent.log" log.add_output = "warn", "rtorrent.log" http_cacert = /usr/local/rutorrent/etc/cacert.pem system.umask.set = 002 port_range = 6881-6999 peer_exchange = no dht = off check_hash = no

Maximum and minimum number of peers to connect to per torrent.

min_peers = 20 max_peers = 60

Same as above but for seeding completed torrents (-1 = same as downloading)

min_peers_seed = 10 max_peers_seed = 70

Maximum number of simultanious uploads per torrent.

max_uploads = 30`

when the update didnt immediately worked, I did try some tips posted here regarding .rtorrent.rc file

http://www.youritromp.nl/2014/06/rtorrent-seedbox-on-a-synology-nas/

still cant get anything with ruTorrent working.

GoodOmens83 commented 8 years ago

Not sure if it matters but '/usr/local/rutorrent/etc/cacert.pem' no longer exist.

It should be 'http_cacert= /usr/local/rutorrent/cert.pem'

You'll have to start and restart rtorrent after the change. I'm away from any computer for a bit so can come up with some more commands for your to try/check when I get home.

For reference - when you manually start rtorrent you need to point it to the rc file located in /usr/local/rutorrent/var/ via './rtorrent -o import=/usr/local/rutorrent/var/.rtorrent.rc' or something like that

GoodOmens83 commented 8 years ago

Also owner of /usr/local/rutorrent (and all files) in my nas is rutorrent. I think only the cert.pem file is owned by http.

meats10 commented 8 years ago

thank goodomen, but still striking out. i made those changes to the .rtorrent.rc file and then rebooted. i also started rtorrent with the import as you suggested. when rtorrent starts i get the following:

(17:13:50) Using 'epoll' based polling. (17:13:50) Using 'epoll' based polling. (17:13:50) Using 'epoll' based polling. (17:13:50) Closed XMLRPC log. (17:13:50) Could not read resource file: ~/.rtorrent.rc

GoodOmens83 commented 8 years ago

You seem to have a lot of issues going on that are stemmed from customization without a lot of knowledge of linux.

My guess is your rtorrent.rc file does not have the right permissions for rTorrent to be able to run but that's hard for me to guess over a message forum.

If you are on DSM 5.2 I'd suggest removing the package and starting anew. Another option would be to just use the more user friendly Transmission.

meats10 commented 8 years ago

i didnt customize anything to get the ruTorrent working on the older version. i'm only trying things now because they dont work. It stopped working when I updated the package. I am on DSM 6.0-7321 and it seems more than a few people are having challenges.

GoodOmens83 commented 8 years ago

DSM6 is not supported at this time. Too many changes that have been made by Synology that have broken too many packages.

My guess (now that I know you are on DSM6) - the uninstall/reinstall have wiped out the rutorrent user. Synology has changed the way users are created in DSM6 and haven't told developers fully how to do this. My guess working packages for DSM6 won't be available for at least a month if not longer. Synology hasn't released a final toolchain for this release yet. Its a mess.

Dr-Bean commented 8 years ago

If this is about running rutorrent on DSM6, #2215 is the place for that. No point in having two issues open for that same problem. That said, @GoodOmens83 is right, we don't have a solution right now. A lot of packages are affected by the same issue wrt creating users, see e.g. #2207. On top of that, due to the way that rutorrent/rtorrent/webstation interact, there may be other issues with running on DSM6.

fritz001 commented 8 years ago

Well, some ppl MUST understand, you DO must have some min knowledge of linux to fully manage these devices.

Now about ruttorent 3.7 on DSM6:

  1. after upgrade, the /volume1/web/ruttorent has right permissions ( if not, chmod 755 /volume1/web/rutorrent && http http /volume1/web/rutorrent )
  2. failure to start package => As rtorrent is using screen to start [root@ds214p: /volume1/web]# screen -c ${USER} -u ${USER} -p ${PID_FILE} -- -D -m ${RTORRENT} screen: error while loading shared libraries: libelf.so.0: cannot open shared object file: No such file or directory

To make it works :+1: **http://launchpadlibrarian.net/158018450/libelfg0_0.8.13-5_i386.deb

and extracted libelf.so.0 in /usr/local/rutorrent/lib**

  1. another issue: mediainfo:

mediainfo: /lib/libstdc++.so.6: no version information available (required by mediainfo) mediainfo: /lib/libstdc++.so.6: no version information available (required by /usr/local/rutorrent/lib/libmediainfo.so.0) mediainfo: /lib/libstdc++.so.6: no version information available (required by /usr/local/rutorrent/lib/libzen.so.0) mediainfo: /lib/libstdc++

There are just warning , but annoying

Alondite commented 8 years ago

Thanks fritz001, I can confirm that it works.

I don't get those warnings, I get these ones but it's working fine:

[09.04.2016 16:09:07] WebUI started. [09.04.2016 16:09:27] Webserver user can't access 'stat' program. Some functionality will be unavailable. [09.04.2016 16:09:27] rss: Some functionality will be unavailable. Webserver user can't access external program (curl).

GoodOmens83 commented 8 years ago

Well I have a fully different approach to ruTorrent once @Dr-Bean and others figure out a proper to add users in DSM6.

I have a test environment that will use a lighttpd package (with php 5.6.20) instead of relying on web station. It seems to be working well and should eliminate the openbasedir / permission problems etc that others are facing.

Dr-Bean commented 8 years ago

Duplicate of https://github.com/SynoCommunity/spksrc/issues/2215

nova77 commented 8 years ago

I have another issue related to upgrading to 3.7-8: the WebUI starts and does not mention any issue, but no torrent gets active. The synology logs however has a bunch of "cannot create directory [..] permission denied" issues, even though the whole directory tree is fully 755 and all as rutorrent. Any idea why?

GoodOmens83 commented 8 years ago

The reason why is http needs access to the folder as well. I have my torrent folder as set to rutorrent:users (but I use sickbeard etc). Also the group needs write access as well. My folders are 775 (although 765 in theory should suffice)

nova77 commented 8 years ago

It's already rutorrent:users. I have also chmod -R 775 * on the whole tree but I still get the error message. :(

nova77 commented 8 years ago

Even though I get a permission denied error it does not seem to be an access issue. Even on 777 I get the same error.

nova77 commented 8 years ago

Nevermind, it was a permission issue: the root directory /volume1/download/torrent had wrong permissions set (d---rwx---) which were propagating down the tree. Oddly enough it was working prior to 3.7-8.