Running FileBot from the console, Groovy scripting, shell scripts, etc
phrak9
Posts: 15 Joined: 07 Jul 2018, 19:53
Post
by phrak9 » 07 Jul 2018, 20:14
I have a couple scripts that run upon torrent completion to run filebot. even though I added a valid license file, when the script runs filebot errors and fails to see the license file. Script is owned by debian-transmission. and please keep in mind it has been working flawlessly for almost a year. Updated and added a license and now its fucked.
Where it is called.
settings.json
"script-torrent-done-filename": "/etc/transmission-daemon/process.sh",
contents of process.sh
#!/bin/bash
LANG="en_US.UTF-8"
/usr/bin/filebot -script fn:amc --output /srv/1TBUSB/NewStuff --action copy -non-strict /srv/1TBUSB/Recents --encoding utf8 --def clean=y --log-file amc.log -no-xattr --def minFileSize=0 --def excludeList=amc.txt
logfile output
Code: Select all
Jul 7 12:47:19 Torrent-OpenVPN-Filebot transmission-daemon[527]: Locking /var/log/transmission-daemon/.filebot/logs/amc.log
Jul 7 12:47:22 Torrent-OpenVPN-Filebot transmission-daemon[527]: Run script [fn:amc] at [Sat Jul 07 12:47:22 PDT 2018]
Jul 7 12:47:22 Torrent-OpenVPN-Filebot transmission-daemon[527]: Parameter: clean = y
Jul 7 12:47:22 Torrent-OpenVPN-Filebot transmission-daemon[527]: Parameter: minFileSize = 0
Jul 7 12:47:22 Torrent-OpenVPN-Filebot transmission-daemon[527]: Parameter: excludeList = amc.txt
Jul 7 12:47:22 Torrent-OpenVPN-Filebot transmission-daemon[527]: Argument[0]: /srv/1TBUSB/Recents
Jul 7 12:47:22 Torrent-OpenVPN-Filebot transmission-daemon[527]: Use excludes: /srv/1TBUSB/NewStuff/amc.txt (47)
Jul 7 12:47:23 Torrent-OpenVPN-Filebot transmission-daemon[527]: Ignore extra: /srv/1TBUSB/Recents/Mr Show/Extras
Jul 7 12:47:23 Torrent-OpenVPN-Filebot transmission-daemon[527]: Input: /srv/1TBUSB/Recents/Brooklyn.Nine-Nine.S05E08.HDTV.x264-SVA[ettv]/Brooklyn.Nine-Nine.S05E08.HDTV.x264-SVA[ettv].mkv
Jul 7 12:47:25 Torrent-OpenVPN-Filebot transmission-daemon[527]: Group: [tvs:brooklyn nine nine] => [Brooklyn.Nine-Nine.S05E08.HDTV.x264-SVA[ettv].mkv]
Jul 7 12:47:25 Torrent-OpenVPN-Filebot transmission-daemon[527]: Rename episodes using [TheTVDB]
Jul 7 12:47:25 Torrent-OpenVPN-Filebot transmission-daemon[527]: Auto-detected query: [Brooklyn Nine Nine]
Jul 7 12:47:28 Torrent-OpenVPN-Filebot transmission-daemon[527]: Fetching episode data for [Brooklyn Nine-Nine]
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: License Error: UNREGISTERED
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: ________________________________________________
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: / Please purchase a FileBot License: \
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: \ https://www.filebot.net/purchase.html#deb /
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: ------------------------------------------------
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: \ . .
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: \ / `. .' "
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: \ .---. < > < > .---.
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: \ | \ \ - ~ ~ - / / |
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: _____ ..-~ ~-..-~
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: | | \~~~\.' `./~~~/
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: --------- \__/ \__/
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: .' O \ / / \ "
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: (_____, `._.' | } \/~~~/
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: `----. / } | / \__/
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: `-. | / | / `. ,~~|
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: ~-.__| /_ - ~ ^| /- _ `..-'
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: | / | / ~-. `-. _ _ _
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: |_____| |_____| ~ - . _ _ _ _ _>
Jul 7 12:47:29 Torrent-OpenVPN-Filebot transmission-daemon[527]: FileBot requires a valid license. Please run `filebot --license *.psm` to install your FileBot license.
However when I run the script manually no error message.
Code: Select all
Locking /root/.filebot/logs/amc.log
Run script [fn:amc] at [Sat Jul 07 13:02:30 PDT 2018]
Parameter: clean = y
Parameter: minFileSize = 0
Parameter: excludeList = amc.txt
Argument[0]: /srv/1TBUSB/Recents
Use excludes: /srv/1TBUSB/NewStuff/amc.txt (48)
Ignore extra: /srv/1TBUSB/Recents/Mr Show/Extras
No files selected for processing
Done ヾ(@⌒ー⌒@)ノ
rednoah
The Source
Posts: 23930 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 07 Jul 2018, 20:32
If you have a different user calling FileBot, then you need to install your license as that different user.
e.g.
Code: Select all
/var/lib/transmission-daemon$ sudo -H -u debian-transmission bash -c 'filebot --license *.psm'
phrak9
Posts: 15 Joined: 07 Jul 2018, 19:53
Post
by phrak9 » 07 Jul 2018, 21:53
The suggestion threw an error, so I tried this method.
runuser -l debian-transmission -c 'filebot --license FileBot_License_PXXXXXX.psm'
now im getting this.
Code: Select all
Jul 7 14:46:40 Torrent-OpenVPN-Filebot transmission-daemon[527]: Locking /var/lib/transmission-daemon/.filebot/logs/amc.log
Jul 7 14:46:42 Torrent-OpenVPN-Filebot transmission-daemon[527]: Run script [fn:amc] at [Sat Jul 07 14:46:42 PDT 2018]
Jul 7 14:46:42 Torrent-OpenVPN-Filebot transmission-daemon[527]: Parameter: clean = y
Jul 7 14:46:42 Torrent-OpenVPN-Filebot transmission-daemon[527]: Parameter: minFileSize = 0
Jul 7 14:46:42 Torrent-OpenVPN-Filebot transmission-daemon[527]: Parameter: excludeList = amc.txt
Jul 7 14:46:42 Torrent-OpenVPN-Filebot transmission-daemon[527]: Argument[0]: /srv/1TBUSB/Recents
Jul 7 14:46:42 Torrent-OpenVPN-Filebot transmission-daemon[527]: Use excludes: /srv/1TBUSB/NewStuff/amc.txt (49)
Jul 7 14:46:42 Torrent-OpenVPN-Filebot transmission-daemon[527]: Ignore extra: /srv/1TBUSB/Recents/Mr Show/Extras
Jul 7 14:46:42 Torrent-OpenVPN-Filebot transmission-daemon[527]: Input: /srv/1TBUSB/Recents/The.Handmaids.Tale.S02E12.WEBRip.x264-TBS[ettv]/the.handmaids.tale.s02e12.webrip.x264-tbs[ettv].mkv
Jul 7 14:46:44 Torrent-OpenVPN-Filebot transmission-daemon[527]: Group: [tvs:the handmaids tale] => [the.handmaids.tale.s02e12.webrip.x264-tbs[ettv].mkv]
Jul 7 14:46:44 Torrent-OpenVPN-Filebot transmission-daemon[527]: Rename episodes using [TheTVDB]
Jul 7 14:46:44 Torrent-OpenVPN-Filebot transmission-daemon[527]: Auto-detected query: [The Handmaids Tale]
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: Fetch failed: https://api.thetvdb.com/search/series?name=The+Handmaids+Tale
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: java.lang.IllegalStateException: Failed to retrieve authorization token: connect timed out
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.web.TheTVDBClient.getAuthorizationToken(TheTVDBClient.java:117)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.web.TheTVDBClient.getRequestHeader(TheTVDBClient.java:82)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.web.TheTVDBClient.lambda$requestJson$0(TheTVDBClient.java:67)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.CachedResource.lambda$fetchIfModified$9(CachedResource.java:215)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.CachedResource.lambda$get$0(CachedResource.java:87)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.CachedResource.retry(CachedResource.java:121)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.CachedResource.lambda$get$1(CachedResource.java:87)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.Cache.computeIf(Cache.java:90)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.CachedResource.get(CachedResource.java:82)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.web.TheTVDBClient.requestJson(TheTVDBClient.java:67)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.web.TheTVDBClient.search(TheTVDBClient.java:125)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.web.TheTVDBClient.fetchSearchResult(TheTVDBClient.java:144)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.WebServices$TheTVDBClientWithLocalSearch.access$101(WebServices.java:193)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.WebServices$TheTVDBClientWithLocalSearch.lambda$fetchSearchResult$4(WebServices.java:213)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: Caused by: java.net.SocketTimeoutException: connect timed out
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.web.WebRequest.post(WebRequest.java:198)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.web.TheTVDBClient.postJson(TheTVDBClient.java:61)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: at net.filebot.web.TheTVDBClient.getAuthorizationToken(TheTVDBClient.java:113)
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: ... 13 more
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: SocketTimeoutException: connect timed out
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: Finished without processing any files
Jul 7 14:46:55 Torrent-OpenVPN-Filebot transmission-daemon[527]: Failure (°_°)
Runs no problem manually from the console as root.
phrak9
Posts: 15 Joined: 07 Jul 2018, 19:53
Post
by phrak9 » 07 Jul 2018, 22:07
reinstalled 4.7.9 and works as it did before. I guess I'll wait for the next update.
rednoah
The Source
Posts: 23930 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 08 Jul 2018, 19:11
Unrelated temporary network issue
(i.e. TheTVDB API service not responsive) at the time:
Code: Select all
SocketTimeoutException: connect timed out
Your root user had all the data cached at the time, and thus didn't talk to TheTVDB at all. The deluge user didn't have any data cached, needed to talk to TheTVDB, but failed because TheTVDB was down at the time.
Caches, preference, license, etc is all per-user and thus per-user behavior might be slightly different if you compare them without clearing cache / preferences / etc.