Wednesday, 22 November 2017

Interesting - java.lang.NoClassDefFoundError: com.ibm.xylem.utils.ErrorHandlerProvider

During an installation of IBM BPM Advanced 8.5.5 onto Red Hat Enterprise Linux 7.4 ( which, I know, is an unsupported combination ), I had an interesting experience.

This was the installation command: -

/opt/ibm/InstallationManager/eclipse/tools/imcl -input /mnt/ResponseFiles/installBPM855.rsp -acceptLicense

and this was the result: -

ERROR: java.lang.NoClassDefFoundError: com.ibm.xylem.utils.ErrorHandlerProvider

java.lang.NoClassDefFoundError: com.ibm.xylem.utils.ErrorHandlerProvider

com.ibm.oti.vm.VM.findClassOrNull(Native Method)
com.ibm.oti.vm.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:62)
com.ibm.oti.vm.VM.findClassOrNull(Native Method)
com.ibm.oti.vm.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:62)
com.ibm.xtq.xslt.jaxp.TransformerImpl.<init>(Unknown Source)
com.ibm.xtq.xslt.jaxp.TransformerImpl.<init>(Unknown Source)
com.ibm.xtq.xslt.jaxp.AbstractTransformerFactory.newTransformer(Unknown Source)
com.ibm.ws.persist.installregistries.PostSessionAction.saveDocument(PostSessionAction.java:496)
com.ibm.ws.persist.installregistries.PostSessionAction.syncFile(PostSessionAction.java:300)
com.ibm.ws.persist.installregistries.PostSessionAction.persistData(PostSessionAction.java:238)
com.ibm.ws.persist.installregistries.PostSessionAction.runPostInstall(PostSessionAction.java:161)
com.ibm.cic.agent.core.PostSessionManager.runActions(PostSessionManager.java:288)
com.ibm.cic.agent.core.PostSessionManager.runPostInstallActions(PostSessionManager.java:260)
com.ibm.cic.agent.core.PostSessionManager.run(PostSessionManager.java:113)
com.ibm.cic.agent.internal.core.Director.install(Director.java:661)
com.ibm.cic.agent.core.Agent.install(Agent.java:1796)
com.ibm.cic.agent.core.Agent.install(Agent.java:1737)
com.ibm.cic.agent.core.internal.commands.InstallCommand.execute(InstallCommand.java:244)
com.ibm.cic.agent.core.internal.commands.AbstractInstallCommand.execute(AbstractInstallCommand.java:336)
com.ibm.cic.agent.core.internal.commands.Input.executeCommands(Input.java:358)
com.ibm.cic.agent.core.application.HeadlessApplication.run(HeadlessApplication.java:599)
com.ibm.cic.agent.core.application.HeadlessApplication.run(HeadlessApplication.java:482)
com.ibm.cic.agent.core.application.HeadlessApplication.runAndReport(HeadlessApplication.java:492)
com.ibm.cic.agent.core.application.HeadlessApplication.runAgentNoStdout(HeadlessApplication.java:446)
com.ibm.cic.agent.core.application.HeadlessApplication.runAgent(HeadlessApplication.java:194)
com.ibm.cic.agent.core.application.HeadlessApplication.run(HeadlessApplication.java:151)
com.ibm.cic.agent.core.application.HeadlessApplication.runHeadlessApplication(HeadlessApplication.java:178)
com.ibm.cic.agent.internal.ui.AgentUIApplication.launch(AgentUIApplication.java:180)
com.ibm.cic.agent.internal.ui.AgentUIApplication.start(AgentUIApplication.java:83)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
java.lang.reflect.Method.invoke(Method.java:611)
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
org.eclipse.equinox.launcher.Main.run(Main.java:1438)
org.eclipse.equinox.launcher.Main.main(Main.java:1414)


Interestingly, IBM Installation Manager reckoned that things were installed: -

/opt/ibm/InstallationManager/eclipse/tools/imcl listInstalledPackages

com.ibm.cic.agent_1.7.2000.20140227_0303
com.ibm.bpm.ADV.v85_8.5.5000.20140604_1130
com.ibm.websphere.ND.v85_8.5.5002.20140408_1947


and yet: -

/opt/ibm/WebSphere/AppServer/bin/versionInfo.sh 

returned: -

WVER0010I: Copyright (c) IBM Corporation 2002, 2012; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.1.48, dated 2/8/12

[Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :-1:-1: Premature end of file.
--------------------------------------------------------------------------------
IBM WebSphere Product Installation Status Report
--------------------------------------------------------------------------------

Report at date and time 22 November 2017 20:49:02 GMT

Installation
--------------------------------------------------------------------------------
Product Directory        /opt/ibm/WebSphere/AppServer
Version Directory        /opt/ibm/WebSphere/AppServer/properties/version
DTD Directory            /opt/ibm/WebSphere/AppServer/properties/version/dtd
Log Directory            

Product List
--------------------------------------------------------------------------------
BPMPC                    installed
ND                       installed

Installed Product
--------------------------------------------------------------------------------
Premature end of file.


I uninstalled WAS and BPM: -

/opt/ibm/InstallationManager/eclipse/tools/imcl uninstallAll

Uninstalled com.ibm.bpm.ADV.v85_8.5.5000.20140604_1130 from the /opt/ibm/WebSphere/AppServer directory.
Uninstalled com.ibm.websphere.ND.v85_8.5.5002.20140408_1947 from the /opt/ibm/WebSphere/AppServer directory.

cleared down the /opt/ibm/WebSphere directory: -

rm -Rf /opt/ibm/WebSphere

and tried again: -

/opt/ibm/InstallationManager/eclipse/tools/imcl -input /mnt/ResponseFiles/installBPM855.rsp -acceptLicense

ERROR: java.lang.NoClassDefFoundError: com.ibm.xylem.utils.ErrorHandlerProvider

java.lang.NoClassDefFoundError: com.ibm.xylem.utils.ErrorHandlerProvider

com.ibm.oti.vm.VM.findClassOrNull(Native Method)
com.ibm.oti.vm.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:62)
com.ibm.oti.vm.VM.findClassOrNull(Native Method)
com.ibm.oti.vm.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:62)
com.ibm.xtq.xslt.jaxp.TransformerImpl.<init>(Unknown Source)
com.ibm.xtq.xslt.jaxp.TransformerImpl.<init>(Unknown Source)
com.ibm.xtq.xslt.jaxp.AbstractTransformerFactory.newTransformer(Unknown Source)
com.ibm.ws.persist.installregistries.PostSessionAction.saveDocument(PostSessionAction.java:496)
com.ibm.ws.persist.installregistries.PostSessionAction.syncFile(PostSessionAction.java:300)
com.ibm.ws.persist.installregistries.PostSessionAction.persistData(PostSessionAction.java:238)
com.ibm.ws.persist.installregistries.PostSessionAction.runPostInstall(PostSessionAction.java:161)
com.ibm.cic.agent.core.PostSessionManager.runActions(PostSessionManager.java:288)
com.ibm.cic.agent.core.PostSessionManager.runPostInstallActions(PostSessionManager.java:260)
com.ibm.cic.agent.core.PostSessionManager.run(PostSessionManager.java:113)
com.ibm.cic.agent.internal.core.Director.install(Director.java:661)
com.ibm.cic.agent.core.Agent.install(Agent.java:1796)
com.ibm.cic.agent.core.Agent.install(Agent.java:1737)
com.ibm.cic.agent.core.internal.commands.InstallCommand.execute(InstallCommand.java:244)
com.ibm.cic.agent.core.internal.commands.AbstractInstallCommand.execute(AbstractInstallCommand.java:336)
com.ibm.cic.agent.core.internal.commands.Input.executeCommands(Input.java:358)
com.ibm.cic.agent.core.application.HeadlessApplication.run(HeadlessApplication.java:599)
com.ibm.cic.agent.core.application.HeadlessApplication.run(HeadlessApplication.java:482)
com.ibm.cic.agent.core.application.HeadlessApplication.runAndReport(HeadlessApplication.java:492)
com.ibm.cic.agent.core.application.HeadlessApplication.runAgentNoStdout(HeadlessApplication.java:446)
com.ibm.cic.agent.core.application.HeadlessApplication.runAgent(HeadlessApplication.java:194)
com.ibm.cic.agent.core.application.HeadlessApplication.run(HeadlessApplication.java:151)
com.ibm.cic.agent.core.application.HeadlessApplication.runHeadlessApplication(HeadlessApplication.java:178)
com.ibm.cic.agent.internal.ui.AgentUIApplication.launch(AgentUIApplication.java:180)
com.ibm.cic.agent.internal.ui.AgentUIApplication.start(AgentUIApplication.java:83)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
java.lang.reflect.Method.invoke(Method.java:611)
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
org.eclipse.equinox.launcher.Main.run(Main.java:1438)
org.eclipse.equinox.launcher.Main.main(Main.java:1414)


