Filebot - Java installer - libc 2.18

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
davep89
Posts: 8
Joined: 21 Feb 2018, 08:06

Filebot - Java installer - libc 2.18

Post by davep89 »

Hi. I've just rebuilt my QNAP for reasons I'm struggling to remember and I'm getting there, but I can't get Filebot to work. It was working well before I did this! The packages all appear to install fine from the repository but when I run Filebot node or run Filebot fro the command line I get this error:

Console Output: Select all

$ filebot -version
Error: dl failure on line 541
Error: failed /share/CACHEDEV1_DATA/.qpkg/java-installer/lib/server/libjvm.so, because /lib/libc.so.6: version `GLIBC_2.18' not found (required by /share/CACHEDEV1_DATA/.qpkg/java-installer/lib/server/libjvm.so)
So I went looking for libc upgrade package but the Entware ipk won't install saying the current software is up to date and I can't find another package.

Any advice gratefully received!

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

Re: Filebot - Java installer - libc 2.18

Post by rednoah »

:?: How old is your QNAP?


:idea: The java-installer package provided by use will install the latest JDK 21 so there could be compatibility issues if your NAS device is very old:

Code: Select all

`GLIBC_2.18' not found (required by /share/CACHEDEV1_DATA/.qpkg/java-installer/lib/server/libjvm.so

:arrow: If your NAS device is very old, then you could look into manually installing an older version of the JDK, perhaps JDK 17 or JDK 11. We still have JDK 8 builds (but not QNAP packages) as a very last resort.
:idea: Please read the FAQ and How to Request Help.
davep89
Posts: 8
Joined: 21 Feb 2018, 08:06

Re: Filebot - Java installer - libc 2.18

Post by davep89 »

Thank you. I'll look into that. The NAS was first released in 2016. Is that very old these days? And as I said everything was fine before my upgrading of the hard drives.

I will have a crack at what you suggest!

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

Re: Filebot - Java installer - libc 2.18

Post by rednoah »

davep89 wrote: 11 Sep 2024, 01:05 The NAS was first released in 2016
2016 is not very old. GLIBC_2.18 is from 2013-08-12 so any software update after that could ship that version or higher. I run tests on a Synology NAS from 2013 with somewhat recent updates and JDK 21 works fine there. But it really depends on the software. QNAP is know for not great software...



:?: Does your QNAP run the latest available updates? What libc version is shipped with your current NAS software?

Console Output: Select all

$ ls -l /lib | egrep libc-
-rwxr-xr-x 1 admin administrators 1259128 Aug 17 03:12 libc-2.23.so
:idea: Please read the FAQ and How to Request Help.
davep89
Posts: 8
Joined: 21 Feb 2018, 08:06

Re: Filebot - Java installer - libc 2.18

Post by davep89 »

Thanks for your response. Please see below:

Console Output: Select all

# ls -l /lib | egrep libc-
egrep: warning: egrep is obsolescent; using grep -E
-rwxr-xr-x    1 admin    administ    894308 Mar 23  2015 libc-2.17.so*
lrwxrwxrwx    1 admin    administ        12 Sep 11 01:06 libc.so.6 -> libc-2.17.                         so*
I've checked for updates and I'm on the latest.

The odd thing is that just a few days ago, all was well.

Thanks again.

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

Re: Filebot - Java installer - libc 2.18

Post by rednoah »

davep89 wrote: 12 Sep 2024, 02:50

Code: Select all

-rwxr-xr-x    1 admin    administ    894308 Mar 23  2015 libc-2.17.so*
:?: Which NAS model do you have? Looks like QNAP hasn't bothered to update core system libraries since 2015.


davep89 wrote: 12 Sep 2024, 02:50 The odd thing is that just a few days ago, all was well.
:idea: The java-installer package provided by us updates to the latest JDK on startup. You may have been updated to the latest JDK 21 recently. Presumably from a working JDK 17, or earlier if you never reboot your NAS and it never reboots automatically because it never receives updates.
:idea: Please read the FAQ and How to Request Help.
davep89
Posts: 8
Joined: 21 Feb 2018, 08:06

Re: Filebot - Java installer - libc 2.18

Post by davep89 »

Its a TS431P and it certainly does look like they're not focused on upgrading their systems. In my wanderings I've read something suggesting the same software versions will be in all their systems so the model might be irrelevant. I've got a query in with QNAP on that.

I normally update as soon as one comes around but don't necessarily reboot. Is it usually possible to go to an earlier version of the JDK? Not Filebot specific I understand but thought you might have some wisdom to impart?

Thanks for your assistance!
User avatar
rednoah
The Source
Posts: 23412
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot - Java installer - libc 2.18

Post by rednoah »

