Page 1 of 1

Problems with AMC-Script with Qbitorrent

Posted: 21 Mar 2025, 18:07
by lemonpwn3d
Hi! :D
I’m having some issues with the script. Ever since I migrated my Docker to a faster volume, I’ve been experiencing problems with the script
Let me give you some context.
I have the Docker https://github.com/imTHAI/docker-qbittorrent-filebot set up on my Synology DS920+, and everything was working fine until I decided to migrate it to another volume (I wanted all the containers and files to be on an SSD). When I migrated, I obviously changed the PATHs to point to the new location. However, when I download a file, the script throws an error.

Code: Select all

Run script [fn:amc] at [Fri Mar 21 16:43:19 GMT 2025]
Parameter: excludeList = /data/filebot/amc-exlude-list.txt
Parameter: unsorted = y
Parameter: music = n
Parameter: musicFormat = /media/{plex}
Parameter: artwork = n
Parameter: movieFormat = /media/{plex}
Parameter: seriesFormat = /media/{plex}
Parameter: animeFormat = /media/{plex}
Parameter: ut_kind = multi
Parameter: ut_dir = /downloads/Dr.STONE.S04E11.Episode.11.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub.mkv
Parameter: ut_title = 
Parameter: ut_label = 
Parameter: gmail = *****
Parameter: mailto = *****
Parameter: reportError = y
Parameter: clean = y
Argument[0]: File does not exist: /run/s6-rc:s6-rc-init:JpdCGM/servicedirs/svc-qbittorrent/n
Argument[1]: File does not exist: /run/s6-rc:s6-rc-init:JpdCGM/servicedirs/svc-qbittorrent/n
Argument[2]: File does not exist: /run/s6-rc:s6-rc-init:JpdCGM/servicedirs/svc-qbittorrent/n
Invalid usage: input file path must be passed via script parameters [kind:multi, dir:/downloads/Dr.STONE.S04E11.Episode.11.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub.mkv, title:null, label:null] or via file arguments [/run/s6-rc:s6-rc-init:JpdCGM/servicedirs/svc-qbittorrent/n, /run/s6-rc:s6-rc-init:JpdCGM/servicedirs/svc-qbittorrent/n, /run/s6-rc:s6-rc-init:JpdCGM/servicedirs/svc-qbittorrent/n] but not both
Abort (×_×)
This is the script I’m using:

Code: Select all

#!/bin/bash
# Future feature
#if [ ! -f /filebot/osdb.loggedin ]; then
# printf "$OSDB_USER\n$OSDB_PASSWD\n" | /filebot/filebot.sh -script fn:configure
# touch /filebot/osdb.loggedin
#fi

# Set this to 1 if you want to customize the fb.sh script. So it won't be reset at restart.
custom=1

/filebot/filebot.sh \
-script fn:amc \
--output /media \
"${EXTRA_FILEBOT_PARAM}" \
"${EXTRA_FILEBOT_PARAM}" \
"${EXTRA_FILEBOT_PARAM}" \
--lang "$FILEBOT_LANG" \
--action "$FILEBOT_ACTION" \
--conflict "$FILEBOT_CONFLICT" \
--log-file /data/filebot/filebot.log \
--def excludeList=/data/filebot/amc-exlude-list.txt \
-non-strict \
--def \
unsorted=y \
music="$FILEBOT_PROCESS_MUSIC" \
musicFormat=/media/"$MUSIC_FORMAT" \
artwork="$FILEBOT_ARTWORK" \
movieFormat=/media/"$MOVIE_FORMAT" \
seriesFormat=/media/"$SERIE_FORMAT" \
animeFormat=/media/"$SERIE_FORMAT" \
ut_kind=multi \
ut_dir="$1" \
ut_title="$2" \
ut_label="$3" \
gmail=*****:***** \
mailto=********** \
reportError=y \
clean=y
Of course, it is selected in qBittorrent -> Run external program on torrent finished

Code: Select all

/data/filebot/fb.sh "%F" "%N" "%L"
Here’s the container configuration:

Code: Select all

 
      - "FILES_CHECK_PERM=n"
      - "FILEBOT_LANG=es"
      - "FILEBOT_CONFLICT=auto"
      - "FILEBOT_ACTION=copy"
      - "FILEBOT_ARTWORK=n"
      - "FILEBOT_PROCESS_MUSIC=n"
      - "MUSIC_FORMAT={plex}"
      - "MOVIE_FORMAT={plex}"
      - "SERIE_FORMAT={plex}"
      - "ANIME_FORMAT={plex}"
      - "FILEBOT_OPTS=-Dnet.filebot.archive.unrar=/usr/bin/unrar"   
   
    volumes:
      - "/volume2/downloads:/downloads"
      - "/volume2/media:/media"
      - "/volume3/docker/qbittorrent-filebot:/data"
      
