portable problem with Freebsd (Freenas) - mediainfo

All your suggestions, requests and ideas for future development
Post Reply
islandrob
Posts: 4
Joined: 15 May 2017, 21:15

portable problem with Freebsd (Freenas) - mediainfo

Post by islandrob » 16 May 2017, 02:53

I'm having problems with running Filebot 4.7.9 on Freenas in a jail. I've run filebot on Windows and OSX in the past without any issues. I installed it in my jail with freenas and it gives me errors related to libmediainfo.so and libjnidispatch.so, as below

4.7.9

Code: Select all

[email protected]:/filebot4.7.9 # ./filebot.sh -script fn:sysinfo
FileBot 4.7.9 (r4984)
JNA Native: java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/freebsd-x86-64/libjnidispatch.so) not found in resource path ([file:/filebot4.7.9/FileBot.jar])
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
Apache Commons VFS: [zip, rar]
Chromaprint: 1.4.2
Extended Attributes: java.io.IOException: UserDefinedFileAttributeView is not supported
Unicode Filesystem: OK
Script Bundle: 2017-04-03 (r494)
Groovy: 2.4.10
JRE: OpenJDK Runtime Environment 1.8.0_131
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 1 GB Max Memory / 20 MB Used Memory
OS: FreeBSD (amd64)
Package: PORTABLE
Data: /filebot4.7.9/data
uname: FreeBSD freenas 10.3-STABLE FreeBSD 10.3-STABLE #0 r295946+21897e6695f(9.10.2-STABLE): Thu Apr 20 17:58:31 UTC 2017     [email protected]:/freenas-9.10-releng/_BE/objs/freenas-9.10-releng/_BE/os/sys/FreeNAS.amd64  amd64
Done ヾ(@⌒ー⌒@)ノ
It used to also give me an error with fpcalc, however I installed the Chromaprint package (which includes fpcalc) and it fixed that error. I've installed the libmediainfo package, however it has not helped the other two errors.

After searching the forums I installed Filebot 4.7.5 and it runs fine (in the same jail but a different directory, so everything else is the same), a copy of the sysinfo is here

4.7.5

Code: Select all

[email protected]:/filebot4.7.5 # sh filebot.sh -script fn:sysinfo
FileBot 4.7.5 (r4600)
JNA Native: 4.0.0
MediaInfo: 0.7.95
Apache Commons VFS: [zip, rar]
Chromaprint: 1.4.2
Extended Attributes: java.io.IOException: UserDefinedFileAttributeView is not supported
Unicode Filesystem: OK
Script Bundle: 2017-04-03 (r494)
Groovy: 2.4.7
JRE: OpenJDK Runtime Environment 1.8.0_131
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 1 GB Max Memory / 17 MB Used Memory
OS: FreeBSD (amd64)
Package: PORTABLE
Data: /filebot4.7.5/data/root
uname: FreeBSD freenas 10.3-STABLE FreeBSD 10.3-STABLE #0 r295946+21897e6695f(9.10.2-STABLE): Thu Apr 20 17:58:31 UTC 2017     [email protected]:/freenas-9.10-releng/_BE/objs/freenas-9.10-releng/_BE/os/sys/FreeNAS.amd64  amd64

------------------- UPDATE AVAILABLE: FileBot 4.7.9 (r4984) --------------------
I've read a bunch, and the only thing I can find is a thread suggesting that all the native libraries were not included in the package. viewtopic.php?t=4596 and a link to download them. I've downloaded them and put them in the ld_resource_path, but I still have the same error with 4.79.

I'm willing to read and learn, but I've been battling with this for 2 weeks and cant figure it out. Do I need to put the .so files somewhere that I am missing? do I need to adjust settings somewhere? I'm kinda lost at this point. I'm sure it's something easy, but I can't seem to find it.

Rob

I've attached the sysenv report as well, in case it helps:

4.7.5

Code: Select all

[email protected]:/filebot4.7.5 # sh filebot.sh -script fn:sysenv
# Environment Variables #
BLOCKSIZE: K
MAIL: /var/mail/root
HOSTTYPE: FreeBSD
LD_LIBRARY_PATH: /filebot4.7.5
MACHTYPE: x86_64
PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
SSH_CLIENT: 192.168.1.144 52504 22
PAGER: more
VENDOR: amd
HOST: freenas
TERM: xterm-256color
LANG: en_US.UTF-8
JAVA_HOME: /usr/local/openjdk8
LSCOLORS: ExGxFxdxCxegedabagExEx
GROUP: wheel
EDITOR: vi
LOGNAME: root
SHLVL: 2
LC_ALL: en_US.UTF-8
OSTYPE: FreeBSD
HOME: /root
SSH_CONNECTION: 192.168.1.144 52504 192.168.1.200 22
SSH_TTY: /dev/pts/0
REMOTEHOST: 192.168.1.144
SHELL: /bin/csh
PWD: /filebot4.7.5
OLDPWD: /filebot4.7.5
USER: root


