Wednesday 14 July 2010

"No Java Runtime Environment (JRE) was found on this system" when attempting to install IBM Tivoli Directory Server 6.2

Doh! Doh !Doh! Doh! Doh!

I spent 15 minutes wondering why I saw: -

Initializing Wizard
Extracting Bundled JRE
Verifying JVM
No Java Runtime Environment (JRE) was found on this system.

when attempting to install ITDS 6.2 from an extracted TAR file ( C1N8XML.tar ) using the command: -

./install_tds.bin

I then tried a slightly different tack, running the command with a log: -

./install_tds.bin -is:log /tmp/tds.log

which generated the following: -

Log file created by MultiPlatform installer @Wed Jul 14 14:42:40 BST 2010
INSTALLER_PATH=/tmp/tds/tds/./install_tds.bin
Checking the environment variables specifed in the JVM files to find the JVM...
No JVM can  be found using the shell environment variable. Searching JVM will continue with Path Hints specified in the JVM Files...
jvm files not specified. Searching a JVM can not be performed.
Extracting bundled JRE...
checking disk space on the parition /tmp/istemp14508195144240 for /tmp/istemp14508195144240/ibm_linux_amd64_150_sr7.bin
89432 512 bytes disk blocks required.
Cheking for disk quotas...
Disk quotas not enabled for /dev/mapper/VolGroup00-LogVol00...
24523760 512 bytes disk blocks  available on the partition /tmp/istemp14508195144240
Disk space check on the parition /tmp/istemp14508195144240 succeeded.
checking disk space on the parition /tmp/istemp14508195144240 for /tmp/istemp14508195144240/ibm_linux_amd64_150_sr7.bin
139196 512 bytes disk blocks required.
Cheking for disk quotas...
Disk quotas not enabled for /dev/mapper/VolGroup00-LogVol00...
24435104 512 bytes disk blocks  available on the partition /tmp/istemp14508195144240
Disk space check on the parition /tmp/istemp14508195144240 succeeded.
installing bundled JRE...
Verifying... /tmp/istemp14508195144240/_bundledJRE_/bin/java  -cp  /tmp/istemp14508195144240/Verify.jar Verify  java.vendor java.version
Verification failed for /tmp/istemp14508195144240/_bundledJRE_ using the JVM file /tmp/istemp14508195144240/_bundledJRE_/jvm

So far, so good.

I then attempted to test the bundled JRE, using the command: -

/tmp/istemp14508195144240/_bundledJRE_/bin/java -version

which returned: -

bash: /tmp/istemp14508195144240/_bundledJRE_/bin/java: cannot execute binary file

This ran a bell from an earlier blog posting so I further tested the JRE: -

strace /tmp/istemp14508195144240/_bundledJRE_/bin/java -version

which returned: -

execve("/tmp/istemp14508195144240/_bundledJRE_/bin/java", ["/tmp/istemp14508195144240/_bundl", "-version"], [/* 33 vars */]) = -1 ENOEXEC (Exec format error)
dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc4000
_llseek(3, 0, 0xbf930834, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: Exec format error\n", 32strace: exec: Exec format error
) = 32
close(3)                                = 0
munmap(0xb7fc4000, 4096)                = 0
exit_group(1)                           = ?

The Exec format error did it for me - at that point, I realised that I was  trying to install a 64-bit version of TDS onto a 32-bit OS :-)

A Google search for C1N8XML.tar confirmed this: -

Download IBM Tivoli Directory Server version 6.2 for Linux systems

http://www-01.ibm.com/support/doview.wss?uid=swg24021083

which showed: -

C1N8XML.tar              (tds62-linux-x86-64-base.tar)              IBM Tivoli Directory Server tar file for AMD64/EM64T Linux. Includes full server, proxy server, client

whereas I actually needed ( and had already downloaded ): -

C1N6YML.tar                (tds62-linux-ia32-base.tar)                    IBM Tivoli Directory Server tar file for System x Linux. Includes full server, proxy server, client

Ironically, the 64-bit version was on my oh-so-usual 320 GB USB drive where I keep all my software products, whereas the 32-bit version was sitting in DownloadDirector on my PC, waiting to be transferred to said USB drive.

Moral of the story ? Rename my TAR files to something more meaningful ....

8 comments:

Mrudula M said...

What a coincidence! I ran into exactly the same problem and was wondering if 64 bit is the problem and your post confirmed it. Thanks!
Mrudula

Dave Hay said...

Hi, glad to be of help, Dave

Ravi Agrawal said...

Thanks dear, I was facing same problem and was struggling to solve it since last week. Thanks for your valuable post.

Dave Hay said...

Hi Ravi, excellent, thanks for letting me know, Dave

nDarkDuck said...

This error could happen if SELinux is on enforncing mode....

Dave Hay said...

@nDarkDuck (interesting handle, btw) - yes, you're right, but I do tend to check for selinux after I saw an issue with that last year: -

http://portal2portal.blogspot.com/2010/03/reminder-to-myself-sel.html

Jay Butler said...

I had the same problem but it turned out to be due to a timing issue. If you are able to execute /tmp/istempXXXXX/_bundledJRE_/bin/java -version but continue to get the error, try using the parameter
-is:jvmtimer (see http://pic.dhe.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=%2Fcom.ibm.IBMDI.doc_7.1%2Fpdguide17.htm although to do with TDI but same logic applies.)

Dave Hay said...

@Jay - cheers, much obliged

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...