TheCase / IPMIView.app

MacOS App wrapper for Supermicro's IPMIView/iKVM java app
https://github.com/TheCase/IPMIView.app/wiki
199 stars 41 forks source link

KVM error #23

Open vbarba opened 1 year ago

vbarba commented 1 year ago

Hi,

I got the following error after trying to access the KVM:


com.supermicro.ipmi.IPMIException: Invalid data field in Request(CCh)
    at com.supermicro.ipmi.IPMICommand.ccode2Exception(IPMICommand.java:35)
    at com.supermicro.ipmi.IPMIOEMPortServiceCommand.getPort(IPMIOEMPortServiceCommand.java:50)
    at IPMIView20.KVMATENPanel.lambda$jButton1_actionPerformed$13(KVMATENPanel.java:485)
    at java.base/java.lang.Thread.run(Thread.java:844) ```

Did someone experience same issue?

TIA
TheCase commented 1 year ago

I would ask you to run the app without the wrapper and see if you have the same issue.

https://github.com/TheCase/IPMIView.app/wiki/Troubleshooting

asaraseka commented 1 year ago

I have the same while running without wrapper. Also UI gives me "no IKVM64 in java.library.path: [.]" I'm using M1 mac, so that might be an issue ...

TheCase commented 1 year ago

https://github.com/TheCase/IPMIView.app/wiki/Troubleshooting

hidden72 commented 1 year ago

I have the same while running without wrapper. Also UI gives me "no IKVM64 in java.library.path: [.]" I'm using M1 mac, so that might be an issue ...

I've been using TheCase/IPMIView.app on my M1 Mac Mini for a few months now and it's worked perfectly. No issues with the Java KVM. This worked properly with both MacOS 13.4 and this morning I upgraded to 13.5 and things are still working well.

However, I recently acquired a MacBook Pro 16" w/ an M2-based CPU. I was getting the same "no iKVM64 in java.library.path" error message as you. I finally got it working this morning and while it feels "icky", it seemed to do the trick for me.

I uninstalled all 3rd party Java versions: "brew uninstall openjdk" I re-downloaded the ARM64 JRE installer (jre-8u381-macosx-aarch64.dmg) from here: https://www.java.com/en/download/. in order to re-run the "installer" and used the "REMOVE" button option to uninstall. I also deleted all of the subdirectories inside of /Library/Java/JavaVirtualMachines/ (required sudo rm -rf to each of the directories.. there were two or three if I remember correctly)

I went back to https://www.java.com/en/download/ and this time I downloaded the INTEL version of the JRE (jre-8u381-macosx-x64.dmg). Install this version. (Side-note, let it run for a couple of minutes... on my system the installer seemed to do some work and then just spun and spun on the "installing" screen never seeming to finalize the install). After the 2 minutes I manually closed the installer.

Next I deleted ~/Applications/IPMIView.app In Terminal I went back to ~/IPMIView.app and re-ran the script.sh installer: "bash script.sh"

From here, things seem to operate as documented by TheCase. You launch ~/Applications/IPMIView.app, login to an IPMI system, go to the KVM tab, launch the java KVM, get challenged for Security/Privacy permissions (like input monitoring), enable/allow the requested permissions, restart IPMIView.app, and now the java KVM works!

I'd be curious if this works for you. Apologies for not providing links on the "why this" - it was the result of reading way too many webpages looking for the proverbial needle in the haystack. I don't want to go searching for that needle again.

gbooker commented 11 months ago

I'm replying to state that ^^ worked on my M2 mini. Similarly, I also had the Installer seemingly hang (Oracle quality at its finest). Additionally, I also:

I also wanted to remove the /Library/Internet Plug-Ins/JavaAppletPlugin.plugin because I don't want browsers to even have the option of running applets but it appears this is where the java binary actually resides as the IPMIView ceased to work after I removed this.

As per why this is required: The jar file used by this app contains native code. When the JVM is running ARM64 code, it cannot link in x86_64 (called Intel by some) code in the same binary. So to use the x86_64 code in the jar, the JVM itself must be x86_64 code to properly link (and thus all running inside Rosetta 2).

gbooker commented 8 months ago

In case anyone else runs into this, on my M2 mac I accidentally let Oracle's updater update my Java. After that, no amount of uninstalling or reinstalling left me with an IPMIView which worked on my M2 mac. It still functioned on my Intel mac (as expected) but there I noticed that I wasn't using Oracle's Java but rather OpenJDK. So I tried that on my M2 mac and success. So the steps are:

  1. Use the above linked Java installers by hidden72 to uninstall Oracle's Java (if you have it installed)
  2. Download OpenJDK from https://adoptium.net/temurin/releases/?version=11&os=mac&arch=x64&package=jdk (I grabbed the pkg version). Other OpenJDKs will likely work but this is the one I was using because I was using it for other purposes in addition to IPMI so I stuck with the same one on the M2 mac. Notice that it is x64 and not aarch64 because this is required (see my last comment)
  3. Delete ~/Applications/IPMIView.app
  4. Clone this repo (if not already) and cd into the clone
  5. bash script.sh

This is all I did and I had a functioning KVM inside the IPMI again. Hopefully this works for you.

ChristopherSchultz commented 7 months ago

I have the same while running without wrapper. Also UI gives me "no IKVM64 in java.library.path: [.]" I'm using M1 mac, so that might be an issue ...

You need to launch the java command from the command-line with your current-working-directory being the directory where the IPMIView20.jar file is located. When that program launches the KVM -- which is a separate program for some reason -- it invokes Java and sets up the environment using . as the java.library.path which is where those shared libraries need to be.

Make sure you are running an x86-64 JVM as mentioned a few times above. Using an arm JVM will likely cause a failure to load those libraries, which will result in the same message as not having them at all.

ChristopherSchultz commented 7 months ago

I've got a problem right now where the KVM launches and immediately quits. Capturing the command-line from ps while it's trying to load shows me the command line /usr/bin/java -Djava.library.path=. -jar iKVM.jar [server IP] 0 0 --FR. When I run that manually I get an error "File missing, cannot open KVM" error plus a NumberFormatException on stdout. :(

1ocate commented 2 months ago

@ChristopherSchultz hi did you solve problem? my macbook air m2 also same problem.


I was give up, but today just try everything is ok.

I just put sleep and wakeup