# Java System Properties #
path.separator: :
java.vm.name: OpenJDK 64-Bit Server VM
java.io.tmpdir: /filebot4.7.5/data/root/temp
user.country: US
user.home: /filebot4.7.5/data/root
net.filebot.util.prefs.file: /filebot4.7.5/data/root/prefs.properties
useExtendedFileAttributes: true
net.filebot.Archive.extractor: ApacheVFS
org.apache.commons.logging.Log: org.apache.commons.logging.impl.NoOpLog
java.vm.vendor: Oracle Corporation
java.util.prefs.PreferencesFactory: net.filebot.util.prefs.FilePreferencesFactory
user.language: en
java.vendor: Oracle Corporation
java.vendor.url.bug: http://bugreport.sun.com/bugreport/
swing.crossplatformlaf: javax.swing.plaf.nimbus.NimbusLookAndFeel
sun.net.client.defaultReadTimeout: 60000
java.specification.name: Java Platform API Specification
jna.nosys: true
os.name: FreeBSD
java.runtime.name: OpenJDK Runtime Environment
application.deployment: portable
file.separator: /
sun.net.client.defaultConnectTimeout: 10000
java.vm.specification.version: 1.8
sun.boot.class.path: /usr/local/openjdk8/jre/lib/resources.jar:/usr/local/openjdk8/jre/lib/rt.jar:/usr/local/openjdk8/jre/lib/sunrsasign.jar:/usr/local/openjdk8/jre/lib/jsse.jar:/usr/local/openjdk8/jre/lib/jce.jar:/usr/local/openjdk8/jre/lib/charsets.jar:/usr/local/openjdk8/jre/lib/jfr.jar:/usr/local/openjdk8/jre/classes
java.version: 1.8.0_131
http.agent: FileBot 4.7.5
java.library.path: /filebot4.7.5:/usr/local/lib
unixfs: false
useGVFS: true
awt.toolkit: sun.awt.X11.XToolkit
java.vm.specification.name: Java Virtual Machine Specification
os.version: 10.3-STABLE
useCreationDate: false
file.encoding: UTF-8
java.awt.printerjob: sun.print.PSPrinterJob
grape.root: /filebot4.7.5/data/root/grape
java.class.version: 52.0
java.ext.dirs: /usr/local/openjdk8/jre/lib/ext:/usr/java/packages/lib/ext
java.specification.version: 1.8
net.filebot.AcoustID.fpcalc: fpcalc
java.vendor.url: http://java.oracle.com/
sun.os.patch.level: unknown
sun.java.launcher: SUN_STANDARD
os.arch: amd64
user.dir: /filebot4.7.5
line.separator: 

user.timezone: 
sun.cpu.endian: little
java.vm.specification.vendor: Oracle Corporation
java.home: /usr/local/openjdk8/jre
java.net.useSystemProxies: false
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
sun.arch.data.model: 64
java.endorsed.dirs: /usr/local/openjdk8/jre/lib/endorsed
file.encoding.pkg: sun.io
java.specification.vendor: Oracle Corporation
sun.boot.library.path: /usr/local/openjdk8/jre/lib/amd64
sun.jnu.encoding: UTF-8
java.runtime.version: 1.8.0_131-b11
java.vm.info: mixed mode
java.vm.version: 25.131-b11
sun.io.unicode.encoding: UnicodeLittle
java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment
application.dir: /filebot4.7.5/data/root
java.class.path: /filebot4.7.5/FileBot.jar
sun.java.command: /filebot4.7.5/FileBot.jar -script fn:sysenv
sun.cpu.isalist: 
user.name: root


# Arguments #
args[0] = -script
args[1] = fn:sysenv


Done ヾ(@⌒ー⌒@)ノ
and 4.7.9

Code: Select all