davep89 wrote: 12 Sep 2024, 14:29 I normally update as soon as one comes around but don't necessarily reboot. Is it usually possible to go to an earlier version of the JDK? Not Filebot specific I understand but thought you might have some wisdom to impart?
Yes, you can manually install a different JDK. The filebot command will work if java is in the $PATH. You will require basic Linux skills though, SSH, downloading files, extracting archives, creating symlinks.


:idea: You can find JDK builds here:
https://adoptopenjdk.net/


:idea: You can use uname -a to see the CPU architecture of your NAS.


:idea: Please read the FAQ and How to Request Help.
davep89
Posts: 8
Joined: 21 Feb 2018, 08:06

Re: Filebot - Java installer - libc 2.18

Post by davep89 »

Thanks again. I'll have a look at that. Response from QNAP is that GLIBC on my NAS is 2.17 in the latest version so I might not be the last person to have this problem!
davep89
Posts: 8
Joined: 21 Feb 2018, 08:06

Re: Filebot - Java installer - libc 2.18

Post by davep89 »

Hi Rednoah. Another question/clarification. What I need to do is install an earlier JDK then set Filebot to use that rather than the one java-installer installs? Just trying to get my head around what I'm trying to achieve. I'm confused because its java-installer that's failing and if Java is already installed it doesn't need to run at all (no?).
User avatar
rednoah
The Source
Posts: 23412
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot - Java installer - libc 2.18

Post by rednoah »

davep89 wrote: 14 Sep 2024, 09:27 What I need to do is install an earlier JDK then set Filebot to use that rather than the one java-installer installs?
Yes.


:idea: You cannot use the java-installer package because java-installer is installed the latest Java 21 which is not compatible with your NAS. You can instead not use java-installer and install a compatible Java yourself manually. QNAP may even provide a Java 17 package or Java 11 package in their package repository.
:idea: Please read the FAQ and How to Request Help.
davep89
Posts: 8
Joined: 21 Feb 2018, 08:06

Re: Filebot - Java installer - libc 2.18

Post by davep89 »

Thanks again. At the risk of being annoying, where is Java-installer called? I figured the easiest way to fix this is to take out that call and set the path to a compatible version? Its the installer failing, not Filebot itself.
User avatar
rednoah
The Source
Posts: 23412
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot - Java installer - libc 2.18

Post by rednoah »

davep89 wrote: 16 Sep 2024, 02:38 where is Java-installer called?
which java will tell you where the java binary is located on your system:

Console Output: Select all

$ ls -l `which java`
lrwxrwxrwx 1 admin administrators 51 Sep 11 10:31 /usr/bin/java -> /share/CACHEDEV1_DATA/.qpkg/java-installer/bin/java


davep89 wrote: 16 Sep 2024, 02:38 I figured the easiest way to fix this is to take out that call and set the path to a compatible version?
You are welcome to inspect the code. You will find all the interesting bits in the /share/CACHEDEV1_DATA/.qpkg/java-installer/*.sh files. The problem is installing a compatible version to which you can set the path, which takes us back to manually installing java which is - in my opinion - the easy solution, download, extract, export PATH, done. If your easy way takes more than 10 minutes that my easy way is easier. ;)



davep89 wrote: 16 Sep 2024, 02:38 Its the installer failing, not Filebot itself.
The installer has successfully downloaded and installed the latest java binaries. The java binary fails when executed on your system.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 23412
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot - Java installer - libc 2.18

Post by rednoah »

e.g.

Console Output: Select all

$ curl -L -O 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.12_7.tar.gz'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  182M  100  182M    0     0  23.0M      0  0:00:07  0:00:07 --:--:-- 33.3M
$ tar zxvf *.tar.gz
jdk-17.0.12+7/
jdk-17.0.12+7/NOTICE
jdk-17.0.12+7/bin/
jdk-17.0.12+7/bin/jhsdb
jdk-17.0.12+7/bin/jps
jdk-17.0.12+7/bin/jstat
jdk-17.0.12+7/bin/jfr
jdk-17.0.12+7/bin/jpackage
jdk-17.0.12+7/bin/java
...

Console Output: Select all

$ export PATH="jdk-17.0.12+7/bin:$PATH"
$ java -version
openjdk version "17.0.12" 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode, sharing)
$ filebot -script fn:sysinfo
FileBot 5.1.5 (r10380)
...
JRE: OpenJDK Runtime Environment 17.0.12
...
OS: Linux (aarch64)
...


:!: Note that your NAS is armv7 and not aarch64 so you will need to download different binaries:

Shell: Select all

curl -L -O 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_arm_linux_hotspot_17.0.12_7.tar.gz'


:!: Ensure that java-installer is not installed, otherwise filebot will prefer to use that, and fail.
:idea: Please read the FAQ and How to Request Help.
Post Reply