Which is weird :-(

So that may be tomorrow's challenge - either to persist, or to switch to a supported version of RHEL.

What fun !

*UPDATE* Solved it !

Having previously used IBM Installation Manager 1.7.2 ( which comes with BPM 8.5.5 which shipped in mid-2014 ), I switched up to IBM Installation Manager 1.8.6.1.

Having done this, the installation completed successfully: -

/opt/ibm/InstallationManager/eclipse/tools/imcl -input /mnt/ResponseFiles/installBPM855.rsp -acceptLicense

Installed com.ibm.bpm.ADV.v85_8.5.5000.20140604_1130 to the /opt/ibm/WebSphere/AppServer directory.
Installed com.ibm.websphere.ND.v85_8.5.5002.20140408_1947 to the /opt/ibm/WebSphere/AppServer directory.
WARNING: A supported operating system was not detected. Support for your operating system might have been added after the release of the product. See the detailed system requirements Web pages http://www.ibm.com/support/docview.wss?uid=swg27023005 for more information about supported operating systems. You can continue with the installation, but the installation or product operation might not succeed without applying maintenance. Go to the product support Web pages http://www.ibm.com/support/docview.wss?uid=swg27006649 to obtain the latest maintenance packages to apply after installation.
WARNING: A supported operating system was not detected. Support for your operating system might have been added after the release of the product. See the WebSphere Application Server detailed system requirements Web pages - http://www.ibm.com/support/docview.wss?rs=180&&uid=swg27006921 for more information about supported operating systems. You can continue with the installation, but the installation or product operation might not succeed without applying maintenance. Go to the product support Web pages - http://www.ibm.com/support/docview.wss?rs=180&&uid=swg27004980 to obtain the latest maintenance packages to apply after installation.

Note the warning about an unsupported operating system - this comes from WebSphere Application Server 8.5.5.2, which again ships with BPM 8.5.5.

Similarly, versionInfo.sh worked: -

/opt/ibm/WebSphere/AppServer/bin/versionInfo.sh 
WVER0010I: Copyright (c) IBM Corporation 2002, 2012; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.1.48, dated 2/8/12

--------------------------------------------------------------------------------
IBM WebSphere Product Installation Status Report
--------------------------------------------------------------------------------

Report at date and time 23 November 2017 08:16:54 GMT

Installation
--------------------------------------------------------------------------------
Product Directory        /opt/ibm/WebSphere/AppServer
Version Directory        /opt/ibm/WebSphere/AppServer/properties/version
DTD Directory            /opt/ibm/WebSphere/AppServer/properties/version/dtd
Log Directory            /home/wasadmin/var/ibm/InstallationManager/logs

Product List
--------------------------------------------------------------------------------
BPMPC                    installed
ND                       installed

Installed Product
--------------------------------------------------------------------------------
Name                  IBM Business Process Manager Advanced
Version               8.5.5.0
ID                    BPMPC
Build Level           20140604-091948
Build Date            6/4/14
Package               com.ibm.bpm.ADV.v85_8.5.5000.20140604_1130
Architecture          x86-64 (64 bit)
Installed Features    Business Process Manager Advanced Process Server Non-production License

Installed Product
--------------------------------------------------------------------------------
Name                  IBM WebSphere Application Server Network Deployment
Version               8.5.5.2
ID                    ND
Build Level           cf021414.01
Build Date            4/8/14
Package               com.ibm.websphere.ND.v85_8.5.5002.20140408_1947
Architecture          x86-64 (64 bit)
Installed Features    IBM 64-bit WebSphere SDK for Java
                      WebSphere Application Server Full Profile
                      EJBDeploy tool for pre-EJB 3.0 modules
                      Embeddable EJB container
                      Stand-alone thin clients and resource adapters

--------------------------------------------------------------------------------
End Installation Status Report
--------------------------------------------------------------------------------

which is nice.

Bottom line, DON'T PANIC

IBM Cloud Private and Kubernetes - Coping files

Whilst I have used docker cp numerous times to copy files from a running container to the host ( or vice versa ), I had the need to do the same with a container running in a Pod orchestrated by Kubernetes.

The syntax for Docker is: -

docker cp <<container ID>>:/from-path /to-path

e.g.

docker cp 97ee4c182ece:/opt/ibm/db2/V11.1/java/db2jcc4.jar .

For containers running in Pods via Kubernetes, it's a little different.

The first trick is to inspect the Pod: -

kubectl get pod

NAME                                         READY     STATUS                          RESTARTS   AGE
db2trader-ibm-db2oltp-dev-2298094317-fgn0b   1/1       Running                         0          3h
jenkins-jenkins-662520783-jq60z              1/1       Running                         0          18h
loyalty-level-2196446665-hnsnv               1/1       Running                         0          12m
mqtraader-ibm-mqadvanced-0                   1/1       Running                         0          2h
notification-3317998672-qsgvj                0/1       secrets "openwhisk" not found   0          11m
portfolio-1784192597-588s1                   1/1       Running                         0          11m
redistrader-redis-0                          1/1       Running                         0          2h
redistrader-redis-1                          1/1       Running                         0          2h
redistrader-redis-2                          1/1       Running                         0          2h
stock-quote-2259670618-z0400                 1/1       Running                         0          11m
trader-2151312948-zfvch                      1/1       Running                         0          12m


kubectl describe pod mqtraader-ibm-mqadvanced-0

Name:           mqtraader-ibm-mqadvanced-0
Namespace:      default
Node:           10.0.0.3/10.0.0.3
Start Time:     Wed, 22 Nov 2017 03:07:48 -0800
Labels:         QM_IDENTIFIER=mqtraader
                app=mqtraader-ibm-mqadvanced
                chart=ibm-mqadvanced-server-dev-1.0.1
                controller-revision-hash=mqtraader-ibm-mqadvanced-1107708458
                heritage=Tiller
                release=mqtraader
Annotations:    kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"StatefulSet","namespace":"default","name":"mqtraader-ibm-mqadvanced","uid":"5f5a8bc6-cf75-11e7-82cf-005056...
                kubernetes.io/psp=default
Status:         Running
IP:             10.1.88.143
Created By:     StatefulSet/mqtraader-ibm-mqadvanced
Controlled By:  StatefulSet/mqtraader-ibm-mqadvanced
Containers:
  qmgr:
    Container ID:   docker://fe7c9127776da0bdea9953dd4d804af17318b019f68aac521222a795d06bf1a3
    Image:          ibmcom/mq:9
    Image ID:       docker-pullable://ibmcom/mq@sha256:76d74d07ccd6fa49297ba01f199ac95e0f89d8c4a068ccb655380c6a5d8aec93
    Ports:          1414/TCP, 9443/TCP
    State:          Running
      Started:      Wed, 22 Nov 2017 03:07:50 -0800
    Ready:          True
    Restart Count:  0
    Limits:
      cpu:     500m
      memory:  512Mi
    Requests:
      cpu:     500m
      memory:  512Mi
    Environment:
      LICENSE:            accept
      MQ_QMGR_NAME:       admin
      MQ_ADMIN_PASSWORD:  <set to the key 'adminPassword' in secret 'mqtraader-ibm-mqadvanced'>  Optional: false
      MQ_APP_PASSWORD:    <set to the key 'appPassword' in secret 'mqtraader-ibm-mqadvanced'>    Optional: false
    Mounts:
      /mnt/mqm from mqtraader-ibm-mqadvanced-mqvol1 (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-l601r (ro)
Conditions:
  Type           Status
  Initialized    True 
  Ready          True 
  PodScheduled   True 
Volumes:
  mqtraader-ibm-mqadvanced-mqvol1:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  mqtraader-ibm-mqadvanced-mqvol1-mqtraader-ibm-mqadvanced-0
    ReadOnly:   false
  default-token-l601r:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-l601r
    Optional:    false
QoS Class:       Guaranteed
Node-Selectors:  <none>
Tolerations:     node.alpha.kubernetes.io/notReady:NoExecute for 300s
                 node.alpha.kubernetes.io/unreachable:NoExecute for 300s
Events:          <none>

grabbing the Name and the Namespace, and then using kubectl cp as per the following example: -

kubectl cp default/mqtraader-ibm-mqadvanced-0:/opt/mqm/java/lib/jca/wmq.jmsra.rar ./wmq.jmsra.rar

tar: Removing leading `/' from member names

However, notice one nuance - it's necessary to specify the destination file name as well as the destination path.

Otherwise, if you do this: -

kubectl cp default/mqtraader-ibm-mqadvanced-0:/opt/mqm/java/lib/jca/wmq.jmsra.rar .

you get this: -

tar: Removing leading `/' from member names
error: open .: is a directory


which took me a while to work around.

:-)

Tuesday, 21 November 2017

IBM Java and Health Centrer - There's More

Following an earlier post: -


I've been guiding a colleague in the use of HC, outside of WebSphere Application Server (WAS).

This time I wanted to show how HC could be used to monitor a Plain Ole Java Object (POJO), specifically a Java class.

Here's one I prepared earlier: -

HelloWorld.java

public class HelloWorld
{
public static void main(String[] args)
{
while (true)
{
System.out.println("Hello, World");
}
}
}

WARNING - this will run forever, in an infinite loop, but it's good for my testing purposes.

Having setup my shell to reflect the IBM Java 8 JRE, thanks to the WAS setupCmdLine.sh script: -

source /opt/ibm/WebSphereProfiles/Dmgr01/bin/setupCmdLine.sh 

I compiled the class: -

javac HelloWorld.java 

and executed it: -

java HelloWorld

to prove that it works.

I then added HC into the mix: -

java -Xhealthcenter:transport=jrmp HelloWorld

Note that, as before, I've added :transport=jrmp into the mix, as I'm using Eclipse on macOS with Oracle's Java 8 JRE on the client-side, even though the server-side is using the IBM Java8 JRE.

I was then able to hook up Eclipse, as per the previous blog post.

One other useful tip; if I start the Java class thus: -

java -Xhealthcenter:transport=jrmp HelloWorld >> /tmp/foobar

the actual "Hello World!" message gets appended to /tmp/foobar but I see: -


in the console, allowing me to validate that HC is running and listening on port 1972.

I also validated this from another terminal: -


where 49134 is the Process ID of the running JRE: -


and then probed it: -


and: -


Job done !

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 :-)


