Saturday, 30 August 2014

Cognos on Linux - Dependencies - Soup to Nuts

A follow-up: -



Replicate the problem

cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/cognos/SupClusterMember1/bin
./BIBusTKServerMain

./BIBusTKServerMain: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

Diagnose using LDD

cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/cognos/SupClusterMember1/bin
ldd BIBusTKServerMain
linux-gate.so.1 =>  (0x00917000)
libtcmalloc_minimal.so.0 => ./libtcmalloc_minimal.so.0 (0x00b27000)
libBIBusTK.so => ./libBIBusTK.so (0x00a31000)
libBIBusTKServer.so => ./libBIBusTKServer.so (0x007d5000)
libCCLCore.so => ./libCCLCore.so (0x00110000)
libX11.so.6 => not found
libdl.so.2 => /lib/libdl.so.2 (0x006e5000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00663000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x004af000)
libm.so.6 => /lib/libm.so.6 (0x002e9000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00273000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00ef6000)
libc.so.6 => /lib/libc.so.6 (0x00b63000)
libxerces-c.so.27 => ./libxerces-c.so.27 (0x00f11000)
librt.so.1 => /lib/librt.so.1 (0x00291000)
libCCLCryptoShared.so => ./libCCLCryptoShared.so (0x003f6000)
libCCLIDOM.so => ./libCCLIDOM.so (0x00d16000)
libCCLHttptools.so => ./libCCLHttptools.so (0x0096c000)
libIBJStreamsDLL.so => ./libIBJStreamsDLL.so (0x00abc000)
libX11.so.6 => not found
libCCLCFGAPI.so => ./libCCLCFGAPI.so (0x0029a000)
libcogipf2.so => ./libcogipf2.so (0x00415000)
coglog4ccl.so => ./coglog4ccl.so (0x0059a000)
libX11.so.6 => not found
libz.so.1 => ./libz.so.1 (0x002c9000)
libicucogi18n.so.40 => ./libicucogi18n.so.40 (0x07541000)
libicucoguc.so.40 => ./libicucoguc.so.40 (0x00d61000)
/lib/ld-linux.so.2 (0x003a3000)
libX11.so.6 => not found
libicucogdata.so.40 => ./libicucogdata.so.40 (0xf6ac7000)
libX11.so.6 => not found
libX11.so.6 => not found
libX11.so.6 => not found
libX11.so.6 => not found
libX11.so.6 => not found
libX11.so.6 => not found
libX11.so.6 => not found


Look at the missing library

locate libX11.so.6

/usr/lib64/libX11.so.6
/usr/lib64/libX11.so.6.3.0


See, there's a 64-bit version, but no 32-bit version :-(

Look at the RPMs that provide that library

yum list | grep -i libX11

libX11.x86_64                           1.3-2.el6                        @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3
libX11-common.noarch                    1.3-2.el6                        @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3
libX11.i686                             1.3-2.el6                        server 
libX11-devel.i686                       1.3-2.el6                        server 
libX11-devel.x86_64                     1.3-2.el6                        server 

Look at what's installed

rpm -qa | grep -i libX11

libX11-1.3-2.el6.x86_64
libX11-common-1.3-2.el6.noarch


Install the missing RPM ( the 386 version )

yum install libX11.i686

Test again using LDD

ldd BIBusTKServerMain

linux-gate.so.1 =>  (0x00f48000)
libtcmalloc_minimal.so.0 => ./libtcmalloc_minimal.so.0 (0x00110000)
libBIBusTK.so => ./libBIBusTK.so (0x004a3000)
libBIBusTKServer.so => ./libBIBusTKServer.so (0x002f7000)
libCCLCore.so => ./libCCLCore.so (0x00dcd000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x0014c000)
libdl.so.2 => /lib/libdl.so.2 (0x00bab000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00661000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00c33000)
libm.so.6 => /lib/libm.so.6 (0x0061d000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00284000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00ace000)
libc.so.6 => /lib/libc.so.6 (0x0067c000)
libxerces-c.so.27 => ./libxerces-c.so.27 (0x00f49000)
librt.so.1 => /lib/librt.so.1 (0x004f1000)
libCCLCryptoShared.so => ./libCCLCryptoShared.so (0x00522000)
libCCLIDOM.so => ./libCCLIDOM.so (0x00d64000)
libCCLHttptools.so => ./libCCLHttptools.so (0x002a2000)
libIBJStreamsDLL.so => ./libIBJStreamsDLL.so (0x002c4000)
libCCLCFGAPI.so => ./libCCLCFGAPI.so (0x005e3000)
libcogipf2.so => ./libcogipf2.so (0x0032b000)
coglog4ccl.so => ./coglog4ccl.so (0x0053c000)
libz.so.1 => ./libz.so.1 (0x00419000)
libicucogi18n.so.40 => ./libicucogi18n.so.40 (0x00904000)
libicucoguc.so.40 => ./libicucoguc.so.40 (0x06517000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x0036a000)
/lib/ld-linux.so.2 (0x003a3000)
libicucogdata.so.40 => ./libicucogdata.so.40 (0xf6b5e000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x002e5000)


Now try and run the binary

./BIBusTKServerMain

port=33768 pid=40133

Sorted :-)

I love this stuff :-)

No comments:

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