armv5 not supported?

All your suggestions, requests and ideas for future development
Post Reply
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

armv5 not supported?

Post by Clint »

Hi there, long time no see!

After some time having my arm based NAS in the drawer that I started my adventures with filebot with I have now tried to get it up and flying again. However, after two days and a shitload of compilation of Oracle Java 8 for embedded I'm about to give up. I cannot for the life of me get it up and running properly. Sure, install Java and drop in filebot is easy. So is also doing a version check for filebot. But but but, as soon I am pulling any script from outside I get all kinda strange errors.

I have tried all combinations of Oracle Java 8 from mars 2014 until todays date with filebot from version 4.0 until 4.5.6. Nothing works like it used to..



Whats up with this? Have you given up support totally on older arm based systems? :(


This is the latest try. Oracle Java ejdk1.8.0_77 compiled in full version with all whistle and bells in combo with filebot 4.5.6

Code: Select all

root@MicroNAS:/config/filebot/files# filebot -script "fn:sysinfo"
MultipleCompilationErrorsException: startup failed:
Script3.groovy: 62: unable to resolve class MetaAttributes
 @ line 62, column 15.
                def xattr = new MetaAttributes(f)
                 ^

1 error

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script3.groovy: 62: unable to resolve class MetaAttributes
 @ line 62, column 15.
                def xattr = new MetaAttributes(f)
                 ^

1 error

        at net.sourceforge.filebot.cli.ScriptShell.evaluate(ScriptShell.java:91)
        at net.sourceforge.filebot.cli.ScriptShell.runScript(ScriptShell.java:85)
        at net.sourceforge.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:123)
        at net.sourceforge.filebot.Main.main(Main.java:192)
Failure (°_°)
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: armv5 not supported?

Post by rednoah »

Have you tried the latest version of FileBot? If you use the latest script with an old version of FileBot it might not work. This error would indicate something like that.

Suffice to say, this error has (utmost likely) nothing to do with your architecture.

There should be official Oracle Embedded JDK builds for armv5 so make sure you're using that one. Compiling shit yourself is badass, but custom builds are probably more error prone than the Oracle tested official builds. ;)
:idea: Please read the FAQ and How to Request Help.
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

Re: armv5 not supported?

Post by Clint »

Filebot 4.5.6 is the latest where you have provided an arm installer. I have tried this version against Oracles Java 8 as described earlier.

Yes, I am pretty bad-ass these days but in this case Oracle provides a build environment that is self contained. It's a click and choice story kind of thing so no errors from my side.
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: armv5 not supported?

Post by rednoah »

The IPK will work on any platform. The arm package hasn't been removed, it's been replaced by a noarch package which works for all architectures.
:idea: Please read the FAQ and How to Request Help.
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

Re: armv5 not supported?

Post by Clint »

Finally after some holiday beer and bit of free time I think I solved it + that Zip-JBinding issue. Oracle do not provide java 8 for armv5tel so I had to compile it myself. While I was at it I had a go at the Zip-JBinding and compiled that as well. There was also some strange issue with java's connectivity that required a small nudge on the hosts file. I will not go through the whole compiling process but simply share my binaries here. This is a Debian Jessie install on a Zyxel 310.

Grab the Java + Zip-JBinding here:
http://www.filedropper.com/filebotarm-linux-gnueabi_2

Create directory for java:

Code: Select all

mkdir -p /usr/lib/jvm/java-8-oracle
Unpack the archive and copy all the content from folder java-8-oracle to /usr/lib/jvm/java-8-oracle and then set permissions:

Code: Select all

chmod -R 755 /usr/lib/jvm/java-8-oracle
copy/paste and run one row at a time:

Code: Select all

update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-8-oracle/bin/java 100
update-alternatives --install /usr/bin/keyytool keytool /usr/lib/jvm/java-8-oracle/bin/keytool 100
copy/paste everything at once directly to terminal and hit enter:

Code: Select all