As I mentioned before, I migrated the "docker" directory from "/volume2/docker/qbittorrent-filebot" to "/volume3/docker/qbittorrent-filebot". That’s the only change I made, and it was working perfectly before.
Sorry for my poor English and thanks in advance :).

Re: Problems with AMC-Script with Qbitorrent

Posted: 21 Mar 2025, 20:57
by rednoah
:!: You're somehow passing these file paths along via the command-line, perhaps just via n (relative file path) so that would be my first clue:

Code: Select all

Argument[0]: File does not exist: /run/s6-rc:s6-rc-init:JpdCGM/servicedirs/svc-qbittorrent/n
Argument[1]: File does not exist: /run/s6-rc:s6-rc-init:JpdCGM/servicedirs/svc-qbittorrent/n
Argument[2]: File does not exist: /run/s6-rc:s6-rc-init:JpdCGM/servicedirs/svc-qbittorrent/n
I don't see a glaring error in your code, but I'm also not a bash interpreter. You'll have to do some trial & error debugging. I'd start debugging at the mysterious EXTRA_FILEBOT_PARAM argument which seems to be repeated 3 times and also doesn't show up in the configuration posted above. If it has the value n, then that would explain things.

Re: Problems with AMC-Script with Qbitorrent

Posted: 23 Mar 2025, 10:35
by lemonpwn3d
Good morning, I’ve tried removing the EXTRA_FILEBOT_PARAM and also leaving it enabled, but I haven’t achieved anything. Here are my results:

I removed the EXTRA_FILEBOT_PARAM from the container configuration, but it crashes. Here is the log:

Code: Select all

