cross-seed / cross-seed

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

Failed to inject to qbittorrent #442

Closed Smexhy closed 1 year ago

Smexhy commented 1 year ago

Hi! I am currently in the process of setting up cross-seed for the first time, however I am unable to figure out this issue one issue with injecting torrents which I am getting:

2023-06-24 23:47:04 [36mverbose[39m: [qbittorrent] Making request to /torrents/properties with body hash=(HASH)
2023-06-24 23:47:04 [36mverbose[39m: [qbittorrent] Making request to /torrents/info with body hashes=(HASH)
2023-06-24 23:47:04 [34mdebug[39m: [qbittorrent] injection failed: Failed to retrieve data dir; torrent not found in client

My docker-compose:

cross-seed:
    image: crossseed/cross-seed
    networks:
      - "frontend"
    container_name: cross-seed
    user: ${PUID}:${PGID}
    volumes:
      - ${BASE_PATH}cross-seed/config:/config
      - ${BASE_PATH}qbittorrent/config/qBittorrent/BT_backup:/torrents:ro
      - ${BASE_PATH}data/torrent/cross-seeds:/cross-seeds
      - ${BASE_PATH}data/torrent:/data/torrent
    command: search

qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    network_mode: service:gluetun
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TIMEZONE}
      - WEBUI_PORT=8080
      - DOCKER_MODS=sma/trusted-certs
    volumes:
      - ${BASE_PATH}qbittorrent/config:/config
      - ${BASE_PATH}qbittorrent/nvme-save:/nvme-save
      - /mnt/disk2:/direct
      - /mnt/test:/samba
      - ${BASE_PATH}qbittorrent/custom-cont-init.d:/custom-cont-init.d:ro
      - ${BASE_PATH}data/torrent:/data/torrent
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
My cross-seed config: ``` "use strict"; // 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: 5, /** * List of Torznab URLs. * For Jackett, click "Copy RSS feed" * For Prowlarr, click (i) and copy the Torznab Url, then append "?apikey=YOUR_PROWLARR_API_KEY" * Wrap each URL in quotation marks, and separate them with commas. */ torznab: ["http://prowlarr:9696/1/api?t=search&extended=1&apikey=KEY", /** * 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: ["/data/torrent"], /** * 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: "safe", /** * Defines what category torrents injected by data-based matching should use. Default is * cross-seed-data */ dataCategory: "cross-seed-data", /** * If this is enabled, cross-seed will create hardlinks 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: "hardlink", /** * Whether to skip recheck in Qbittorrent. If using "risky" matchMode it is HIGHLY * recommended to set this to false. */ 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: false, /** * 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: false, /** * 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, /** * can be either "save" or "inject". * With "inject" you need to set up one of the below clients. */ 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: undefined, /** * 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: "http://user:pass@qbittorrent:8080", /** * 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: 1122, /** * Bind to a specific host address. * Example: "127.0.0.1" */ 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: undefined, /** * 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: undefined, }; //# sourceMappingURL=config.template.docker.cjs.map ```

I run both qbitt and cross-seed in docker. All paths should be mapped in the same way for both qbitt and cross-seed, but perhaps I am just missing something. Is there any way I could make sure everything regarding paths is set up correctly?

I also use SQLite database in qbittorrent, that's the only thing that I could think of what could be possibly wrong or different than what others are using, but I will be only able to test FastResume option tomorrow.

Any ideas?

spyhuntergenral commented 1 year ago

Hi, i'm running an older version than you, but have mine setup with QT working fine,

i would suggest checking that the " outputDir: "/cross-seeds", " exists as in your compose file it looks like your specifying a sub directory of your torrents:

CS: - ${BASE_PATH}data/torrent/cross-seeds:/cross-seeds QT: - ${BASE_PATH}data/torrent:/data/torrent

i would check this by logging into the CS container: i.e "docker exec -it cross-seed /bin/bash" and then seeing if you can list the /cross-seeds directory from there. maybe even create a test file and check that QT can see it as well.

Also just because is not clear, your config.js has this: "qbittorrentUrl: "http://user:pass@qbittorrent:8080", " I am guessing that in you actual config its set to your environment? not just defaulted

i could post you my configs, if nobody else can help you.

spyhuntergenral commented 1 year ago

i also just saw these: https://github.com/cross-seed/cross-seed/issues/365 and https://github.com/qbittorrent/qBittorrent/discussions/16768

most likely the issue...

mmgoodnow commented 1 year ago

yes, the SQLite session backend is not supported. Follow along at #365