Filebot no longer works since the update to DSM 7

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
missaq
Posts: 10
Joined: 22 Oct 2019, 07:42

Filebot no longer works since the update to DSM 7

Post by missaq »

Dear community since the update to DSM7 Filebot no longer works for me.
As I see it, everything is installed correctly. Also the file structure has not changed.

Code: Select all

Current application revision (r8735) does not match cache revision (r8723): reset cache
Initialize new disk cache: /var/packages/filebot/var/data/1027/cache/0
Low Memory Limit: 218 MB
* Consider using JAVA_OPTS -Xmx384m or higher
* Consider using -no-index on low-memory devices
FileBot 4.9.4 (r8735)
JNA Native: 6.1.0
MediaInfo: 19.04
Tools: p7zip/16.02 unrar/5.70
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2021-06-15 (r755)
Groovy: 3.0.8
JRE: OpenJDK Runtime Environment 16.0.2
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 218 MB Max Memory / 27 MB Used Memory
OS: Linux (aarch64)
HW: Linux MISSAQ-DS118 4.4.180+ #41890 SMP Fri Jun 25 02:40:26 CST 2021 aarch64 GNU/Linux synology_rtd1296_ds118
CPU/MEM: ARMv8 Processor rev 4 (v8l) [MemTotal: 905 MB | MemFree: 118 MB | MemAvailable: 81 MB | SwapCached: 6 MB | SwapTotal: 2.1 GB | SwapFree: 2.1 GB]
STORAGE: ext4 [/] @ 1.2 GB | ext4 [/volume1] @ 2.4 TB
USER: missaq
DATA: /var/packages/filebot/var/data/1027
Package: SPK
Activate License [PX7894368] on [Fri Jul 30 10:59:02 CEST 2021]
License: FileBot License PX7894368 (Valid-Until: 2069-05-11)
Done ヾ(@⌒ー⌒@)ノ
As soon as I have downloaded a file via jDownloader, it is stored in the download folder and then nothing happens. This has worked great for 2 years. Also the log file is empty.
My Filebot script (filebot.sh) looks like this:

Code: Select all

#!/bin/sh -xu
export JAVA_OPTS="-Xmx512M"
##FileBot benätigt diese Variablen
LOG="/volume1/Mediathek/Logs/amc.log"
EXC="/volume1/Mediathek/Logs/amc.txt"
MOVIES="/volume1/Mediathek/{plex}"
SERIES="/volume1/Mediathek/{plex}"
### Wenn Filebot mal etwas nicht zuordnen kann, dann kannst du es in einen seperaten Ordner verschieben lassen, dann bleibt es im Downloadordner Übersichtlich.
UNSORTED="/volume1/Mediathek/Downloads/Unsorted/{file.structurePathTail}"
##FileBot ausführen
/var/packages/filebot/target/filebot.sh -script fn:amc --def skipExtract=y --lang de --log-file $LOG --action move "$1" --def "seriesFormat=$SERIES" "movieFormat=$MOVIES" "unsortedFormat=$UNSORTED" -non-strict --def unsorted=y --def clean=y --conflict auto --output /volume1/Mediathek
## Aufräumen, --def root löscht den Unterordner mit
/var/packages/filebot/target/filebot.sh -script fn:cleaner "$1" --def root=y
And this is how the eventscripter script looks like with jDownloader:

Code: Select all

[{"eventTrigger":"ON_ARCHIVE_EXTRACTED", "enabled":true, "name":"FileBot", "script":"var amcFile = \"/volume1/Mediathek/filebot.sh\";var path = archive.getFolder(); callAsync(function() {}, amcFile, path);", "eventTriggerSettings":{}, "id":1557319344501}]

When I trigger it manually via ssh, the following message appears:

Code: Select all

