Page 2 of 2
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 15:40
by rednoah
800 MB is a lot of memory. It should definitely not run out of memory.
* if you run filebot via FileBot Node which will configure the memory limit before the call, which you may have to do yourself if you're manually running filebot on the command-line
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 15:50
by limera1n
how can I configure the memory limit for filebot? I mostly call it through task scheduler (automatically) which does not involve filebot node
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 16:04
by rednoah
e.g.
Code: Select all
export JAVA_OPTS="-Xmx512m"
filebot -script fn:sysinfo
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 16:07
by limera1n
will this settings hold or should I use it every time when running filebot? I mean DSM will not reset it after reboot for example?
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 16:17
by rednoah
export JAVA_OPTS="-Xmx512m" applies to your current environment (i.e. current shell script) only.
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 16:22
by limera1n
If I understand correctly, I should past it into my script for filebot, right?
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 16:35
by limera1n
like this:
Code: Select all
#!/bin/bash
FILE=""
DIR="/volume1/downloads/"
if [ "$(ls -A $DIR)" ]; then
export JAVA_OPTS="-Xmx512m"
filebot -script 'fn:amc' /volume1/downloads --output /volume1/video --action move -non-strict --order Airdate --conflict auto --lang ru --def 'clean=y' 'skipExtract=y' 'minFileSize=100000000' 'excludeList=.excludes' --apply refresh --log all --log-file '/usr/local/filebot-node/data/filebot.log'
fi
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 16:50
by rednoah
You can test things by running sysinfo and checking the output:
Code: Select all
export JAVA_OPTS="-Xmx512m"
filebot -script fn:sysinfo
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 17:04
by limera1n
that's the output:
Code: Select all
root@DS414:~# export JAVA_OPTS="-Xmx512m"
root@DS414:~# filebot -script fn:sysinfo
FileBot 4.9.1 (r7306)
JNA Native: 6.1.0
MediaInfo: 19.04
p7zip: p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
unrar: UNRAR 5.21 freeware
FFprobe: 3.3.7
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2020-03-16 (r625)
Groovy: 3.0.2
JRE: OpenJDK Runtime Environment 14
JVM: 32-bit OpenJDK Server VM
CPU/MEM: 2 Core / 519 MB Max Memory / 28 MB Used Memory
OS: Linux (arm)
HW: Linux DS414 3.2.40 #24922 SMP Mon Aug 19 12:08:26 CST 2019 armv7l GNU/Linux synology_armadaxp_ds414
STORAGE: ext4 [/] @ 1.5 GB | ext4 [/volume1] @ 10 TB
DATA: /volume1/@appstore/filebot/data/root
Package: SPK
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 17:06
by limera1n
I also noticed a strange thing: filebot scheduled tasks will only run under root for some reason. It will run under admin only if I click run manually but not on scheduled time. Is it ok?
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 17:17
by rednoah
limera1n wrote: ↑30 Mar 2020, 17:06
I also noticed a strange thing: filebot scheduled tasks will only run under root for some reason. Is it ok?
I would strongly recommend
not running
filebot as root. It's probably not ok, but in strange unexpected ways.

As far as I remember, Synology Scheduler has a setting where you can choose as what user you wanna run your tasks. Selected
admin instead.
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 17:18
by limera1n
the problem is that it will not run under admin (only if click run manually)
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 17:19
by rednoah
DSM doesn't allow you to select admin? Or it appears to be running as root even though you've selected admin? Or you get a specific error when you do run filebot as admin instead of root?
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 17:24
by limera1n
no, i can select to run as admin in task scheduler, but it will not do anything on scheduled time. E.g. if schedule the task to run on 20:30 nothing will happen. Only if I select the task in task scheduler and click run manually or if I make it run under root. I dont get any error.
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 17:28
by rednoah
limera1n wrote: ↑30 Mar 2020, 17:24
if schedule the task to run on 20:30 nothing will happen
There's
always console output. Either something happens, or there's console output telling you that something didn't happen for some reason.

You could argue that Synology Task Scheduler is buggy and really doesn't run tasks at all at the scheduled time, but that's rather unlikely, and a case for Synology Support if it is indeed the case.
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 17:33
by limera1n
but I dont run it through console and task scheduler doesnt produce any output. Or there is way to check it? sorry for my ignorance
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 17:35
by rednoah
As far as I remember Synology Task Scheduler has lots of buttons. You can see the console log for the last call. You can even set it to send the console output as email to you.
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 17:43
by limera1n
yeah, you are right, found it:
Code: Select all
Error during startup: ExceptionInInitializerError
java.lang.ExceptionInInitializerError
at net.filebot.Main.main(Unknown Source)
Caused by: net.sf.ehcache.CacheException: java.nio.file.AccessDeniedException: /volume1/@appstore/filebot/data/root/cache/0/.lock
at net.filebot.CacheManager.<init>(Unknown Source)
at net.filebot.CacheManager.<clinit>(Unknown Source)
... 1 more
Caused by: java.nio.file.AccessDeniedException: /volume1/@appstore/filebot/data/root/cache/0/.lock
at net.filebot.CacheManager.acquireDiskStore(Unknown Source)
... 3 more
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 18:07
by rednoah
So when
admin is running FileBot, somehow
$USER is still
root? This makes no sense whatsoever:
Code: Select all
java.nio.file.AccessDeniedException: /volume1/@appstore/filebot/data/root/cache/0/.lock

But yes, since root has initialized those files with root permissions, other users will not be able access those files.

Add
export USER="admin" to your script as well to fix the environment.
Re: rm: cannot remove '/usr/local/filebot-node': Is a directory
Posted: 30 Mar 2020, 18:23
by limera1n
Working now, thank you so much for your help rednoah!