echo 'alias=java-8-oracle  
 priority=100   
 section=non-free  
   
 hl java /usr/lib/jvm/java-8-oracle/bin/java  
 hl keytool /usr/lib/jvm/java-8-oracle/bin/keytool' | tee .java-8-oracle.jinfo
test it:

Code: Select all

java -version
should get something like this:

Code: Select all

[b]java version "1.8.0_101"
Java(TM) SE Embedded Runtime Environment (build 1.8.0_101-b13, headless)
Java HotSpot(TM) Embedded Client VM (build 25.101-b13, mixed mode)[/b]
install filebot:
cd /usr/src

Code: Select all

wget --no-check-certificate http://sourceforge.net/projects/filebot/files/filebot/FileBot_4.5/filebot_4.5_arm.ipk
ar -x filebot_4.5_arm.ipk
tar zxvf data.tar.gz
cp -r opt/share/* /usr/share/
ln -s /usr/share/filebot/bin/filebot.sh /usr/bin/filebot
edit /usr/share/filebot/bin/filebot.sh to reflect install path:

Code: Select all

/opt/share/filebot -> /usr/share/filebot (all instances)
Grab the latest FileBot.jar (filebot-r4109.jar) from here, rename & replace that one in /usr/share/filebot:

Code: Select all

http://sourceforge.net/projects/filebot/files/filebot/HEAD/
Unpack the archive and copy lib7-Zip-JBinding.so to /usr/share/filebot folder

install JNA:

Code: Select all

apt-get install libjna-java
symlink the libjnidispatch.so to /usr/share/filebot folder:

Code: Select all

ln -s /usr/lib/arm-linux-gnueabi/jni/libjnidispatch.so  /usr/share/filebot/libjnidispatch.so
set permissions:

Code: Select all

chmod -R 755 /usr/share/filebot
get your hostname:

Code: Select all

hostname
add a line on top of the /etc/hosts to include your previous given hostname, like this:

Code: Select all

127.0.0.1 localhost -> 127.0.0.1 localhost <hostname>
Reboot!

test it:

Code: Select all

filebot -script "fn:sysinfo"

Code: Select all

filebot -script "fn:sysinfo"
FileBot 4.7.1 (r4109)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.64
7-Zip-JBinding: 9.20
Chromaprint: fpcalc version 1.1.0 (/usr/share/filebot/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.7
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_101 (headless)
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 1 Core / 92 MB Max Memory / 9 MB Used Memory
OS: Linux (arm)
Package: IPKG
Data: /usr/share/filebot/data
uname: Linux SmallBox 4.4.0-kirkwood-tld-1 #1 PREEMPT Mon Jan 25 20:35:24 PST 2016 armv5tel GNU/Linux
Done ヾ(@⌒ー⌒@)ノ
Last edited by Clint on 02 Aug 2016, 04:48, edited 6 times in total.
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

Re: armv5 not supported?

Post by Clint »

If you get problems related to IPV6, just disable it in /etc/sysctl.conf with adding these lines at the bottom:

Code: Select all

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
Then reboot and try again.
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

Re: armv5 not supported?

Post by Clint »

It seems like if I replace the FileBot.jar after I have run the test once I get SSL error:

Code: Select all

Fetch failed: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure [https://app.filebot.net/scripts/m1.jar]
Received fatal alert: handshake_failure
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at net.filebot.web.WebRequest.fetch(WebRequest.java:140)
        at net.filebot.CachedResource.lambda$fetchIfModified$8(CachedResource.java:186)
        at net.filebot.CachedResource.lambda$null$0(CachedResource.java:83)
        at net.filebot.CachedResource.retry(CachedResource.java:112)
        at net.filebot.CachedResource.lambda$get$1(CachedResource.java:83)
        at net.filebot.Cache.computeIf(Cache.java:85)
        at net.filebot.CachedResource.get(CachedResource.java:78)
        at net.filebot.MemoizedResource.get(Resource.java:36)
        at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:34)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
        at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
        at net.filebot.Main.main(Main.java:125)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at net.filebot.web.WebRequest.fetch(WebRequest.java:137)
        ... 12 more
Failure (°_°)
Even if I delete data folder and put back the initial FileBot.jar again I get the same error. It works fine if I stick to the same version of FileBot.jar as in the first time I run it. Odd.
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: armv5 not supported?

Post by rednoah »

It's a SSL networking issue, but due to caching it might look as if it's working when FileBot defaults to previously cached data. Updating FileBot will invalidate the cache.

This is not a simple issue. There's many reasons why it might not working. I'd start by googling "Received fatal alert: handshake_failure" and see if anything comes up.

This thread might be helpful:
viewtopic.php?f=6&t=3609
:idea: Please read the FAQ and How to Request Help.
Clint
Donor
Posts: 50
Joined: 24 Sep 2013, 19:42

Re: armv5 not supported?

Post by Clint »

Yes, it was a matter of adding a cipher-suite provider as StrangelyTyped suggested.
http://stackoverflow.com/a/33521718/5960248
I dropped in a signed package from bouncycastle.org:
https://www.bouncycastle.org/latest_releases.html

Code: Select all

bcprov-<verion>.jar to /usr/lib/jvm/jre/lib/ext
edited /usr/lib/jvm/jre/lib/security/java.security accordingly:

Code: Select all

security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=sun.security.ec.SunEC
security.provider.4=com.sun.net.ssl.internal.ssl.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider    <-----------------
security.provider.7=sun.security.jgss.SunProvider
security.provider.8=com.sun.security.sasl.Provider
security.provider.9=org.jcp.xml.dsig.internal.dom.XMLDSigRI
security.provider.10=sun.security.smartcardio.SunPCSC
Now it all flyes like it should between filebot versions:

Code: Select all

filebot -script "fn:sysinfo"
FileBot 4.7.1 (r4109)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.70
7-Zip-JBinding: 9.20
Chromaprint: fpcalc version 1.1.0 (/usr/share/filebot/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.7
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_101 (headless)
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 1 Core / 92 MB Max Memory / 9 MB Used Memory
OS: Linux (arm)
Package: IPKG
Data: /usr/share/filebot/data
uname: Linux MiniBox 4.4.0-kirkwood-tld-1 #1 PREEMPT Mon Jan 25 20:35:24 PST 2016 armv5tel GNU/Linux

--- UPDATE AVAILABLE: FileBot 4.7.1 (r4126) ---

Done ヾ(@⌒ー⌒@)ノ

Code: Select all

filebot -script "fn:sysinfo"
FileBot 4.7.1 (r4122)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.70
7-Zip-JBinding: 9.20
Chromaprint: fpcalc version 1.1.0 (/usr/share/filebot/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.7
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_101 (headless)
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 1 Core / 92 MB Max Memory / 16 MB Used Memory
OS: Linux (arm)
Package: IPKG
Data: /usr/share/filebot/data
uname: Linux MiniBox 4.4.0-kirkwood-tld-1 #1 PREEMPT Mon Jan 25 20:35:24 PST 2016 armv5tel GNU/Linux

--- UPDATE AVAILABLE: FileBot 4.7.1 (r4126) ---

Done ヾ(@⌒ー⌒@)ノ

Code: Select all

filebot -script "fn:sysinfo"
FileBot 4.7.1 (r4126)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.70
7-Zip-JBinding: 9.20
Chromaprint: fpcalc version 1.1.0 (/usr/share/filebot/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.7
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_101 (headless)
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 1 Core / 92 MB Max Memory / 18 MB Used Memory
OS: Linux (arm)
Package: IPKG
Data: /usr/share/filebot/data
uname: Linux MiniBox 4.4.0-kirkwood-tld-1 #1 PREEMPT Mon Jan 25 20:35:24 PST 2016 armv5tel GNU/Linux
Done ヾ(@⌒ー⌒@)ノ
I have updated the Java/7-Zip package in the first post to reflect these changes.
Post Reply