License issue / Problem with revert action

Support for Ubuntu and other Desktop Linux distributions
Post Reply
junior0332
Donor
Posts: 15
Joined: 10 Jun 2015, 21:25

License issue / Problem with revert action

Post by junior0332 »

Hello,
I recently purchased a license and imported it with your instructions on a headless filebot configuration. Here is my sysinfo output

Code: Select all

FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so: Unable to load library 'mediainfo': Native library (linux-x86-64/libmediainfo.so) not found in resource path (/usr/share/filebot/jar/filebot.jar)
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-08-14 (r534)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 10.0.2
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 36 MB Used Memory
OS: Linux (amd64)
HW: Linux office 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/ray/.filebot
Package: DEB
License: FileBot License PX5609505 (Valid-Until: 2068-09-14)
Done ヾ(@⌒ー⌒@)ノ
When running the newest amc script from https://github.com/filebot/scripts.git, I get

Code: Select all

Input: /media/array1/downloads/Jeopardy.2018.09.13.720p.HDTV.x264-NTb.mkv
Group: [tvs:jeopardy] => [Jeopardy.2018.09.13.720p.HDTV.x264-NTb.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Jeopardy]
Fetching episode data for [Jeopardy!]
Fetching episode data for [Jeopardy (2002)]
Fetching episode data for [Super Jeopardy!]
Fetching episode data for [Sports Jeopardy]
Fetching episode data for [Jeopardy! Flashback]
License Error: java.io.FileNotFoundException: /home/ray/.filebot/cache/0/license.data (Permission denied)
 ________________________________________________
/ Please purchase a FileBot License:             \
\ https://www.filebot.net/purchase.html#deb      /
 ------------------------------------------------
      \                             .       .
       \                           / `.   .' "
        \                  .---.  <    > <    >  .---.
         \                 |    \  \ - ~ ~ - /  /    |
               _____          ..-~             ~-..-~
              |     |   \~~~\.'                    `./~~~/
             ---------   \__/                        \__/
            .'  O    \     /               /       \  "
           (_____,    `._.'               |         }  \/~~~/
            `----.          /       }     |        /    \__/
                  `-.      |       /      |       /      `. ,~~|
                      ~-.__|      /_ - ~ ^|      /- _      `..-'
                           |     /        |     /     ~-.     `-. _  _  _
                           |_____|        |_____|         ~ - . _ _ _ _ _>
FileBot requires a valid license. Please run `sudo -H -u debian-transmission filebot --license *.psm` to install your FileBot license.
I'm able to manually rename the file with the -rename action. However, I am not able to revert it. I've always used your revert action on the sym link that gets created.

Code: Select all

filebot -rename Jeopardy.2018.09.13.720p.HDTV.x264-NTb.mkv --format "/server/tv shows/{n}/Season {s.pad(2)}/{n} - {sxe} - {t}" -non-strict --action keeplink

Rename episodes using [TheTVDB]
Auto-detected query: [Jeopardy]
Fetching episode data for [Jeopardy!]
Fetching episode data for [Jeopardy (2002)]
Fetching episode data for [Super Jeopardy!]
Fetching episode data for [Sports Jeopardy]
Fetching episode data for [Jeopardy! Flashback]
[KEEPLINK] from [/media/array1/downloads/Jeopardy.2018.09.13.720p.HDTV.x264-NTb.mkv] to [/server/tv shows/Jeopardy!/Season 2018/Jeopardy! - 2018x154 - Kyle Jones, Shawn Moore, Lauren Stripling.mkv]
Processed 1 files


filebot -revert Jeopardy.2018.09.13.720p.HDTV.x264-NTb.mkv


Revert [/server/tv shows/Jeopardy!/Season 2018/Jeopardy! - 2018x154 - Kyle Jones, Shawn Moore, Lauren Stripling.mkv] to [/media/array1/downloads/Jeopardy.2018.09.13.720p.HDTV.x264-NTb.mkv]
Failed to revert file: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
I just updated to Ubuntu Server 18.04. Which installed Java 10. Not sure why it's looking for a X11 display. So I saw a post you replied to advising to try and set the env variable

Code: Select all

export JAVA_OPTS="-Djava.awt.headless=true"

filebot -revert Jeopardy.2018.09.13.720p.HDTV.x264-NTb.mkv

Revert [/server/tv shows/Jeopardy!/Season 2018/Jeopardy! - 2018x154 - Kyle Jones, Shawn Moore, Lauren Stripling.mkv] to [/media/array1/downloads/Jeopardy.2018.09.13.720p.HDTV.x264-NTb.mkv]
Failed to revert file: java.awt.HeadlessException
So in summary I only have two issues since upgrading to the new filebot deb pkg.
  • Unable to run AMC script from https://github.com/filebot/scripts.git. I would prefer to use it from this source as opposed to the -script fn method.
  • java.awt.HeadlessException when trying to revert a file via it's keeplink output.
I was able to successfully run the amc script upon torrent completion when using -script fn:amc

Code: Select all

