Solved Using IPMIView on FreeBSD

patpro

Active Member

Reaction score: 14
Messages: 199

Hello,

I need to use the software IPMIView made by SuperMicro. It's a JAVA tool, delivered with its own Linux JRE.
I've setup Linux compat on my FreeBSD 12.x RELEASE box, but I'm a total noob with that stuff, and I fail at launching the startup script:

Bash:
$ cd /compat/linux
$ bin/sh
sh-4.2$
sh-4.2$ /opt/IPMIView_2.16.0_build.190815_bundleJRE_Linux_x64/IPMIView20
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/ls: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
cat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
cat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
cat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
JRE libraries are missing or not compatible....
Exiting....
I don't understand the errors, because those commands are working when used directly. For example if I try the first command of the IPMIView20 script that uses dirname, it would not complain about the libc:

Bash:
sh-4.2$ rl_origDir="`dirname "$1"`"
sh-4.2$ echo $rl_origDir
.
Any help appreciated.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,210
Messages: 31,923

Do you need to view IPMI? As in remote control and stuff? Or just configure IPMI? You can configure IPMI with sysutils/ipmitool. Viewing can be done with any browser, modern IPMI versions use HTML5, older IPMI versions require a JRE to view.
 
OP
OP
patpro

patpro

Active Member

Reaction score: 14
Messages: 199

I need full IPMI (console, virtual KVM, virtual CDROM, etc.), so I'm stuck with Supermicro tool (no HTML5 unfortunately).

The tool is Windows or Linux only, I would like to run the linux version via /compat/linux. My question is less about the tool itself than about running complex shell scripts and java apps inside linux JRE on FreeBSD.
 
OP
OP
patpro

patpro

Active Member

Reaction score: 14
Messages: 199

Ok, I said I was a bit noob, it was only about the linux compat thing :)
I'm perfectly proficient with IPMI/ILO management and configuration and I'm using Supermicro's IPMI for years. I could use the browser directly, like I do on Mac, but it requires a full JRE install and the hability to run jnpl applets. it's a real pain (even on Mac) because java + IPMI is really touchy about the version/security/etc. and I don't want to mess with my FreeBSD desktop. I would really prefer using the all-in-one packaged from Supermicro inside linux compat.

Now to dig on the technical side, I've launched the startup script with sh +x and it showed me quite odd things: the script runs smoothly for a while, using ls, grep, dirname, etc. without error, then after some point the same exact commands will exit with the libc error above.

The script output is about 1K lines long. For example, on line 686 I have:
Bash:
+ rl_operand=./jre/bin/java
++ dirname ./jre/bin/java
+ rl_origDir=./jre/bin
but later in the output I find:
Bash:
+ rl_operand=./jre/bin/java
++ dirname ./jre/bin/java
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
This is quite unexpected.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,210
Messages: 31,923

Try chroot /compat/linux /bin/bash. Then starting the application from that prompt.
 
OP
OP
patpro

patpro

Active Member

Reaction score: 14
Messages: 199

Thanks. It still fails but for other problems:

Bash:
sh-4.2$ /opt/ipmi/IPMIView20
/opt/ipmi/IPMIView20: line 169: /dev/null: Permission denied
...
/opt/ipmi/IPMIView20: line 186: /dev/null: Permission denied
...
/opt/ipmi/IPMIView20: line 244: /dev/null: No such file or directory
/opt/ipmi/IPMIView20: line 283: /dev/null: No such file or directory
/opt/ipmi/IPMIView20: line 169: /dev/null: Permission denied
...
/opt/ipmi/IPMIView20: line 2441: /dev/null: Permission denied
/opt/ipmi/IPMIView20: line 169: /dev/null: Permission denied
and

Bash:
++ exec ./jre/bin/java
+ jre_success='Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
           ...
           (full usage of java command)
First one is probably not a big deal.
Second one is about running a GUI inside an headless terminal (ssh), I'll have to test inside my xfce session, but I'm pretty sure the chroot here will block me.
 
OP
OP
patpro

patpro

Active Member

Reaction score: 14
Messages: 199

Ok, so I've tried on the xfce desktop directly. Odd: the chroot trick is no longer needed, I just can wrap my head around that. May be it's because I've created a /compat/linux/home/patpro that allow settings persistence, but it does not really add-up as the only file created in this "linux home" is recreated each time I start the script.

I don't have the JAVA error complaining about being headless anymore, but the script keeps on failing with this message:
Code:
Unable to locate the application's 'main' class. The class 'IPMIView20.IPMIView20' must be public and have a 'public static void main(String[])' method. (LAX)
And here I'm lost.

Meanwhile I've contacted Supermicro to ask if the latest firmware upgrade available for my old board comes with an HTML5 console. They replied - wait for it - "Please kindly update to the latest version to verify this feature. If the latest version doesn't have this feature, then it's the limitation of the IPMI on this model."

Meh.

Even if that works that would only be a workaround, and the inability to run properly a Linux JAVA software inside /compat/linux on FreeBSD is really sad :(
 
OP
OP
patpro

patpro

Active Member

Reaction score: 14
Messages: 199

Thanks, adding those libs resolved the problem. Its working out of a chroot. I can get the GUI and the KVM console \o/
 
Top