rm: cannot remove '/usr/local/filebot-node': Is a directory

Any questions? Need some help?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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
:idea: Please read the FAQ and How to Request Help.
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post by rednoah »

e.g.

Code: Select all

export JAVA_OPTS="-Xmx512m"
filebot -script fn:sysinfo
:idea: Please read the FAQ and How to Request Help.
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post by rednoah »

export JAVA_OPTS="-Xmx512m" applies to your current environment (i.e. current shell script) only.
:idea: Please read the FAQ and How to Request Help.
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post by limera1n »

If I understand correctly, I should past it into my script for filebot, right?
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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 
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post by rednoah »

You can test things by running sysinfo and checking the output:

Code: Select all

export JAVA_OPTS="-Xmx512m"
filebot -script fn:sysinfo
:idea: Please read the FAQ and How to Request Help.
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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.


:arrow: 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.
:idea: Please read the FAQ and How to Request Help.
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post by limera1n »

the problem is that it will not run under admin (only if click run manually)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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?
:idea: Please read the FAQ and How to Request Help.
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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.


:idea: 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.
:idea: Please read the FAQ and How to Request Help.
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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.
:idea: Please read the FAQ and How to Request Help.
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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

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

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post 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

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


:idea: Add export USER="admin" to your script as well to fix the environment.
:idea: Please read the FAQ and How to Request Help.
limera1n
Posts: 28
Joined: 24 Jan 2020, 17:58

Re: rm: cannot remove '/usr/local/filebot-node': Is a directory

Post by limera1n »

Working now, thank you so much for your help rednoah!
Post Reply