ManiMatter / decluttarr

Watches radarr, sonarr, lidarr, readarr and whisparr download queues and removes downloads if they become stalled or no longer needed.
GNU General Public License v3.0
99 stars 15 forks source link

🐛 Decluttarr not working? #86

Closed SivertGullbergHansen closed 2 months ago

SivertGullbergHansen commented 2 months ago

What I've done so far:

The container logs are constantly logging this:

2024-04-17T21:58:18.974860691Z [VERBOSE]: --------------------------------------------------
2024-04-17T21:59:21.293052555Z [INFO   ]: ##################################################
2024-04-17T21:59:21.293093160Z [INFO   ]: Decluttarr - Application Started!
2024-04-17T21:59:21.293105513Z [INFO   ]: 
2024-04-17T21:59:21.293113498Z [INFO   ]: *** Current Settings ***
2024-04-17T21:59:21.293176615Z [INFO   ]: Version: v1.39.0
2024-04-17T21:59:21.293204126Z [INFO   ]: Commit: 83fe333
2024-04-17T21:59:21.293225986Z [INFO   ]: 
2024-04-17T21:59:21.293253267Z [INFO   ]: True | Removing failed downloads
2024-04-17T21:59:21.293279145Z [INFO   ]: True | Removing downloads missing metadata
2024-04-17T21:59:21.293305143Z [INFO   ]: True | Removing downloads missing files
2024-04-17T21:59:21.293335119Z [INFO   ]: True | Removing downloads that fail on import (no format upgrade)
2024-04-17T21:59:21.293365565Z [INFO   ]: True | Removing orphan downloads
2024-04-17T21:59:21.293386825Z [INFO   ]: True | Removing slow downloads
2024-04-17T21:59:21.293416981Z [INFO   ]: True | Removing stalled downloads
2024-04-17T21:59:21.293439853Z [INFO   ]: True | Removing downloads belonging to unmonitored items
2024-04-17T21:59:21.293460682Z [INFO   ]: 
2024-04-17T21:59:21.293525181Z [INFO   ]: Running every: 0 days 0 hours 5.0 minutes
2024-04-17T21:59:21.293548605Z [INFO   ]: Minimum speed enforced: 100 KB/s
2024-04-17T21:59:21.293579763Z [INFO   ]: Permitted number of times before stalled/missing metadata/slow downloads are removed: 3
2024-04-17T21:59:21.293609748Z [INFO   ]: Downloads with this tag will be skipped: "Don't Kill"
2024-04-17T21:59:21.293633542Z [INFO   ]: Private Trackers will be skipped: False
2024-04-17T21:59:21.293655704Z [INFO   ]: 
2024-04-17T21:59:21.293681261Z [INFO   ]: *** Configured Instances ***
2024-04-17T21:59:21.293706418Z [INFO   ]: Radarr: http://server:7878/api/v3
2024-04-17T21:59:21.293730532Z [INFO   ]: Sonarr: http://server:8989/api/v3
2024-04-17T21:59:21.293755729Z [INFO   ]: qBittorrent: http://server:8080/api/v2
2024-04-17T21:59:21.293814138Z [INFO   ]: 
2024-04-17T21:59:21.293846858Z [INFO   ]: *** Check Instances ***
2024-04-17T21:59:21.315120174Z [INFO   ]: OK  | Radarr
2024-04-17T21:59:21.332686092Z [INFO   ]: OK  | Sonarr
2024-04-17T21:59:21.479077655Z [INFO   ]: OK | qBittorrent
2024-04-17T21:59:21.479107310Z [INFO   ]: 
2024-04-17T21:59:21.486738878Z [INFO   ]: ##################################################
2024-04-17T21:59:21.486779744Z [INFO   ]: 
2024-04-17T21:59:21.486832893Z [VERBOSE]: --------------------------------------------------
2024-04-17T22:00:23.871312924Z [INFO   ]: ##################################################
2024-04-17T22:00:23.871354591Z [INFO   ]: Decluttarr - Application Started!
2024-04-17T22:00:23.871367535Z [INFO   ]: 
2024-04-17T22:00:23.871376001Z [INFO   ]: *** Current Settings ***
2024-04-17T22:00:23.871559892Z [INFO   ]: Version: v1.39.0
2024-04-17T22:00:23.871602801Z [INFO   ]: Commit: 83fe333
2024-04-17T22:00:23.871618971Z [INFO   ]: 
2024-04-17T22:00:23.871638618Z [INFO   ]: True | Removing failed downloads
2024-04-17T22:00:23.871659456Z [INFO   ]: True | Removing downloads missing metadata
2024-04-17T22:00:23.871712775Z [INFO   ]: True | Removing downloads missing files
2024-04-17T22:00:23.871724988Z [INFO   ]: True | Removing downloads that fail on import (no format upgrade)
2024-04-17T22:00:23.871769310Z [INFO   ]: True | Removing orphan downloads
2024-04-17T22:00:23.871807611Z [INFO   ]: True | Removing slow downloads
2024-04-17T22:00:23.871840613Z [INFO   ]: True | Removing stalled downloads
2024-04-17T22:00:23.871865399Z [INFO   ]: True | Removing downloads belonging to unmonitored items
2024-04-17T22:00:23.871881318Z [INFO   ]: 
2024-04-17T22:00:23.871934557Z [INFO   ]: Running every: 0 days 0 hours 5.0 minutes
2024-04-17T22:00:23.871969722Z [INFO   ]: Minimum speed enforced: 100 KB/s
2024-04-17T22:00:23.871991382Z [INFO   ]: Permitted number of times before stalled/missing metadata/slow downloads are removed: 3
2024-04-17T22:00:23.872005348Z [INFO   ]: Downloads with this tag will be skipped: "Don't Kill"
2024-04-17T22:00:23.872031276Z [INFO   ]: Private Trackers will be skipped: False
2024-04-17T22:00:23.872062504Z [INFO   ]: 
2024-04-17T22:00:23.872083633Z [INFO   ]: *** Configured Instances ***
2024-04-17T22:00:23.872095535Z [INFO   ]: Radarr: http://server:7878/api/v3
2024-04-17T22:00:23.872124449Z [INFO   ]: Sonarr: http://server:8989/api/v3
2024-04-17T22:00:23.872157741Z [INFO   ]: qBittorrent: http://server:8080/api/v2
2024-04-17T22:00:23.872178850Z [INFO   ]: 
2024-04-17T22:00:23.872192385Z [INFO   ]: *** Check Instances ***
2024-04-17T22:00:23.887172556Z [INFO   ]: OK  | Radarr
2024-04-17T22:00:23.903255162Z [INFO   ]: OK  | Sonarr
2024-04-17T22:00:24.035920339Z [INFO   ]: OK | qBittorrent
2024-04-17T22:00:24.035954453Z [INFO   ]: 
2024-04-17T22:00:24.043148739Z [INFO   ]: ##################################################
2024-04-17T22:00:24.043181630Z [INFO   ]: 
2024-04-17T22:00:24.043217527Z [VERBOSE]: --------------------------------------------------