Tuesday, 14 November 2017

Telnet, my Telnet - Or macOS High Sierra, what have you done ?

This harks back to a VERY old post: -

which was penned back in 2010.

Since I've upgraded to macOS High Sierra, I've lost the FTP and Telnet clients.

Ordinarily that wouldn't be a problem but ….

Telnet is often useful for testing ports e.g. telnet localhost 9443.

Thankfully, we have a solution …. Netcat.


nc -vnzu 127.0.0.1 9080
found 0 associations
found 1 connections:
     1: flags=82<CONNECTED,PREFERRED>
outif (null)
src 127.0.0.1 port 59595
dst 127.0.0.1 port 9080
rank info not available

Connection to 127.0.0.1 port 9080 [udp/*] succeeded!

nc -vnzu 127.0.0.1 9443
found 0 associations
found 1 connections:
     1: flags=82<CONNECTED,PREFERRED>
outif (null)
src 127.0.0.1 port 54459
dst 127.0.0.1 port 9443
rank info not available

Connection to 127.0.0.1 port 9443 [udp/*] succeeded!

etc.

So it's a bit more fiddly !

So I hacked a solution !

alias 

alias hist='history | cut -c 8-'
alias telnet='nc -vnzu'


So now I can run: -

telnet 127.0.0.1 8443
found 0 associations
found 1 connections:
     1: flags=82<CONNECTED,PREFERRED>
outif (null)
src 127.0.0.1 port 52157
dst 127.0.0.1 port 8443
rank info not available

Connection to 127.0.0.1 port 8443 [udp/*] succeeded!

Bazinga!

Vagrant and VMware - all the Vs together - or not

Further to my last: -


I'm now looking at the options to use VMware Workstation ( this is on Linux, rather than my default home of macOS ) instead of VirtualBox.

Following this: -


I've installed the appropriate plugin: -

vagrant plugin install vagrant-vmware-workstation

Installing the 'vagrant-vmware-workstation' plugin. This can take a few minutes...
Fetching: vagrant-share-1.1.9.gem (100%)
Fetching: vagrant-vmware-workstation-5.0.3.gem (100%)
Building native extensions.  This could take a while...

Vagrant is installing the VMware plugin which requires
root access. You may be prompted for your password to
complete setup.

[sudo] password for hayd: 
Installed the plugin 'vagrant-vmware-workstation (5.0.3)'!


and validated the plugin: -

vagrant plugin list

vagrant-share (1.1.9, system)
vagrant-vmware-workstation (5.0.3)


I then updated my Vagrantfile to reflect the new choice of provider : -

vi Vagrantfile

inserting: -

...
config.vm.provider "vmware-workstation"

Finally, I tried (!) to bring my VM up: -

vagrant up

A valid license is required to run the Vagrant VMware
provider. Please visit http://www.vagrantup.com to purchase
a license. Once you purchase a license, you can install it
using `vagrant plugin license`.
Vagrant failed to initialize at a very early stage:

The plugins failed to load properly. The error message given is
shown below.

exit


Foiled again!

Then I read the Vagrant website more thoroughly



So I need to buy a license for the VMware Plugin from Vagrant ( aka Hashicorp ) at $80


Ah, well, back to VirtualBox for now …..

Monday, 13 November 2017

IBM Cloud Private - Tinkering with Vagrant

So I've been on a slow boat to IBM Cloud Private, over the past few weeks, and am continuing to self-enable in my "spare" time ( my formal enablement starts next week ).

Looking at this: -

IBM® Cloud Private architecture


it was clear that I really needed a few boxes onto which to actually install ICP.

Whilst it is possible to run everything on one box ( as per this IBM Cloud Private - My first foray ), I thought that I really should do things properly.

So, starting with Beast, which has 8 CPU cores, 32 GB RAM and a shed-load of disk, I decided to use Vagrant and Virtual Box to build out a few VMs, onto which I can then install/provision ICP.

PS As per the previous post, I'd already installed the right versions of Vagrant and Virtual Box

This is how I started: -

Create a directory into which I'm going to put my Vagrant configuration etc.

mkdir ~/foobar
cd ~/foobar

Create a default Vagrant configuration file - Vagrantfile

vagrant init

Amended the Vagrantfile to reflect my chosen Ubuntu image

Note - rather than the default of base - which isn't ever going to work :-)

sed -i'' 's/base/ubuntu\/trusty64/g' Vagrantfile

Instantiate the VM

vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
    default: URL: https://vagrantcloud.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v20171106.0.0) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20171106.0.0/providers/virtualbox.box
==> default: Successfully added box 'ubuntu/trusty64' (v20171106.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Setting the name of the VM: foobar_default_1510584547514_91304
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 4.3.36
    default: VirtualBox Version: 5.1
==> default: Mounting shared folders...
    default: /vagrant => /home/hayd/foobar

And off we go, ready to play

I did a brief test: -

ssh vagrant@127.0.0.1 -p 2222

to ensure that the VM was OK, but that's as far as I've got yet.

I need to assign some real IP addresses next time around, and then go for multiple VMs, perhaps bringing some automation to bear.

We shall see …..

One thing to note - as per the above, Vagrant kindly generated a public/private key pair for me, with the private key being located here: -

-rw------- 1 hayd hayd 1675 Nov 13 14:49 /home/hayd/foobar/.vagrant/machines/default/virtualbox/private_key

Therefore, I can access my new VM without a password: -


ssh -i /home/hayd/foobar/.vagrant/machines/default/virtualbox/private_key vagrant@127.0.0.1 -p 2222
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-135-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Tue Nov 14 09:52:05 UTC 2017

  System load:  0.13              Processes:           76
  Usage of /:   3.6% of 39.34GB   Users logged in:     0
  Memory usage: 24%               IP address for eth0: 10.0.2.15
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.

New release '16.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


Last login: Tue Nov 14 09:52:05 2017 from 10.0.2.2

which is nice.

Also, for the record, I can see the VM using VirtualBox's own tools e.g.

vboxmanage list vms
"foobar_default_1510584547514_91304" {92e7e750-6c83-4b64-b8d2-2cf66df2f2c7}

vboxmanage list vms --long
Name:            foobar_default_1510584547514_91304
Groups:          /
Guest OS:        Ubuntu (64-bit)
UUID:            92e7e750-6c83-4b64-b8d2-2cf66df2f2c7
Config file:     /home/hayd/VirtualBox VMs/foobar_default_1510584547514_91304/foobar_default_1510584547514_91304.vbox
Snapshot folder: /home/hayd/VirtualBox VMs/foobar_default_1510584547514_91304/Snapshots
Log folder:      /home/hayd/VirtualBox VMs/foobar_default_1510584547514_91304/Logs
Hardware UUID:   92e7e750-6c83-4b64-b8d2-2cf66df2f2c7
Memory size:     512MB
Page Fusion:     off
VRAM size:       12MB

etc.