cross-seed / cross-seed

Fully-automatic cross-seeding with Torznab
https://cross-seed.org
Apache License 2.0
824 stars 70 forks source link

rTorrent injected torrents stuck on "Pausing" #430

Closed Arna13 closed 1 year ago

Arna13 commented 1 year ago

Hey, I am trying to set up cross-seed (docker) with rTorrent/ruTorrent (docker) and I am able to import torrents fine with cross-seed, but they appear as "Completed" or "Pausing" on ruTorrent:

image

Forcing recheck and starting the torrent again goes back to "Pausing", and the tracker's stats don't show me seeding, so it doesn't seem to be working.

I'm not sure what is causing this, I have the /cross-seeds path pointing to the same folder in both containers.

This is my cross-seed config file:

// If you find yourself always using the same command-line flag, you can set
// it here as a default.
Object.defineProperty(exports, "__esModule", { value: true });
module.exports = {
    /**
     * Pause at least this much in between each search. Higher is safer.
     * It is not recommended to set this to less than 2 seconds.
     */
    delay: 10,
    /**
     * List of Torznab URLs.
     * For Jackett, click "Copy RSS feed"
     * For Prowlarr, click on the indexer name and copy the Torznab Url, then append "?apikey=YOUR_PROWLARR_API_KEY"
     * Wrap each URL in quotation marks, and separate them with commas.
     */
    torznab: [ (my array of urls) ],
    /**
     * To search with downloaded data, you can pass in directories to your downloaded torrent data
     * to find matches rather using the torrent files themselves for matching.
     */
    dataDirs: undefined,
    /**
     * Determines flexibility of naming during matching. "safe" will allow only perfect name matches
     * using the standard matching algorithm. "risky" uses filesize as its only comparison point.
     * Options: "safe", "risky"
     */
    matchMode: "risky",
    /**
     * Defines what category torrents injected by data-based matching should use.
     * Default is "cross-seed-data"
     */
    dataCategory: undefined,
    /**
     * If this is specified, cross-seed will create links to scanned files in the specified directory.
     * It will create a different link for every changed file name or directory structure.
     */
    linkDir: undefined,
    /**
     * cross-seed will use links of this type to inject data-based matches into your client.
     * Only relevant if dataDirs is specified.
     * Options: "symlink", "hardlink"
     */
    linkType: "symlink",
    /**
     * Whether to skip recheck in Qbittorrent. If using "risky" matchMode it is HIGHLY
     * recommended to set this to false.
     * Only applies to data based matches.
     */
    skipRecheck: false,
    /**
     * Determines how deep into the specified dataDirs to go to generate new searchees.
     * Setting this to higher values will result in more searchees and more API hits to
     * your indexers.
     */
    maxDataDepth: 2,
    /**
     * Directory containing torrent files.
     * For rtorrent, this is your session directory
     * as configured in your .rtorrent.rc file.
     * For deluge, this is ~/.config/deluge/state.
     * Don't change this for Docker.
     * Instead set the volume mapping on your docker container.
     */
    torrentDir: "/torrents",
    /**
     * Where to put the torrent files that cross-seed finds for you.
     * Don't change this for Docker.
     * Instead set the volume mapping on your docker container.
     */
    outputDir: "/cross-seeds",
    /**
     * Whether to search for single episode torrents
     */
    includeEpisodes: true,
    /**
     * Include torrents which contain non-video files
     * This option does not override includeEpisodes.
     * To search for everything except episodes, use (includeEpisodes: false, includeNonVideos: true)
     * To search for everything including episodes, use (includeEpisodes: true, includeNonVideos: true)
     */
    includeNonVideos: true,
    /**
     * fuzzy size match threshold
     * decimal value (0.02 = 2%)
     */
    fuzzySizeThreshold: 0.02,
    /**
     * Exclude torrents first seen more than this long ago.
     * Format: https://github.com/vercel/ms
     * Examples:
     * "10min"
     * "2w"
     * "3 days"
     */
    excludeOlder: undefined,
    /**
     * Exclude torrents which have been searched
     * more recently than this long ago.
     * Examples:
     * "10min"
     * "2w"
     * "3 days"
     */
    excludeRecentSearch: undefined,
    /**
     * With "inject" you need to set up one of the below clients.
     * Options: "save", "inject"
     */
    action: "inject",
    /**
     * The url of your rtorrent XMLRPC interface.
     * Only relevant with action: "inject".
     * Could be something like "http://username:password@localhost:1234/RPC2
     */
    rtorrentRpcUrl: "(my rpc url)",
    /**
     * The url of your qBittorrent webui.
     * Only relevant with action: "inject".
     * Supply your username and password inside the url like so:
     * "http://username:password@localhost:8080"
     */
    qbittorrentUrl: undefined,
    /**
     * The url of your Transmission RPC interface.
     * Usually ends with "/transmission/rpc".
     * Only relevant with action: "inject".
     * Supply your username and password inside the url like so:
     * "http://username:password@localhost:9091/transmission/rpc"
     */
    transmissionRpcUrl: undefined,
    /**
     * qBittorrent-specific
     * Whether to inject using categories with the same save paths as your normal categories.
     * Example: if you have a category called "Movies",
     * this will automatically inject cross-seeds to "Movies.cross-seed"
     */
    duplicateCategories: false,
    /**
     * cross-seed will send POST requests to this url
     * with a JSON payload of { title, body }.
     * Conforms to the caronc/apprise REST API.
     */
    notificationWebhookUrl: undefined,
    /**
     * Listen on a custom port.
     */
    port: 2468,
    /**
     * Bind to a specific host address.
     * Example: "127.0.0.1"
     * Default is "0.0.0.0"
     */
    host: undefined,
    /**
     * Run rss scans on a schedule. Format: https://github.com/vercel/ms
     * Set to undefined or null to disable. Minimum of 10 minutes.
     * Examples:
     * "10min"
     * "2w"
     * "3 days"
     */
    rssCadence: "1d",
    /**
     * Run searches on a schedule. Format: https://github.com/vercel/ms
     * Set to undefined or null to disable. Minimum of 1 day.
     * If you have RSS enabled, you won't need this to run often (2+ weeks recommended)
     * Examples:
     * "10min"
     * "2w"
     * "3 days"
     */
    searchCadence: "2w",
    /**
     * Fail snatch requests that haven't responded after this long.
     * Set to null for an infinite timeout.
     * Format: https://github.com/vercel/ms
     * Examples:
     * "30sec"
     * "10s"
     * "1min"
     * null
     */
    snatchTimeout: "5m",
    /**
     * Fail search requests that haven't responded after this long.
     * Set to null for an infinite timeout.
     * Format: https://github.com/vercel/ms
     * Examples:
     * "30sec"
     * "10s"
     * "1min"
     * null
     */
    searchTimeout: "5m",
};
//# sourceMappingURL=config.template.docker.cjs.map

