nelu / rutorrent-thirdparty-plugins

Plugins for ruTorrent web client, filemanager, fileshare, fileupload, mediastream
59 stars 43 forks source link

FILE MANAGER: Failed to get directory contents : / #29

Closed bhavicp closed 6 years ago

bhavicp commented 6 years ago

Hi,

After battling with this for weeks now, I can't find the issue which is causing FileManager to not work, but the same code on another server seems to work okay - The permissions etc are the same, but i have no idea what's different / where the issue lies.

Running; Debian 9 Nginx 1.13.9 PHP-FPM 7.0 rutorrent latest from git - 3.8 Error in ruTorrent: FILE MANAGER: Failed to get directory contents : / Then the FileManage tab is empty.

nginx.error.log 43774#0: *2622837 FastCGI sent in stderr: "PHP message: PHP Warning: Declaration of rxmlrpcfix::run() should be compatible with rXMLRPCRequest::run($trusted = true) in /usr/share/rutorrent/plugins/filemanager/xmlfix.php on line 0

in rutorrent.log

<param><value><string></string></value></param>
<param><value><string>find</string></value></param>
<param><value><string>/home/bhavic/</string></value></param>
<param><value><string>-mindepth</string></value></param>
<param><value><string>1</string></value></param>
<param><value><string>-maxdepth</string></value></param>
<param><value><string>1</string></value></param>
<param><value><string>-printf</string></value></param>
<param><value><string>%y\t%f\t%s\t%C@\t%#m\n</string></value></param>
</params></methodCall>
[20.03.18 18:17:34] Status: 200 OK
Content-Type: text/xml
Content-Length: 296

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<fault>
<value><struct>
<member><name>faultCode</name>
<value><i4>-503</i4></value></member>
<member><name>faultString</name>
<value><string>Bad return code.</string></value></member>
</struct></value>
</fault>
</methodResponse>

my config.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/rutorrent-bhavic.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 = "/home/bhavic/";
        $forbidUserSettings = false;

        //$scgi_port = 5000;
        //$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:////home/bhavic/.config/rtorrent/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"  => '/usr/bin/curl',                     // Something like /usr/bin/curl. If empty, will be found in PATH.
                "gzip"  => '/bin/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 = "/home/bhavic/.config/rutorrent";         // Path to user profiles
        $profileMask = 0770;                    // 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 = null;                  // Temp directory. Absolute path with trail slash. If null, then autodetect will be used.

        $canUseXSendFile = false;               // If true then use X-Sendfile feature if it exist

        $locale = "UTF8";```
WagnerGMD commented 6 years ago

To resume, good luck because as you can see this topic isn't close. But it might be wise to follow it.

That's right, for now the trouble still exist and I'm able to confirm it. I had notice this trouble a few months ago (December 2017) and no I didn't see the point to write a message (no I didn't forget the lack of support from the past).

But there is one difference because I have the php-v7.2 (instead of php-v7.0).

nelu commented 6 years ago

php compatibility issue. nginx logs tells the cause of the error

WagnerGMD commented 6 years ago

At least, it could be true when you had something in the logs (mine was empty).

That's all ? Sorry folks I was absent for several months ? Nevermind (forget it) finally we had one sign of life. Just wondering what about the futur ? Do you plan to provide any support ? You won't or you can't ? Did you think about or not yet ?

Because no we don't have one clue on this matter. Also apparently rutorrent work's fine and the answer sound (or give me this feeling) clear (no @Novik won't help (neither care about them) because each third-party rutorrent plugin are totally independent (then yes that's confirm it's a bad news : because you will have to wait and hope for a new one (maintener or maintainers ?). Otherwise you can try to rebuild it ? At least if you have the require knowledge)).

PS : How many people ? I imagine there is a lot of people looking to these answers. Because rutorrent (very often) come with the FileManager (thousand of topics over the internet)

bhavicp commented 6 years ago

@nelu I don't mind paying to have this fixed in the code - Are you able to help and give me a price for your time? You can email me bhavic [ at ] hides.me

Micdu70 commented 6 years ago

Fix is here: https://github.com/nelu/rutorrent-thirdparty-plugins/pull/33/files

samad909 commented 5 years ago

Fix is here: https://github.com/nelu/rutorrent-thirdparty-plugins/pull/33/files

@Micdu70 - This doesnt fix it for me, are you available for paid troubleshooting?

Micdu70 commented 5 years ago

@samad909 Yes I'm available to help you. Contact me: Micdu70@gmx.fr

EDIT: Troubleshot! Was not easy to find it: How rTorrent is started can cause XMLRPC call issue --> in a startup script, use su - user screen/tmux/etc. command and avoid the use of sudo.

I just found a missing modification in my previous fix... don't know if it helps but it should. ^^ https://github.com/nelu/rutorrent-thirdparty-plugins/pull/38/files