sh /volume1/Mediathek/filebot.sh
/volume1/Mediathek/filebot.sh: line 11: /var/packages/filebot/target/filebot.sh: No such file or directory
/volume1/Mediathek/filebot.sh: line 13: /var/packages/filebot/target/filebot.sh: No such file or directory

 sh /volume1/Mediathek/filebot.sh /volume1/Mediathek/Downloads/
/volume1/Mediathek/filebot.sh: line 11: /var/packages/filebot/target/filebot.sh: No such file or directory
/volume1/Mediathek/filebot.sh: line 13: /var/packages/filebot/target/filebot.sh: No such file or directory
As I said nothing was changed in the script. The exact same scripts ran the last 2 years.
The bad thing is, that nothing happens. i would be happy about an error message, but nothing happens.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot no longer works since the update to DSM 7

Post by rednoah »

Does the path you call in /volume1/Mediathek/filebot.sh script exist?

Code: Select all

/var/packages/filebot/target/filebot.sh: No such file or directory

:arrow: Assuming it exists, but appears to not exist from the current users point of view, I'd start by checking what $USER you're running as when it doesn't work, and making sure that that user has permissions to all the relevant files and executables.


:idea: DSM 7 is no longer running everything as root, and instead users package-specific users, so it may (by design for the purpose of security) introduce new permission issues.
:idea: Please read the FAQ and How to Request Help.
missaq
Posts: 10
Joined: 22 Oct 2019, 07:42

Re: Filebot no longer works since the update to DSM 7

Post by missaq »

Hi rednoah,
rednoah wrote: 30 Jul 2021, 12:59 Does the path you call in /volume1/Mediathek/filebot.sh script exist?

Code: Select all

/var/packages/filebot/target/filebot.sh: No such file or directory

:arrow: Assuming it exists, but appears to not exist from the current users point of view, I'd start by checking what $USER you're running as when it doesn't work, and making sure that that user has permissions to all the relevant files and executables.
As you can see, this file exists with the correct user:

Code: Select all

/volume1/Mediathek$ ls -la
total 44
drwxrwxrwx+  7 root   root   4096 Dec  6  2019  .
drwxr-xr-x  17 root   root   4096 Jul 30 10:56  ..
drwxrwxrwx+  4 missaq users  4096 Jul 30 11:06  Downloads
drwxrwxrwx+  3 root   root   4096 Jul 30 10:56  @eaDir
-rwxrwxrwx+  1 missaq users   890 May 27 08:54  filebot.sh
btw I could not install filebot as usual via the package manager. It always came the message that the download was canceled.
It seems that I'm not the only one this happened to. There are others in the jDownloader forum.
So I installed Filebot manually.
Filebot Node was no problem via the package manager.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot no longer works since the update to DSM 7

Post by rednoah »

This line tells us that although /volume1/Mediathek/filebot.sh is accessible and executed, /var/packages/filebot/target/filebot.sh is not:

Code: Select all

/volume1/Mediathek/filebot.sh: line 11: /var/packages/filebot/target/filebot.sh: No such file or directory

:?: Does /var/packages/filebot/target/filebot.sh exist?