And this is my rTorrent config:

# Launch as a daemon
system.daemon.set = true

# Instance layout
method.insert = cfg.basedir, private|const|string, (cat,"/data/rtorrent/")
method.insert = cfg.download, private|const|string, (cat,"/downloads/")
method.insert = cfg.download_complete, private|const|string, (cat,(cfg.download),"complete/")
method.insert = cfg.download_temp, private|const|string, (cat,(cfg.download),"temp/")
method.insert = cfg.logs, private|const|string, (cat,(cfg.basedir),"log/")
method.insert = cfg.session, private|const|string, (cat,(cfg.basedir),".session/")
method.insert = cfg.watch, private|const|string, (cat,(cfg.basedir),"watch/")
method.insert = cfg.rundir, private|const|string, (cat,"/var/run/rtorrent/")

# Gets the full path of data of a torrent (it's a workaround for the possibly empty 'd.base_path' attribute)
method.insert = d.data_path, simple, "if=(d.is_multi_file), (cat,(d.directory),/), (cat,(d.directory),/,(d.name))"

# Default directory to save the downloaded torrents
directory.default.set = (cat,(cfg.download_temp))

# Default session directory
session.path.set = (cat,(cfg.session))

# PID file
execute.nothrow = sh,-c,(cat,"echo >",(cfg.rundir),"rtorrent.pid"," ",(system.pid))

# SCGI socket and make it group-writable and secure
network.scgi.open_local = (cat, (cfg.rundir), "scgi.socket")
schedule2 = scgi_permission, 0, 0, (cat,"execute.nothrow=chmod,\"g+w,o=\",",(cfg.rundir),"scgi.socket")

# Listening port for incoming peer traffic
network.port_range.set = 50000-50000
network.port_random.set = no

# UDP port to use for DHT
#dht.port.set = 6881
dht = off

# XMLRPC size limit
network.xmlrpc.size_limit.set = 1M

# Configure session saving interval to balance disk usage and torrent information accuracy
schedule2 = session_save, 1200, 3600, ((session.save))

# Save torrents immediately to prevent losing them between session saving intervals
method.set_key = event.download.inserted, 2_save_session, ((d.save_full_session))

# Logging
## levels = critical error warn notice info debug
## groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_*
log.open_file = "log",(cat,(cfg.logs),"rtorrent.log")
log.add_output = "info","log"
log.add_output = "rpc_events","log"
#log.execute = (cat,(cfg.logs),"execute.log")
#log.xmlrpc = (cat,(cfg.logs),"xmlrpc.log")

# Initialize plugins
execute2 = {sh,-c,/usr/bin/php81 /var/www/rutorrent/php/initplugins.php rtorrent &}

# cross-seed
method.set_key=event.download.finished,cross_seed,"execute={'`pwd`/rtorrent-cross-seed.sh',$d.name=}"

Any help is appreciated, many thanks.

Arna13 commented 1 year ago

I think I found the solution, I followed the instructions on here (https://github.com/cross-seed/cross-seed/issues/261#issuecomment-1243007585) and disabled that option on the config, and it seems to be working fine now.

The thing is that for the rTorrent docker container I am using, the config file you need to modify is data/rtorrent/.rtorrent.rc, instead of the template before building the container image.