Run script [fn:amc] at [Mon Sep 17 22:30:40 EDT 2018]
Parameter: ut_dir = /server/downloads/Better.Call.Saul.S04E07.720p.HDTV.x264-AVS.mkv
Parameter: ut_kind = multi
Parameter: ut_title = Better.Call.Saul.S04E07.720p.HDTV.x264-AVS.mkv
Parameter: ut_label = N/A
Parameter: seriesFormat = /server/tv shows/{n}/Season {s.pad(2)}/{n} - {sxe} - {t}
Parameter: animeFormat = /Anime/{n}/{fn}
Parameter: movieFormat = /server/movies/{n} ({y})/{n} ({y})
Parameter: musicFormat = /server/music/lp's/{n}/{n} - {album} ({y})/{pi.pad(2)+'. '}{artist} - {t}
Parameter: music = y
Parameter: skipExtract = y
Parameter: artwork = n
Parameter: clean = n
Parameter: reportError = y
Parameter: gmail = *****
Parameter: storeReport = n
Input: /media/array1/downloads/Better.Call.Saul.S04E07.720p.HDTV.x264-AVS.mkv
Group: [tvs:better call saul] => [Better.Call.Saul.S04E07.720p.HDTV.x264-AVS.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Better Call Saul]
Fetching episode data for [Better Call Saul]
[KEEPLINK] from [/media/array1/downloads/Better.Call.Saul.S04E07.720p.HDTV.x264-AVS.mkv] to [/server/tv shows/Better Call Saul/Season 04/Better Call Saul - 4x07 - Something Stupid.mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
But even when using this method, I still can't revert the file and the X11 Display error came back.

Code: Select all

filebot -revert Better.Call.Saul.S04E07.720p.HDTV.x264-AVS.mkv

Revert [/server/tv shows/Better Call Saul/Season 04/Better Call Saul - 4x07 - Something Stupid.mkv] to [/media/array1/downloads/Better.Call.Saul.S04E07.720p.HDTV.x264-AVS.mkv]
Failed to revert file: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
What source does the -script fn: grab from? I imagine it's not the github repo. Other than automatic updates, is there any reason you're against people cloning your active repository? I guess the more important issue at hand is the java headless exception. Your revert action with symlinks has saved me hours of work. Any help would be appreciated.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: License issue / Problem with revert action

Post by rednoah »

1.
This issue is caused by running FileBot as user debian-transmission but using the $HOME from user ray and so you will of course run into permission issues since User A can't read files from User B:

Code: Select all

License Error: java.io.FileNotFoundException: /home/ray/.filebot/cache/0/license.data (Permission denied)
:arrow: I recommend having a separate $HOME for each user. That means that you will also have to call filebot --licence for each user once, so that each user has an accessible license in it's own user home.


2.
No idea why filebot -revert wouldn't work in headless mode. It should. I'll investigate.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: License issue / Problem with revert action

Post by rednoah »

1.
Sorry, can't seem to reproduce the issue on my headless QNAP NAS device:

Code: Select all

# filebot -rename alias.1x01.mp4 --action symlink -non-strict
[SYMLINK] from [alias.1x01.mp4] to [Alias - 1x01 - Truth Be Told.mp4]

Code: Select all

# filebot -revert alias.1x01.mp4
Revert [Alias - 1x01 - Truth Be Told.mp4] to [alias.1x01.mp4]

2.
For testing, could you run these commands and post me the output?

Code: Select all

filebot -script "g:println java.awt.Desktop.desktopSupported"

Code: Select all

filebot -script "g:println java.awt.Desktop.desktop"
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: License issue / Problem with revert action

Post by rednoah »

Possibly fixed with r5852.

The issue occurs only with the DEB package which contains code compiled against Java 10, but the Java 8 compatibility release used on most headless Linux platforms is not affected, so you can use the TAR release as a workaround:
viewtopic.php?f=11&t=6057
:idea: Please read the FAQ and How to Request Help.
junior0332
Donor
Posts: 15
Joined: 10 Jun 2015, 21:25

Re: License issue / Problem with revert action

Post by junior0332 »

Thanks for getting back to me. I went ahead and installed the TAR release and revert works again, thank you for identifying the issue. I'm not sure if you still want the output you requested, but here is my sysinfo after installing the tar release.

Code: Select all

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/home/ray/filebot-portable/jar/groovy.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so: Unable to load library 'mediainfo': Native library (linux-x86-64/libmediainfo.so) not found in resource path (/home/ray/filebot-portable/jar/filebot.jar)
7-Zip-JBinding: 9.20
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-08-14 (r534)
Groovy: 2.5.1
JRE: OpenJDK Runtime Environment 10.0.2
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 37 MB Used Memory
OS: Linux (amd64)
HW: Linux office 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/ray/filebot-portable/data/ray
Package: TAR
License: FileBot License PX5609505 (Valid-Until: 2068-09-14)
Done ヾ(@⌒ー⌒@)ノ
Here are the java specific commands you provided

Code: Select all

filebot -script "g:println java.awt.Desktop.desktopSupported"
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/home/ray/filebot-portable/jar/groovy.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
false
Done ヾ(@⌒ー⌒@)ノ

Code: Select all

filebot -script "g:println java.awt.Desktop.desktop"
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/home/ray/filebot-portable/jar/groovy.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

No X11 DISPLAY variable was set, but this program performed an operation which requires it.
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at Script1.run(Script1.groovy:1)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:64)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
        at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:154)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:36)
        at net.filebot.Main.main(Main.java:131)

Failure (°_°)
Do I have anything to worry about with these illegal warnings?

As far as the permissions issue, I'll get to working on that. Thanks for the explanation.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: License issue / Problem with revert action

Post by rednoah »

You can ignore all of them, unless you need MediaInfo / AcoustID functionality, in which case you need to install some missing dependencies.


1.
These warnings caused by running a Java 8 program with Java 10. If you use Java 8, these warnings will go away, but you can also just ignore them:

Code: Select all

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/home/ray/filebot-portable/jar/groovy.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

2.
This warning is caused by libmediainfo not being installed. You might be able to fix it by installing libmediainfo:

Code: Select all

MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so: Unable to load library 'mediainfo': Native library (linux-x86-64/libmediainfo.so) not found in resource path (/home/ray/filebot-portable/jar/filebot.jar)

3.
This warning is caused by fpcalc not being installed. You might be able to fix it by installing chromaprint tools:

Code: Select all

Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
:idea: Please read the FAQ and How to Request Help.
Post Reply