| |

Old Dell iDrac – work around Java failures

I have an old Dell server (R610, if it’s important) and I seem to fail to connect to its iDrac console via Java. No other options exist, and the browser calling Java flow fails somehow.

I have found an explanation here, and I will copy it for eternity 🙂

First – Download the latest JRE version 1.7 from https::/java.com

Then, extract it to a directory of your choice. We’ll call this directory $RUN_ROOT

Download the viewer.jnlp file to this directory $RUN_ROOT, and open it with a text editor. You will see an XML block pointing at a JAR file called avctKVM.jar. Download it manually using ‘wget’ or ‘curl’ from the URL provided in the viewer.jnlp XML file.

Extract the avctKVM.jar file using ‘unzip’. You will get two libraries – avctKVMIO(.so or .dll for Windows) and avmWinLib(.so or .dll for Windows). Move these two files into a new directory under $RUN_ROOT/lib

Download/copy-paste the below .bat or .sh script files (.bat file for Windows, .sh file for Linux).

start-virtual-console.bat
@echo off

set /P drachost="Host: "
set /p dracuser="Username: "
set "psCommand=powershell -Command "$pword = read-host 'Enter Password' -AsSecureString ; ^
    $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^
        [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)""
for /f "usebackq delims=" %%p in (`%psCommand%`) do set dracpwd=%%p
start-virtual-console.sh
#!/bin/bash

echo -n 'Host: '
read drachost

echo -n 'Username: '
read dracuser

echo -n 'Password: '
read -s dracpwd
echo

./jre/bin/java -cp avctKVM.jar -Djava.library.path=./lib com.avocent.idrac.kvm.Main ip=$drachost kmport=5900 vport=5900 user=$dracuser passwd=$dracpwd apcp=1 version=2 vmprivilege=true "helpurl=https://$drachost:443/help/contents.html"

Run the downloaded script file (with Linux – you might want to give it execution permissions first), and you will be asked for your credentials.

Thanks Nicola for this brilliant solution!

Similar Posts

4 Comments

  1. just a heads up for the author (and any one who may come back here in the future to help figure out this issues), the .bat file is missing the final, important line. here’s the complete file contents:
    *********************
    @echo off

    set /P drachost=”Host: ”
    set /p dracuser=”Username: ”
    set “psCommand=powershell -Command “$pword = read-host ‘Enter Password’ -AsSecureString ; ^
    $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^
    [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)””
    for /f “usebackq delims=” %%p in (`%psCommand%`) do set dracpwd=%%p

    .\jre\bin\java -cp avctKVM.jar -Djava.library.path=.\lib com.avocent.idrac.kvm.Main ip=%drachost% kmport=5900 vport=5900 user=%dracuser% passwd=%dracpwd% apcp=1 version=2 vmprivilege=true “helpurl=https://%drachost%:443/help/contents.html”

    ******************************
    also, idk if dell has changed the contents of the jnlp file or if mine is different because i’m on idrac5 with an r510, but the avctKVM.jar file didn’t contain the dlls that you mentioned. I had to actually download the “avctKVMIOWin32.jar” and the “avctVMWin32.jar” files that were shown in the xml. avctKVMIOWin32.jar contained the avctKVMIO.dll file and avctVMWin32.jar contained the avmWinLib.dll file (I’m sure the 64-bit versions of those files would work also if you’re running 64-bit java).

    hopefully this closes the loop on possible differences for users in the future (and/or me when I inevitably have to search for this again)

    1. Thanks for the clarification. I am (somewhat) glad that I do not have access to too many old Dell servers. But for the one-time-in-a-million – it’s helpful, so thanks!

  2. wow… the previous post really lost all of my formatting, i guess. everything between the “*********************” sections is the corrected batch file contents.

  3. man… posts get jacked up here, apparently. for anyone looking for this in the future, the batch file on this page is missing the actual line needed to run the command and launch the viewer, look at the link provided at the top of the page for the full batch script.

    also, depending on your version of idrac (in my case, I was running idrac5 on an r510), you may need different jar files to get the dll/so files described above. i needed avctKVMIOWin32.jar and avctVMWin32.jar, as avctKVM.jar didn’t contain the built dlls, only the source code for them, i believe.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.