2025/03/23 10:38:04	stderr	Aborted (core dumped)
2025/03/23 10:37:57	stdout	#
2025/03/23 10:37:57	stdout	# See problematic frame for where to report the bug.
2025/03/23 10:37:57	stdout	# The crash happened outside the Java Virtual Machine in native code.
2025/03/23 10:37:57	stdout	#   https://gitlab.alpinelinux.org/alpine/aports/issues
2025/03/23 10:37:57	stdout	# If you would like to submit a bug report, please visit:
2025/03/23 10:37:57	stdout	#
2025/03/23 10:37:57	stdout	# /tmp/hs_err_pid340.log
2025/03/23 10:37:57	stdout	# An error report file with more information is saved as:
2025/03/23 10:37:57	stdout	#
2025/03/23 10:37:57	stdout	# Core dump will be written. Default location: Core dumps may be processed with "/usr/syno/sbin/syno-dump-core.sh /volume1 %p %s %P" (or dumping to /run/s6-rc:s6-rc-init:kAPHpm/servicedirs/svc-qbittorrent/core.340)
2025/03/23 10:37:57	stdout	#
2025/03/23 10:37:57	stdout	# C  0x0000000000000000
2025/03/23 10:37:57	stdout	# Problematic frame:
2025/03/23 10:37:57	stdout	# Java VM: OpenJDK 64-Bit Server VM (11.0.26+4-alpine-r1, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
2025/03/23 10:37:57	stdout	# JRE version: OpenJDK Runtime Environment (11.0.26+4) (build 11.0.26+4-alpine-r1)
2025/03/23 10:37:57	stdout	#
2025/03/23 10:37:57	stdout	#  SIGSEGV (0xb) at pc=0x0000000000000000, pid=340, tid=341
2025/03/23 10:37:57	stdout	#
2025/03/23 10:37:57	stdout	# A fatal error has been detected by the Java Runtime Environment:
2025/03/23 10:37:57	stdout	#
2025/03/23 10:37:57	stdout	Use excludes: /data/filebot/amc-exlude-list.txt (1)
2025/03/23 10:37:56	stdout	Parameter: clean = y
2025/03/23 10:37:56	stdout	Parameter: reportError = y
2025/03/23 10:37:56	stdout	Parameter: mailto = *****
2025/03/23 10:37:56	stdout	Parameter: gmail = *****
2025/03/23 10:37:56	stdout	Parameter: ut_label = 
2025/03/23 10:37:56	stdout	Parameter: ut_title = Dr.STONE.S04E11.Episode.11.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub.mkv
2025/03/23 10:37:56	stdout	Parameter: ut_dir = /downloads/Dr.STONE.S04E11.Episode.11.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub.mkv
2025/03/23 10:37:56	stdout	Parameter: ut_kind = multi
2025/03/23 10:37:56	stdout	Parameter: animeFormat = /media/{plex}
2025/03/23 10:37:56	stdout	Parameter: seriesFormat = /media/{plex}
2025/03/23 10:37:56	stdout	Parameter: movieFormat = /media/{plex}
2025/03/23 10:37:56	stdout	Parameter: artwork = n
2025/03/23 10:37:56	stdout	Parameter: musicFormat = /media/{plex}
2025/03/23 10:37:56	stdout	Parameter: music = n
2025/03/23 10:37:56	stdout	Parameter: unsorted = y
2025/03/23 10:37:56	stdout	Parameter: excludeList = /data/filebot/amc-exlude-list.txt
2025/03/23 10:37:56	stdout	Run script [fn:amc] at [Sun Mar 23 09:37:56 GMT 2025]
If I leave it enabled with only one argument (I don't know why there were three last time), it gives me the same error as the first time.

Code: Select all

Initialize new disk cache: /filebot/data/1026/cache/0
Run script [fn:amc] at [Sun Mar 23 09:35:23 GMT 2025]
Parameter: excludeList = /data/filebot/amc-exlude-list.txt
Parameter: unsorted = y
Parameter: music = n
Parameter: musicFormat = /media/{plex}
Parameter: artwork = n
Parameter: movieFormat = /media/{plex}
Parameter: seriesFormat = /media/{plex}
Parameter: animeFormat = /media/{plex}
Parameter: ut_kind = multi
Parameter: ut_dir = /downloads/Dr.STONE.S04E11.Episode.11.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub.mkv
Parameter: ut_title = Dr.STONE.S04E11.Episode.11.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub.mkv
Parameter: ut_label = 
Parameter: gmail = *****
Parameter: mailto = *****
Parameter: reportError = y
Parameter: clean = y
Argument[0]: File does not exist: /run/s6-rc:s6-rc-init:kAPHpm/servicedirs/svc-qbittorrent/no
Invalid usage: input file path must be passed via script parameters [kind:multi, dir:/downloads/Dr.STONE.S04E11.Episode.11.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub.mkv, title:Dr.STONE.S04E11.Episode.11.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub.mkv, label:null] or via file arguments [/run/s6-rc:s6-rc-init:kAPHpm/servicedirs/svc-qbittorrent/no] but not both
Abort (×_×)
The script changes depending on whether I leave the EXTRA_FILEBOT_PARAM parameter enabled or not:
I remove the parameter.

Code: Select all

/filebot/filebot.sh \
-script fn:amc \
--output /media \
--lang "$FILEBOT_LANG" \
If I leave it enabled:

Code: Select all

/filebot/filebot.sh \
-script fn:amc \
--output /media \
"${EXTRA_FILEBOT_PARAM}" \
--lang "$FILEBOT_LANG" \
I'm going crazy.

Re: Problems with AMC-Script with Qbitorrent

Posted: 23 Mar 2025, 11:07
by rednoah
:?: Did you set EXTRA_FILEBOT_PARAM to no?

:idea: Because you seem to be inadvertently passing no as input file path:

Shell: Select all

/filebot/filebot.sh \
-script fn:amc \
--output /media \
"no"
...

Console Output: Select all

Argument[0]: File does not exist: /run/s6-rc:s6-rc-init:kAPHpm/servicedirs/svc-qbittorrent/no





:idea: The crash log is unrelated to any of the above. cat /tmp/hs_err_pid340.log will give you the details. A common issue when making your own alpine container are native dependencies. If you're using the TAR package then that does include libmediainfo.so but this libmediainfo.so is for GNU Linux and not Alpine Linux. Using GNU Linux binaries on Alpine Linux will typically lead to a crash. Please read the filebot-docker/Dockerfile.alpine dockerfile for details.

Code: Select all

2025/03/23 10:38:04	stderr	Aborted (core dumped)
2025/03/23 10:37:57	stdout	#
2025/03/23 10:37:57	stdout	# See problematic frame for where to report the bug.
2025/03/23 10:37:57	stdout	# The crash happened outside the Java Virtual Machine in native code.
2025/03/23 10:37:57	stdout	#   https://gitlab.alpinelinux.org/alpine/aports/issues
2025/03/23 10:37:57	stdout	# If you would like to submit a bug report, please visit:
2025/03/23 10:37:57	stdout	#
2025/03/23 10:37:57	stdout	# /tmp/hs_err_pid340.log

Re: Problems with AMC-Script with Qbitorrent

Posted: 28 Mar 2025, 15:05
by lemonpwn3d
Hello! Sorry for the delay, I've been busy this week. In the end, I cleaned the container and rebuilt it from zero instead of restoring the backup, and now it works fine. Thanks for the help, Rednoah. :)))