Flood-UI / flood

A web UI for rTorrent, qBittorrent and Transmission with a Node.js backend and React frontend. Migrate to v4: https://github.com/jesec/flood/wiki/Migrate-from-older-versions-of-Flood.
https://flood.js.org
GNU General Public License v3.0
1.81k stars 173 forks source link

Add option to load torrents from rtorrent's filesystem to surpass RPC filesize limits #741

Open bootldrDNB opened 5 years ago

bootldrDNB commented 5 years ago

Type: Bug Report

Your Environment

Version used: a6771ee06373519a5fcff3d234b0d2332ac6a8f0. Node.js version: 10.1.0 npm version: 5.6.0 Web browser: Chromium 63

Client: Windows 10 Server: Ubuntu 18.04 / Alpine 3.7 - rtorrent 0.9.7.

Summary / Current Behavior

Once a file too large for XMLRPC has been attempted uploaded to Flood - Flood responds with a HTTP 500 error, the UI becomes unresponsive and no longer accepts torrent files.

Modifying network.xmlrpc.size_limit.set in rtorrent.rc didn't do anything for me.

Trace: { Error: read ECONNRESET
    at _errnoException (util.js:992:11)
    at TCP.onread (net.js:618:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
    at /home/bootldr/tools/flood/server/util/ajaxUtil.js:6:19
    at ClientRequest.fileRequest.onComplete [as onCompleteFn] (/home/bootldr/tools/flood/server/models/client.js:44:11)
    at ClientRequest.handleError (/home/bootldr/tools/flood/server/models/ClientRequest.js:85:12)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Expected Behavior

Flood should tell you that the file is too large for XMLRPC, and the UI should continue to be responsive.

Possible Solution

Load larger files like ruTorrent does.

Steps to Reproduce

Add torrent file larger than 1.5MB to Flood, if you don't have one at hand, try this.

Kiina commented 5 years ago

I tried the file but I get a different error:

Trace: Error creating directory. { Error: EACCES: permission denied, mkdir '/media' errno: -13, code: 'EACCES', syscall: 'mkdir', path: '/media' }

Even though the /media path is used for all my torrent and other ones add without a problem. Or is this a different issue because smaller torrents seem to add fine

itzwam commented 5 years ago

Hello, I have exactly the same issue as the author, is there any fix or workaround ?

dthomas53 commented 5 years ago

I, too, ran into this issue. Attempted to upload a 1.7MB .torrent file and the status of "Add Torrent" just hung, no error, just spinning indefinitely. I could then not upload any torrent files, regardless of size.

bigzbigz commented 5 years ago

Hello, I confirm the bug with commit 8d6e88c. I try with rtorrent on remote. The torrent file is never sent to the xmlrpc endpoint.

ghost commented 5 years ago

Same here . Watch folder doesn't work either .

xiayyu commented 5 years ago

This is not a bug of flood but rtorrent. rtorrent limit max SCGI content size to 2M in the code. We can fix this by rebuild a rtorrent with lager SCGI content size limitation. More info refer to this issue

joydashy commented 5 years ago

I am actually having a lot of problems on a new machine with rTorrent and Flood. The UI seems to completely lock up on uploading certain torrents. Hope it's related to this problem.

jfurrow commented 5 years ago

@xiayyu is correct, this is a limitation of using the XML-RPC protocol. As OP suggested, it might be possible to instruct rTorrent to use the load command, to load from the filesystem, so I'll treat this issue as a feature request for that.

@joydashy That does not sound related to this, can you DM me some example torrents on Discord and I'll try to reproduce?

runaroundhome commented 4 years ago

I can confirm that increasing the max_content_size in scgi_task.h file from the rtorrent source and compiling it does indeed fix this issue. I can now drag and drop larger then 2MB torrent files. It's not a great work around, but it works for though who are willing to compile from source. (or find a docker image that has done it)