Solved Using IPMIView on FreeBSD

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.
 
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.
 
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.
 
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.
 
Try chroot /compat/linux /bin/bash. Then starting the application from that prompt.
 
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.
 
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 :(
 
Trying to do the same.

I have a Supermicro server and when trying to run IPMI in linux compat get the following:

Code:
# chroot /compat/ubuntu /bin/bash

$ root@user:/# cd /home/IPMIView_2.21.0_build.221118_bundleJRE_Linux_x64

$ ./IPMIView20

Authorization required, but no authorization protocol specified
Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)

Stack Trace:
java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:102)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:61)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:101)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:83)
at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:129)
at java.desktop/java.awt.Window.initGC(Window.java:487)
at java.desktop/java.awt.Window.init(Window.java:507)
at java.desktop/java.awt.Window.<init>(Window.java:549)
at java.desktop/java.awt.Frame.<init>(Frame.java:423)
at java.desktop/java.awt.Frame.<init>(Frame.java:388)
at java.desktop/javax.swing.JFrame.<init>(JFrame.java:180)
at IPMIView20.IPMIView20.<init>(IPMIView20.java:1146)
at IPMIView20.IPMIView20.main(IPMIView20.java:4639)
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 java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.zerog.lax.LAX.launch(Unknown Source)
at com.zerog.lax.LAX.main(Unknown Source)
This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)

Thanks.
 
Back
Top