Page 1 of 1

Filebot working only as root

Posted: 07 Jun 2014, 13:02
by jmiranda
Good Morning,

I attempted to search for the particular issue I am having and I have a feeling I am just doing something dumb, but never the less I am asking for a little bit of help with getting filebot to run correctly as a regular user (deluge) instead of having to elevate access to have the program run correctly on my server.

This is my output for filebot -script fn:sysinfo

Code: Select all

FileBot 4.1 (r2245)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.69
7-Zip-JBinding: OK
chromaprint-tools: fpcalc version 1.1.0 (/usr/share/filebot/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.3.2
JRE: OpenJDK Runtime Environment 1.7.0_55 (headless)
JVM: 64-bit OpenJDK 64-Bit Server VM
OS: Linux (amd64)
uname: Linux server 3.13.0-27-generic #50-Ubuntu SMP Thu May 15 18:06:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Done ヾ(@⌒ー⌒@)ノ
Typically when I run filebot -rename with my main user account for my server I get an error along these lines.

Code: Select all

Exception: Unable to identify or process any files
java.lang.Exception: Unable to identify or process any files
	at net.filebot.cli.CmdlineOperations.renameAll(CmdlineOperations.java:574)
	at net.filebot.cli.CmdlineOperations.renameMovie(CmdlineOperations.java:499)
	at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:138)
	at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:72)
	at net.filebot.Main.main(Main.java:192)
Failure (°_°)
But if I run the command as sudo filebot -name file.mkv it works just fine. My main issue is that I am attempting to automate Deluge/Filebot and I am unable to get filebot to run correctly after I point it to you shell script from the tutorial thread. I followed that to the T only changing my media root file in the output portion of script. I am not entirely sure if this is actually a filebot issue or just an issue with java. I have full control over the server so if there is anything else I need to add/remove I can do that.

Thank you for taking the time to read my post and hopefully we can figure this out. It's probably just me overlooking something obivous.

Re: Filebot working only as root

Posted: 07 Jun 2014, 17:53
by rednoah
I suppose it's a permissions issue, and the process doesn't have permission to list files that folder you're passing in. Try passing in a file and see what happens.

Re: Filebot working only as root

Posted: 08 Jun 2014, 02:01
by jmiranda
Rednoah,

Thank you so much for you response. So I think I solved the problem of filebot not working without elevated permissions. I didn't realize I was running deluged/deluge-web as root. So I fixed that issue, but I am still having issues with filebot running after completing a torrent. Here is the script I have deluge call once I complete a torrent.

Code: Select all

#!/bin/bash
TORRENT_ID=$1
TORRENT_NAME=$2
TORRENT_PATH=$3

filebot -script fn:amc --output "/media/" --log-file amc.log --action copy --conflict override -non-strict --def artwork=y "ut_dir=$TORRENT_PATH/$TORRENT_NAME" "ut_kind=multi" "ut_title=$TORRENT_NAME"
/media/ is the root folder for all of my media on my server. Do you think this is causing the issue with filebot?

Here is the output of amc.log as well

Code: Select all

Parameter: artwork = y
Parameter: ut_dir = /
Parameter: ut_kind = multi
Parameter: ut_title = null
NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
        at net.filebot.media.ReleaseInfo$FolderEntryFilter.accept(ReleaseInfo.java:421)
        at net.filebot.media.MediaDetection.isDiskFolder(MediaDetection.java:92)
        at net.filebot.cli.ScriptShellMethods.isDisk(ScriptShellMethods.java:89)
        at Script1.resolveInput(Script1.groovy:141)
        at Script1$_resolveInput_closure80.doCall(Script1.groovy:142)
        at Script1.resolveInput(Script1.groovy:142)
        at Script1$_resolveInput_closure80.doCall(Script1.groovy:142)
        at Script1.resolveInput(Script1.groovy:142)
        at Script1$_resolveInput_closure80.doCall(Script1.groovy:142)
        at Script1.resolveInput(Script1.groovy:142)
        at Script1$_run_closure46.doCall(Script1.groovy:165)
        at Script1.run(Script1.groovy:165)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:60)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:81)
        at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:108)
        at net.filebot.Main.main(Main.java:192)
Failure (°_°)

Re: Filebot working only as root

Posted: 08 Jun 2014, 02:24
by rednoah
If you look at the ut_ parameter that are passed in you'll see that they don't make sense. For some reason the parameters are not available in the deluge-filebot-amc startup script. You'll need to figure out the deluge side of things why parameters are not passed as expected, or what has changed.

Re: Filebot working only as root

Posted: 08 Jun 2014, 23:35
by jmiranda
It seems like I just didn't have my script formatted correctly. I recreated my script and it seemed to work. I think it helped that deludge wasn't being ran as root anymore. Thanks for the help rednoah.