[DEBIAN] Utorrent - No Moving & Renames - No Logs

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
3KyNoX
Posts: 8
Joined: 29 Apr 2015, 22:09

[DEBIAN] Utorrent - No Moving & Renames - No Logs

Post by 3KyNoX »

Hello there and thanks for that great filebot app.

I'm trying to setup filebot and followed amc script tutorial that can be found here : viewtopic.php?f=4&t=215#p1561
I'm using Debian Jessie and Java 8 freshly installed from ppa: repository.

I got utorrent server installed and correctly imported the command to run inside utorrent settings.

The command looks like correctly run according to utorrent logs :

Code: Select all

[20150330 00:02:16] uT HTTP torrent add of '/tmp/0000099f-0009.utt' succeeded
[20150330 00:03:19] Executing: /usr/bin/filebot -script fn:amc --output "/opt/utorrent/Downloads" --log-file amc.log --action copy --conflict override -non-strict subtitles=en artwork=y "ut_label=" "ut_state=5" "ut_title=...
The main problem is that nothing is moved or renamed.
The second one is I really can't figure where amc.log is.

utorrent server is launched with the user 'nox' and nox got the writing rights (chown) in the path where utorrent is launched and where the files to move resides.

I also try to launch filebot by testing it like explained in amc post, and all runs pretty well (and got amc.log in .filebot home folder). It's just from the utorrent part nothing is done.

Any help would be gratefull.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEBIAN] Utorrent - No Moving & Renames - No Logs

Post by rednoah »

If it works for your user, but not for the utorrent user, then you know that it's gotta be some difference in permissions or environment that breaks things.

Does user 'nox' have a $HOME folder? All application data is in $HOME/.filebot and if that location is not accessible things will probably crash on initialization.

I'd start by redirecting std/err output to a known location in rtorrent-postprocess so you can see the output.
:idea: Please read the FAQ and How to Request Help.
3KyNoX
Posts: 8
Joined: 29 Apr 2015, 22:09

Re: [DEBIAN] Utorrent - No Moving & Renames - No Logs

Post by 3KyNoX »

Hello and thanks for reply.

utorrent server using nox user far as I see :

Code: Select all

nox       2236  0.3  0.1 291212  3544 ?        SNl  13:54   0:00 /opt/utorrent/utserver -settingspath /opt/utorrent -logfile /opt/utorrent/utorrent.log
and installed utorrent server as a service (using a script that can be found here : https://github.com/vortex-5/utorrent_in ... r/utorrent

So if I'm in true, it should write logfile in /opt/utorrent

And yes, nox user got home dit in /home/nox/ and chown in /opt folder

Does the logfile location can be set like this in run utorrent command ?

Code: Select all

filebot -script fn:amc --output "/opt/utorrent/Downloads" --log-file "/home/nox/.filebot/logs/amc.log"...
----- EDIT -----
Just tried to set log location like detailed upper, nothing appear in home directory while the command is launched inside utorrent.

----- EDIT #2 -----
Tried to modify command with 'su - nox -c 'filebot ...' with no logs anywhere
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEBIAN] Utorrent - No Moving & Renames - No Logs

Post by rednoah »

1)
You can pass in an absolute path for the log file. But you still need to make sure that $HOME/.filebot is accessible.

Have a look at the filebot.sh script and how it initializes all the application properties. Maybe forcing $HOME to a good location will make it work? Maybe $HOME is not set when called from utorrent?

Code: Select all

export HOME="/good/path"
filebot ...
Also I'd make sure that "filebot" works, and "java" which "filebot" depends on.

If the shell gives you a "java: command not found" (on error output) then you won't get any logs from filebot since it's never started.

2)
Your first response should be getting the shell output by adding IO redirection to the call:

Code: Select all

filebot -script fn:amc ... > /path/to/output.txt 2>&1
@see http://www.cyberciti.biz/faq/linux-redi ... t-to-file/
:idea: Please read the FAQ and How to Request Help.
3KyNoX
Posts: 8
Joined: 29 Apr 2015, 22:09

Re: [DEBIAN] Utorrent - No Moving & Renames - No Logs

Post by 3KyNoX »

Thanks again for answer.

1. Went to /usr/share/filebot.sh and added export HOME="/home/nox" with no more lucks
Tried too in utorrent run cmd -> export HOME="/home/nox" && filebot ... with same results

The command still correctly run out from utorrent

Code: Select all

[20150401 09:58:52] Executing: filebot -script fn:amc --output "/opt/utorrent/Downloads" --log-file amc.log --action copy --conflict override -non-strict subtitles=en artwork=y "ut_label=" "ut_state=5" "ut_title=...
java & filebot version:
nox - /opt/utorrent -> java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
nox - /opt/utorrent -> filebot -version
FileBot 4.5.6 (r2818) / Java(TM) SE Runtime Environment 1.8.0_45 (headless)