Any ideas? The debug log doesn't show any errors or warnings. Checks all instances, they are ok 200, afterwards:

[DEBUG]: Starting new HTTP connection (1): server:8080
[DEBUG]: http://server:8080 "GET /api/v2/torrents/info HTTP/1.1" 200 2143543
[DEBUG]: main/getProtectedAndPrivateFromQbit/qbitItems: [{

And contains all of my active torrents it seems

ManiMatter commented 2 months ago

Just pushed a fix - please let me know if it still occurs (latest-image, v1.4.0)

SivertGullbergHansen commented 2 months ago

Thanks for the very quick response! That was extremely quick to what I'm used to 😄

I am using the docker and with the "latest" tag it doesn't seem to update, but switching to "v1.40.0" seems to work, and it seems its fixed :) Thanks again!

ManiMatter commented 2 months ago

Glad it works now.

I saw that you also created a fork originally from matt dlg‘s script. Let me know it you have any ideas how to develop this one further (has its roots also on matts script)

Re „latest“: to get it to work with the latest tag again, you may need to delete the container&image from your system (can be done via cmd line or portainer)

you may be interested in a watchtower, which does automated upgrades to your containers.

here's my config, just for your reference in case interested.

# WatchTower - Automatic Docker Container Updates
 watchtower:
   <<: *common-keys-core
   image: containrrr/watchtower:latest
   container_name: watchtower
   volumes:
     - /var/run/docker.sock:/var/run/docker.sock 
   environment:
     WATCHTOWER_CLEANUP: "true"
     WATCHTOWER_REMOVE_VOLUMES: "true"
     WATCHTOWER_INCLUDE_STOPPED: "true"
     WATCHTOWER_NO_STARTUP_MESSAGE: "false"
     WATCHTOWER_SCHEDULE: "0 26 12 * * *" # Everyday at 12:30
     DOCKER_API_VERSION: "1.40"
     <<: *default-tz-puid-pgid