[email protected]:/filebot4.7.9 # sh filebot.sh -script fn:sysenv
# Environment Variables #
PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
BLOCKSIZE: K
JAVA_HOME: /usr/local/openjdk8
HOST: freenas
TERM: xterm-256color
LANG: en_US.UTF-8
GROUP: wheel
MACHTYPE: x86_64
MAIL: /var/mail/root
LD_LIBRARY_PATH: /filebot4.7.9:/filebot4.7.9/lib/amd64
OSTYPE: FreeBSD
LOGNAME: root
PWD: /filebot4.7.9
SHELL: /bin/csh
PAGER: more
LSCOLORS: ExGxFxdxCxegedabagExEx
HOSTTYPE: FreeBSD
SSH_TTY: /dev/pts/1
SSH_CLIENT: 192.168.1.144 52539 22
REMOTEHOST: 192.168.1.144
OLDPWD: /filebot4.7.9
USER: root
EDITOR: vi
SSH_CONNECTION: 192.168.1.144 52539 192.168.1.200 22
LC_ALL: en_US.UTF-8
VENDOR: amd
SHLVL: 2
HOME: /root


# Java System Properties #
http.agent: FileBot 4.7.9
java.runtime.name: OpenJDK Runtime Environment
sun.boot.library.path: /usr/local/openjdk8/jre/lib/amd64
java.vm.version: 25.131-b11
swing.crossplatformlaf: javax.swing.plaf.nimbus.NimbusLookAndFeel
java.vm.vendor: Oracle Corporation
java.vendor.url: http://java.oracle.com/
path.separator: :
java.vm.name: OpenJDK 64-Bit Server VM
file.encoding.pkg: sun.io
user.country: US
sun.java.launcher: SUN_STANDARD
sun.os.patch.level: unknown
jna.nosys: false
java.vm.specification.name: Java Virtual Machine Specification
user.dir: /filebot4.7.9
useExtendedFileAttributes: true
java.runtime.version: 1.8.0_131-b11
java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment
java.endorsed.dirs: /usr/local/openjdk8/jre/lib/endorsed
os.arch: amd64
net.filebot.AcoustID.fpcalc: fpcalc
java.io.tmpdir: /filebot4.7.9/data/tmp
line.separator: 

java.vm.specification.vendor: Oracle Corporation
os.name: FreeBSD
jna.nounpack: true
sun.jnu.encoding: UTF-8
java.library.path: /filebot4.7.9:/filebot4.7.9/lib/amd64:/usr/local/lib
useGVFS: false
java.specification.name: Java Platform API Specification
java.class.version: 52.0
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
sun.net.client.defaultReadTimeout: 60000
java.util.prefs.PreferencesFactory: net.filebot.util.prefs.FilePreferencesFactory
os.version: 10.3-STABLE
user.home: /filebot4.7.9/data
user.timezone: 
java.awt.printerjob: sun.print.PSPrinterJob
file.encoding: UTF-8
java.specification.version: 1.8
java.net.useSystemProxies: false
java.class.path: /filebot4.7.9/FileBot.jar
user.name: root
application.deployment: portable
java.vm.specification.version: 1.8
sun.net.client.defaultConnectTimeout: 10000
sun.java.command: /filebot4.7.9/FileBot.jar -script fn:sysenv
useCreationDate: false
java.home: /usr/local/openjdk8/jre
sun.arch.data.model: 64
net.filebot.util.prefs.file: /filebot4.7.9/data/prefs.properties
user.language: en
java.specification.vendor: Oracle Corporation
awt.toolkit: sun.awt.X11.XToolkit
net.filebot.Archive.extractor: ApacheVFS
java.vm.info: mixed mode
java.version: 1.8.0_131
java.ext.dirs: /usr/local/openjdk8/jre/lib/ext:/usr/java/packages/lib/ext
application.dir: /filebot4.7.9/data
sun.boot.class.path: /usr/local/openjdk8/jre/lib/resources.jar:/usr/local/openjdk8/jre/lib/rt.jar:/usr/local/openjdk8/jre/lib/sunrsasign.jar:/usr/local/openjdk8/jre/lib/jsse.jar:/usr/local/openjdk8/jre/lib/jce.jar:/usr/local/openjdk8/jre/lib/charsets.jar:/usr/local/openjdk8/jre/lib/jfr.jar:/usr/local/openjdk8/jre/classes
java.vendor: Oracle Corporation
file.separator: /
grape.root: /filebot4.7.9/data/grape
java.vendor.url.bug: http://bugreport.sun.com/bugreport/
sun.io.unicode.encoding: UnicodeLittle
sun.cpu.endian: little
unixfs: false
org.apache.commons.logging.Log: org.apache.commons.logging.impl.NoOpLog
sun.cpu.isalist: 


# Arguments #
args[0] = -script
args[1] = fn:sysenv


Done ヾ(@⌒ー⌒@)ノ

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

Re: portable problem with Freebsd (Freenas) - mediainfo

