Friday, 7 May 2010

IBM HTTP Server 6.1 - Too Many Bits ...

Had an interesting problem today whilst trying to install IBM HTTP Server 6.1 on Red Hat Enterprise Linux.

Having expanded the TGZ file that contains the IHS server, along with other goodies that form part of the bundle WebSphere Application Server 6.1 Supplemental, I attempted to install IHS using the command

/tmp/IHS/install

which merely took me back to the command line, with absolutely no error message etc.

I debugged things a little further, using the strace command: -

strace /tmp/IHS/install

This returned a little bit more detail, including: -

stat64("/tmp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/tmp/JDK", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/tmp/JDK/jre.pak", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/tmp/JDK/jre.pak/repository", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/tmp/JDK/jre.pak/repository/package.java.jre", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/tmp/JDK/jre.pak/repository/package.java.jre/java", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/tmp/JDK/jre.pak/repository/package.java.jre/java/jre", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/tmp/JDK/jre.pak/repository/package.java.jre/java/jre/bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
chdir("/tmp/JDK/jre.pak/repository/package.java.jre/java/jre/bin") = 0
which made me start to think.

To be sure, I attempted to run the JRE that is packaged as part of the IHS installer: -

cd /tmp/JDK/jre.pak/repository/package.java.jre/java/jre/bin
./java -version

which returned: -

bash: ./java: cannot execute binary file


I again used strace to debug things: -

strace ./java -version

which returned: -

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

Now I *may* be wrong, but I'm guessing that the fstat64 references in the two strace stacks indicate that I have a 64-bit JVM, whereas I'm using a 32-bit operating system.

I downloaded the WAS 6.1 Supplemental code again ( as C88T0ML.tar.gz ), ensuring that I definitely selected the 32-bit version, and was able to install IHS successfully.

The moral of the story - use strace ...

1 comment:

Unknown said...

Thank you for this.

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="{...