nox - /opt/utorrent -> filebot
FileBot 4.5.6 (r2818) / Java(TM) SE Runtime Environment 1.8.0_45 (headless)

--action [move, copy, keeplink, : Rename action
symlink, hardlink, test]
--conflict [skip, override, auto, : Conflict resolution
fail]
--db [TheTVDB, AniDB, TVRage] or : Media database
[TheMovieDB, OMDb] or [AcoustID, ID3
Tags] or [xattr]
--def [name=value] : Define script variables
--encoding [UTF-8, Windows-1252, : Output character encoding
GB18030]
--filter expression : Filter expression
--format expression : Format expression
--lang 2-letter language code : Language
--log [all, fine, info, warning, off] : Log level
--log-file path/to/log.txt : Log file
--log-lock [yes, no] : Lock log file
--mode [rename, subtitles, sfv] : Open GUI in single panel mode
--order [Airdate, Absolute, DVD] : Episode order
--output folder : Output path
--q series/movie title : Force lookup query
-check fileset : Create/Check verification files
-clear-cache : Clear cached and temporary data
-clear-prefs : Clear application settings
-extract : Extract archives
-get-missing-subtitles fileset : Fetch missing subtitles
-get-subtitles fileset : Fetch subtitles
-help : Print this help message
-list : Fetch episode list
-mediainfo : Get media info
-no-xattr : Disable extended attributes
-non-strict : Enable advanced matching and more
aggressive guess work
-r : Resolve folders recursively
-rename fileset : Rename media files
-script path/to/script.groovy : Run Groovy script
-unixfs : Do not strip invalid characters from
file paths
-version : Print version identifier
Here is result of amc script test from command line :

Code: Select all

filebot -script fn:amc --output "/opt/utorrent/Downloads" --log-file amc.log --action copy -non-strict "/opt/utorrent/Downloads" --def excludeList=amc.txt
results :
...
Processed 26 files
Done ヾ(@⌒ー⌒@)
And here, amc log file is correctly wrote in home folder.

2. Tried to put at the end of utorrent run command the export to a log file with multiple different ways, with no luck here too :

Image

I check many place at each time :
/root/.filebot/logs/..
/home/nox/.filebot/logs/..
/opt/utorrent/..
/opt/utorrent/Downloads/..

--------------------

Well, looks like utorrent shows it launch the run command, but nothing done. Really strange.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEBIAN] Utorrent - No Moving & Renames - No Logs

Post by rednoah »

1)
I guess there's nothing you can do other then getting output. Most likely filebot is never called, i.e. something fails before filebot is called.

2)
IO redirection is a SHELL feature, and whatever you paste into utorrent is probably not executed with a shell. So you it might be worth calling the shell and then call filebot and do IO redirection, i.e.

Try having utorrent run commands like this and see if there's any output / IO redirection works:

Code: Select all

echo 'test' > /path/to/output.txt 2>&1

Code: Select all

sh -c "echo 'test' > /path/to/output.txt 2>&1"

Code: Select all

sh -c 'filebot -version'

Code: Select all

sh -c 'filebot -version > /path/to/output.txt 2>&1'
You want to systematically get close to the issue, by trying things that can't not work and see where things go odd.
:idea: Please read the FAQ and How to Request Help.
3KyNoX
Posts: 8
Joined: 29 Apr 2015, 22:09

Re: [DEBIAN] Utorrent - No Moving & Renames - No Logs

Post by 3KyNoX »

Problem was coming from here.

sh -c was required, and also relative paths like -> /bin/sh -c 'filebot...'

Now works, thanks again for help & time and hope this solution will help more users in the future.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEBIAN] Utorrent - No Moving & Renames - No Logs

Post by rednoah »

Do you mind making a new thread and posting a small tutorial on how to setup the amc script with utorrent on Linux? I'm sure many people will run into the same issue.
:idea: Please read the FAQ and How to Request Help.
3KyNoX
Posts: 8
Joined: 29 Apr 2015, 22:09

Re: [DEBIAN] Utorrent - No Moving & Renames - No Logs

Post by 3KyNoX »

Sure, why not, I'll do this.

I can provide irc freenode channel also, more than 10 years on networks and saw some tryout before failed (nobody on channel).

But we will need rednoah on it :)
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEBIAN] Utorrent - No Moving & Renames - No Logs

Post by rednoah »

You're welcome to set something up, but honestly I'm not really interested in spending time on media that aren't indexed by Google. I know sometimes it's hard to find information, but at least with the forums it's there if you look hard enough. ;)

Though the sh -c 'command' thing should definitely be documented. Pretty sure pretty much everybody will fall for that one, unless utorrent fixes things on their side.
:idea: Please read the FAQ and How to Request Help.
Post Reply