Unpackerr / unpackerr

Extracts downloads for Radarr, Sonarr, Lidarr, Readarr, and/or a Watch folder - Deletes extracted files after import
https://unpackerr.zip
MIT License
1.01k stars 36 forks source link

debugging unpacker issues intruenas #275

Closed hros closed 1 year ago

hros commented 1 year ago

I installed unpacker on truenas scale using the truecharts app after setting the environment variables pointing to the *arr services and the download path, I'm getting an error in the unpacker log regarding a movie directory The container running the unpacker process runs it as a daemon and does not have a shell, so I have limited access to it. I've enabled debugging (UN_DEBUG=true) and I see the following log messages:

handlers.go:214: [DEBUG] Radarr: Errors encountered looking for <movie_name> path: ["stat /downloads/radarr/<movie_dir>: no such file or directory"]
handlers.go:225: [DEBUG] Radarr: Configured paths do not exist; trying path found in status message: /downloads/radarr/<movie_dir>
handlers.go:98: [Radarr] Completed item still waiting: <movie_name>, no extractable files found at: /downloads/radarr/<movie_dir> (stat err: stat /downloads/radarr/<movie_dir>: no such file or directory)
radarr.go:152: [DEBUG] Radarr: (http://radarr.ix-radarr.svc.cluster.local:7878): completed (torrent:100%): <movie_name>

where I replaced the movie name and movie dir in the messages It is clear that unpacker is able to communicate with radarr, and it is pointing at the right directory the container running unpacker has the movie directory mounted (/downloads/radarr/) and the directory contains a compressed movie (a .rar file plus several .r?? extensions)

the bottom line is that radarr is not receiving the uncompressed file, and I have no idea what is going on with unpacker How can I debug the issue?

davidnewhall commented 1 year ago

Share your docker configs for unpackerr and sonarr so we can identify the discrepancy in the paths.

hros commented 1 year ago

the truecharts apps are not exactly docker containers, and I have access to config parameters through a graphical ui

both radarr and unpacker mount /mnt/pool/torrents as /downloads and the radarr downloads are stored in /downloads/radarr. radarr has read-only access to the torrents directory, while unpacker and transmission both have read-write access radarr additionally has a mount of /mnt/pool/Video/video which is mounted as /mnt/video and this is where the video files are stored. unpacker does not have access to this location (should it?, I thought it extracts the files in the download directory and then radarr copies the extracted file) the unpacker environment variables related to radarr are:

note, that the logs indicate that the communication between radarr and unpacker is working, as it can get the list of movies and their paths

bakerboy448 commented 1 year ago

Sounds like the user/group you've configured unpackerr to run as does not have the required RW permissions then if your mounts are aligned

davidnewhall commented 1 year ago

Based on what you said, it's setup correctly. Based on the log message that says no such file or directory, it's setup incorrectly. Share your unpackerr log file, maybe there's something in there to find.

davidnewhall commented 1 year ago

Last time I helped someone troubleshoot this, it turned out that trueness was mounting completely different storage pools on the containers. I'm not real sure how he fixed it.

hros commented 1 year ago

Attached is the log file I'm not seeing anything, other than a long list of no such file or directory messages for files that actually are there.... Additionally, I see a pattern: unpacker is looking for a file, it is not there, then it switched from "configured paths" to the "path found in status message" which appears to be the same path but results in a different message: "Waiting for Start Delay".... However, I'm not seeing the extracted file

DELETED
davidnewhall commented 1 year ago

Seems the files are simply not there. Try the hotio container. It has a shell and you can get into it to verify the files are not there.

hros commented 1 year ago

I'll try and ask the "truecharts" support team (again) if there is a way to add a shell or somehow log the output of the mount command

Is there an extra verbose debug level that will print more data when searching for the files, i.e., if the main mount point is even accessible? Additionally, what is the logic of the files being searched? does unpacker search in all directories of all media assets even those that have local files?

davidnewhall commented 1 year ago

It doesn't 'search' it checks the path you provided in the config + item name, and it checks the path provided by the Starr app. In this case, they're both the same. There is no real debug to inspect the file system; just the error messages. In this case it just indicates the files are 'missing'. The only real indicator from that is that the mount is wrong. With the hotio container you can bash into the shell and do an ls yourself to see what's there.

davidnewhall commented 1 year ago

Were you able to find the files?

hros commented 1 year ago

thanks for checking up apparently there was a problem with the truecharts configuration. the download directory needs to be assigned to the app and not mounted in the app's container after performing the change, unpacked was able to find the files however, the files in question where 90+ rar files that contained an iso image of a blueray folder (I think it was BDMV) and it wasn't handled automatically by unpacker/radarr I deleted the file and added rules so that radarr won't download such files is there a way to automatically process these files and import them to radarr?