Post by rednoah » 16 May 2017, 05:44

Try to install the mediainfo package as well to make sure you have all the dependencies. Newer versions of FileBot will bundle newer versions of libmediainfo.so which may not be compatible with your system for some reason.


However, libmediainfo.so is meaningless unless you can fix the issue with libjnidispatch.so first:

Code: Select all

JNA Native: java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/freebsd-x86-64/libjnidispatch.so) not found in resource path ([file:/filebot4.7.9/FileBot.jar])
The portable package includes the required native libraries for some systems and somes architectures. FreeBSD is not included so you'll need to add the required native libraries yourself. See filebot.sh for details on where it'll look for native libraries.


You might want to consider using the docker container to avoid system configuration issues:
https://hub.docker.com/r/rednoah/filebot/
My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

Image

Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

islandrob
Posts: 4
Joined: 15 May 2017, 21:15

Re: portable problem with Freebsd (Freenas) - mediainfo

Post by islandrob » 17 May 2017, 02:02

Thanks. I had actually already installed the mediainfo package, as well as chromaprint (for fpcalc) and jna (just for good measure). I will try to do the docker container. Just incase, is there somwhere specific I would put the files (libmediainfo.so and lijnidispatch.so) in the jail so that filebot could run without docker?

Rob

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

Re: portable problem with Freebsd (Freenas) - mediainfo

Post by rednoah » 17 May 2017, 03:04

The lib/x86_64 folder contains all the libraries that are necessary on 64-bit Linux. You will need the same libraries on 64-bit FreeBSD.

The library path is set in the filebot.sh script:

Code: Select all

PACKAGE_LIBRARY_PATH="$APP_ROOT/lib/$(uname -m)"

Since I have never tested FileBot on FreeBSD, there is no guarantee that it'll just work like on Linux though. If you find a solution, please share. ;)
My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

Image

Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

tsoet
Posts: 8
Joined: 03 Feb 2014, 09:34

Re: portable problem with Freebsd (Freenas) - mediainfo

Post by tsoet » 12 Jul 2017, 21:10

@islandrob - Did you make any headway on this? I too have installed the mediainfo package (which installs libmediainfo), chromaprint, etc, but still get xattr errors when it tries to use mediainfo.

islandrob
Posts: 4
Joined: 15 May 2017, 21:15

Re: portable problem with Freebsd (Freenas) - mediainfo

Post by islandrob » 12 Jul 2017, 21:15

I got it all working but xattr. I had to stay with 4.7.5. Xattr is not supported on freenas.

tsoet
Posts: 8
Joined: 03 Feb 2014, 09:34

Re: portable problem with Freebsd (Freenas) - mediainfo

Post by tsoet » 12 Jul 2017, 21:54

Ah, indeed, no xattr support on freebsd (duh). But with 4.7.5 you got media info bindings working?

islandrob
Posts: 4
Joined: 15 May 2017, 21:15

Re: portable problem with Freebsd (Freenas) - mediainfo

Post by islandrob » 12 Jul 2017, 22:46

I'm pretty sure. I'll send a screenshot when I get home

tsoet
Posts: 8
Joined: 03 Feb 2014, 09:34

Re: portable problem with Freebsd (Freenas) - mediainfo

Post by tsoet » 13 Jul 2017, 01:42

Got mediainfo working for the current version of FileBot on FreeNAS 11, after quite a bit of poking.

For anyone else trying to accomplish the same:
  • Do a pkg upgrade inside your jail.
  • Then pkg search for the relevant prerequisites - in this case openjdk8, mediainfo, chromaprint, and jna.
  • Next, pkg install each, along with any dependencies.
    (That's the easy part done...)
At this point, filebot -script fn:sysinfo will complain about JNA on its JNA and MediaInfo lines. We actually already have the missing library, libjnidispatch.so - it's in jna.jar, provided by the JNA package. But inside the jar it does us no good.

Instead, it needs to be placed where filebot looks for libraries, which is determined by a line in filebot.sh: PACKAGE_LIBRARY_PATH="$APP_ROOT/lib/$(uname -m)". I simply dropped filebot at the root of my jail, so my destination was /lib/amd64/ - but if you're tidier than I am you'll be putting it somewhere else.
  • Extract jna.jar: jar xf /usr/local/share/java/classes/jna.jar
  • Copy from it /com/sun/jna/freebsd-x86-64/libjnidispatch.so to the destination we determined above.
Now, finally, filebot -script fn:sysinfo should happily report JNA and MediaInfo are both in good shape.

Hope this helps the next soul to come along.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests