Thursday 16 November 2017

IBM DB2, Red Hat Enterprise Linux and the IBM Mainframe

I'm running through the process to deploy IBM Business Process Manager (BPM) 8.6 onto an IBM mainframe ….

This is something that I've done a number of times before, since I first joined the (then) IBM Software Services for WebSphere team in late 2012.

In essence, although the underlying hardware is the IBM z platform ( also known as LinuxOne in this guise ), I'm installing BPM etc. onto Red Hat Enterprise Linux (RHEL) and Linux is …. Linux.

So the approach to install BPM, and it's dependencies, is similar to any other Linux - in the main, I work with X86-64, so I used my notes for that platform as a Starter for 10.

I did, however, hit one glitch, namely in the context of installing IBM DB2 11.1.

Whilst I was attempting to install DB2: -

/tmp/Repo/DB2/Product/server_awse_o/db2setup -r /tmp/Repo/db2server111.rsp

I saw this: -

Requirement not matched for DB2 database "Server" . Version: "11.1.0.0". 

Summary of prerequisites that are not met on the current system: 

   DBT3514W  The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/libpam.so*". 


/tmp/Repo/DB2/Product/server_awse_o/db2/linux390/install/../bin/db2usrinf: error while loading shared libraries: libibmc++.so.1: cannot open shared object file: No such file or directory
/tmp/Repo/DB2/Product/server_awse_o/db2/linux390/install/../bin/db2usrinf: error while loading shared libraries: libibmc++.so.1: cannot open shared object file: No such file or directory
/tmp/Repo/DB2/Product/server_awse_o/db2/linux390/install/../bin/db2usrinf: error while loading shared libraries: libibmc++.so.1: cannot open shared object file: No such file or directory


Now the libyan.so message is common, and I've mostly ignored that - PAM == Pluggable Authentication Module and, as far as I can recollect, we'd only leverage PAM if we wanted to have DB2 users ( instance owner etc. ) authenticate against LDAP, which isn't a requirement for ME.

However, the exception re libibmc++.so.1 was more of a pain.

Thankfully, as ever, the Internet came to my rescue, with this: -




Following the advice therein, I went here: -


and downloaded the runtime from IBM Fix Central.

Having done so, I extracted the archive: -

tar xvzf IBM_XL_C_CPP_V1.2.0.0_LINUX_390_RUNTIME.tar.gz -C /tmp/Repo/CPP/

installed it: -

/tmp/Repo/CPP/install

/usr/bin/sudo rpm -Uvh /tmp/Repo/CPP/images/rhel/rpms/libxlc-1.2.0.0-151119a.s390x.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:libxlc-1.2.0.0-151119a           ################################# [100%]

and set the LD_LIBRARY_PATH variable: -

export LD_LIBRARY_PATH=/opt/ibm/lib64

This allowed me to install DB2: -

/tmp/Repo/DB2/Product/server_awse_o/db2setup -r /tmp/Repo/db2server111.rsp

Requirement not matched for DB2 database "Server" . Version: "11.1.0.0". 

Summary of prerequisites that are not met on the current system: 

   DBT3514W  The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/libpam.so*". 


DBI1191I  db2setup is installing and configuring DB2 according to the
      response file provided. Please wait.


The execution completed with warnings.

For more information see the DB2 installation log at "/tmp/db2setup.log".

However…..

When I came to patch DB2, it happened again: -

/tmp/Repo/DB2/Fixpack/universal/installFixPack -n -b /opt/ibm/db2/V11.1/

Requirement not matched for DB2 database "Server" . Version: "11.1.2.2". 

Summary of prerequisites that are not met on the current system: 

   DBT3514W  The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/libpam.so*". 


/opt/ibm/db2/V11.1/bin/db2langdir: error while loading shared libraries: libibmc++.so.1: cannot open shared object file: No such file or directory
/opt/ibm/db2/V11.1/bin/db2langdir: error while loading shared libraries: libibmc++.so.1: cannot open shared object file: No such file or directory
DBI1131E  The user ID DBI1055E is invalid.

Explanation: 

An attempt to access the given user ID failed. One of the following
situations has occurred:

*  This user ID does not exist on the system.

*  The home directory of this user does not exist or is not set up
   properly.

*  One of the user attributes needed by the database manager is unset.

*  The UID of this user is 0

User response: 

Make sure a valid user ID with valid home directory, shell, primary
group and secondary group has been used. Create a new user if necessary.


   Related information:
   Creating group and user IDs for a DB2 database installation (Linux
   and UNIX)
   DB2 users and groups (Linux and UNIX)

I dug around internally (!), and found another gem; to create symbolic links to the newly installed IBM C/C++ runtime into /usr/lib.

Working on the "Hope for the best, but plan for the worst" scenario, I did this: -

ln -s /opt/ibm/lib/libibmc++.so.1 /usr/lib
ln -s /opt/ibm/lib64/libibmc++.so.1 /usr/lib64/

and was then able to install the fix pack: -

/tmp/Repo/DB2/Fixpack/universal/installFixPack -n -b /opt/ibm/db2/V11.1/

Requirement not matched for DB2 database "Server" . Version: "11.1.2.2". 

Summary of prerequisites that are not met on the current system: 

   DBT3514W  The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/libpam.so*". 


DBI1017I  installFixPack is updating the database products installed in
      location /opt/ibm/db2/V11.1/.


The execution completed successfully.

For more information see the DB2 installation log at
"/tmp/installFixPack.log.62145".

So that's another fine mess, got out of :-)


2 comments:

Unknown said...

Thanks for posting your solution, this issue still exists years later. I did a search and was pointed to this technote for downloading the archive; https://www.ibm.com/support/pages/node/585799

And there was a similar writeup that had contained the technote but the symbolic links were not mentioned.

I appreciate the detail. Thanks

Dave Hay said...

Awesome, great to know, thanks for sharing

Cheers, Dave

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...