:?: Which $USER is calling /volume1/Mediathek/filebot.sh? Can this user read and execute /var/packages/filebot/target/filebot.sh? (the answer is no, based on the error message above, so our first step is to figure out which $USER we're running as; most likely the JD package-specific user; and then take it from there)


:?: Have you tried filebot instead of /var/packages/filebot/target/filebot.sh? AFAIK, it's possible to run an executable (system executes command) even if you don't have read permission (system executes shell that then reads and interprets a given shell script file).
:idea: Please read the FAQ and How to Request Help.
missaq
Posts: 10
Joined: 22 Oct 2019, 07:42

Re: Filebot no longer works since the update to DSM 7

Post by missaq »

rednoah wrote: 30 Jul 2021, 13:46 :?: Which $USER is calling /volume1/Mediathek/filebot.sh? Can this user read and execute /var/packages/filebot/target/filebot.sh? (the answer is no, based on the error message above, so our first step is to figure out which $USER we're running as; most likely the JD package-specific user; and then take it from there)
how can i find this out?
Last edited by missaq on 30 Jul 2021, 15:08, edited 1 time in total.
missaq
Posts: 10
Joined: 22 Oct 2019, 07:42

Re: Filebot no longer works since the update to DSM 7

Post by missaq »

There seems to be no script in it:

Code: Select all

/var/packages/filebot/target$ ls -la
total 20
drwxr-xr-x  5 FileBot FileBot 4096 Jul 30 10:51 .
drwxr-xr-x 10 root    root    4096 Jul 30 10:52 ..
drwxr-xr-x  2 FileBot FileBot 4096 Jul 30 10:51 bin
drwxr-xr-x  2 FileBot FileBot 4096 Jul 30 10:51 jar
drwxr-xr-x  6 FileBot FileBot 4096 Jul 30 10:51 lib
But in the bin folder:

Code: Select all

/var/packages/filebot/target/bin$ ls -la
total 12
drwxr-xr-x 2 FileBot FileBot 4096 Jul 30 10:51 .
drwxr-xr-x 5 FileBot FileBot 4096 Jul 30 10:51 ..
-rwxr-xr-x 1 FileBot FileBot 3025 Jul 28 08:05 filebot

So I changed the call to:

Code: Select all

##FileBot ausführen
/var/packages/filebot/target/[b]bin/filebot[/b] -script fn:amc --def skipExtract=y --lang de --log-file $LOG --action move "$1" --def "seriesFormat=$SERIES" "movieFormat=$MOVIES" "unsortedFormat=$UNSORTED" -non-strict --def unsorted=y --def clean=y --conflict auto --output /volume1/Mediathek
## Aufräumen, --def root löscht den Unterordner mit
/var/packages/filebot/target/[b]bin/filebot[/b] -script fn:cleaner "$1" --def root=y
And then it deleted my log folder and file! :(

This was the output:

Code: Select all

sh filebot.sh
Run script [fn:amc] at [Fri Jul 30 16:42:57 CEST 2021]
Parameter: skipExtract = y
Parameter: seriesFormat = /volume1/Mediathek/{plex}
Parameter: movieFormat = /volume1/Mediathek/{plex}
Parameter: unsortedFormat = /volume1/Mediathek/Downloads/Unsorted/{file.structurePathTail}
Parameter: unsorted = y
Parameter: clean = y
Argument[0]: /volume1/Mediathek
Invalid usage: output folder [/volume1/Mediathek] must be separate from input arguments [/volume1/Mediathek]
Abort (×_×)
Delete /volume1/Mediathek/Logs/amc.log
Delete /volume1/Mediathek/Logs
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot no longer works since the update to DSM 7

Post by rednoah »

filebot is now called. The original problem is solved.


The next problem is invalid usage of filebot which is rather self-explanatory:

Code: Select all

Invalid usage: output folder [/volume1/Mediathek] must be separate from input arguments [/volume1/Mediathek]
Abort (×_×)
TL;DR input folder and output folder must not be the same folder



missaq wrote: 30 Jul 2021, 14:15 And then it deleted my log folder and file! :(
You're calling filebot -script fn:cleaner "/volume1/Mediathek" --def root=y and so it does as instructed.
:idea: Please read the FAQ and How to Request Help.
missaq
Posts: 10
Joined: 22 Oct 2019, 07:42

Re: Filebot no longer works since the update to DSM 7

Post by missaq »

rednoah wrote: 30 Jul 2021, 15:12 filebot is now called. The original problem is solved.


The next problem is invalid usage of filebot which is rather self-explanatory:

Code: Select all

Invalid usage: output folder [/volume1/Mediathek] must be separate from input arguments [/volume1/Mediathek]
Abort (×_×)
TL;DR input folder and output folder must not be the same folder



missaq wrote: 30 Jul 2021, 14:15 And then it deleted my log folder and file! :(
You're calling filebot -script fn:cleaner "/volume1/Mediathek" --def root=y and so it does as instructed.
But this script worked perfectly for 2 years. Why does nothing work now? What else has changed with the filebot update?
Look i posted this back then and it worked great until the last update.
viewtopic.php?f=4&t=11170&p=49147#p49147
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot no longer works since the update to DSM 7

Post by rednoah »

Well, something in your side, or the JD side has changed. filebot has not changed, but the parameters that are passed in by your code may have changed. Based on the logs above, filebot itself works correctly according to the parameters that are passed along from your upstream programs.


:idea: This is your glue logic script (which you may or may not have written yourself; definitely not part of FileBot though) that calls filebot - passing along $1 - and so filebot is called with whatever input argument your glue logic script is called with, and so if something changed, then something has changed in how your glue logic script is called by your upstream programs:

Code: Select all

##FileBot ausführen
/var/packages/filebot/target/filebot.sh -script fn:amc --def skipExtract=y --lang de --log-file $LOG --action move "$1" --def "seriesFormat=$SERIES" "movieFormat=$MOVIES" "unsortedFormat=$UNSORTED" -non-strict --def unsorted=y --def clean=y --conflict auto --output /volume1/Mediathek
## Aufräumen, --def root löscht den Unterordner mit
/var/packages/filebot/target/filebot.sh -script fn:cleaner "$1" --def root=y


EDIT:
missaq wrote: 30 Jul 2021, 15:28 But this script worked perfectly for 2 years. Why does nothing work now? What else has changed with the filebot update?
Look i posted this back then and it worked great until the last update.
viewtopic.php?f=4&t=11170&p=49147#p49147
filebot was previously called like this:

Code: Select all

Argument[0]: /volume1/Mediathek/Downloads/72BD-DieSchoeneunddasBiestTHEATRICAL-LizardSquad/Die.Schoene.und.das.Biest.1991.THEATRiCAL.German.720p.BluRay.x264-LizardSquad/Proof
But filebot is now incorrectly called like this by your glue logic script:

Code: Select all

Argument[0]: /volume1/Mediathek
:arrow: filebot itself hasn't changed. If you call it with the same input arguments, then it will work the same.


:?: Why is filebot called with different arguments now? Sorry, no idea. You'd have to ask the JD developers or the person who made the JD / FileBot integration that you are using.
:idea: Please read the FAQ and How to Request Help.
missaq
Posts: 10
Joined: 22 Oct 2019, 07:42

Re: Filebot no longer works since the update to DSM 7

Post by missaq »

Hello rednoah,

sorry I was so upset yesterday. I sat for hours on the script and did not know what to do.
Now I finally got it right.

My folder structure looked like this before:

/volume1/Mediathek/downloads
/volume1/Mediathek/logs
/volume1/Mediathek/Movies
/volume1/Mediathek/TV Shows
/volume1/Mediathek/filebot.sh


Everything was in the Mediathek folder, so also the fielbot.sh script.
I have no idea on where what changed, but I was able to get it all to work once I moved the filebot.sh script to the downloads folder.
As you pointed out, it must have something to do with this $1. I have no idea what that stands for.

The folder structure now looks like this:
/volume1/Mediathek/downloads/filebot.sh

The script now executes its tasks and cleans up afterwards.

Just one last question. Can you give me the URL which I can add to my package source on Synology?

Currently the URL's look like this:

Java Installer: https://raw.githubusercontent.com/redno ... -dsm7.json

Filebot Node: https://raw.githubusercontent.com/fileb ... -dsm7.json

Filebot: ?

Thanks
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot no longer works since the update to DSM 7

Post by rednoah »

:idea: The official package repository is currently DSM 6 only, and will switch to being DSM 7 only with the next release:
https://www.filebot.net/linux/syno.html
:idea: Please read the FAQ and How to Request Help.
Post Reply