Friday, 11 January 2013

IBM WebSphere Message Broker 8.0.1 - Getting started

This is my first foray with WebSphere Message Broker (WMB) 8.0.1, and a "Back to the Future" moment for WebSphere MQ (WMQ), with which I have not dabbled for 5-6 years.

This will be part of a Business Activity Monitoring (BAM) solution using IBM Business Monitor 8.0.1, 

I'm installing onto a VMware image running Red Hat Enterprise Linux 6.3 ( x86-64 ).

This is what I've downloaded from the IBM Software Catalog: -

-rw-r--r--@  1 hayd  staff   606945854 11 Jan 14:02 WMB_TOOLKIT_V8.0_LINUX_X86_1.gz
-rw-r--r--@  1 hayd  staff   633016440 11 Jan 14:17 WMB_TOOLKIT_V8.0_LINUX_X86_2.gz
-rw-r--r--@  1 hayd  staff   401541170 11 Jan 13:35 WMB_TOOLKIT_V8.0_LINUX_X86_3.gz
-rw-r--r--@  1 hayd  staff   665207457 11 Jan 14:33 WMB_V8.0_LINUX_X86-64.gz
-rw-r--r--@  1 hayd  staff   451379310  1 Nov 15:39 WS_MQ_FOR_LNX_ON_X86_64_V7.5_EIMG.tar.gz

Where possible, I'm going to do everything as non-root, using the wasadmin user, as this system is also going to host IBM Business Monitor 8.0.1 on WebSphere Application Server 8.0.0.5.

To start with, I installed WebSphere MQ 7.5 on the same RHEL VM. Ironically, this requires root as it installs a series of RPMs.

Initially,  I took input from this document: -


and downloaded mqconfig.

Having uploaded it to my server: -

-rw-r--r-- 1 wasadmin mqm 45855 Jan 11 19:47 mqconfig

and set the permissions: -

chmod +x ~/mqconfig

-rwxr-xr-x 1 wasadmin mqm 45855 Jan 11 19:47 mqconfig

and executed it: -

./mqconfig -v 7.5

mqconfig: V3.6 analyzing Red Hat Enterprise Linux Server release 6.3
          (Santiago) settings for WebSphere MQ V7.5

System V Semaphores
  semmsl     (sem:1)  250 semaphores                     IBM>=500          FAIL
  semmns     (sem:2)  5 of 256000 semaphores     (0%)    IBM>=256000       PASS
  semopm     (sem:3)  32 operations                      IBM>=250          FAIL
  semmni     (sem:4)  3 of 2048 sets             (0%)    IBM>=1024         PASS

System V Shared Memory
  shmmax              68719476736 bytes                  IBM>=268435456    PASS
  shmmni              1 of 4096 sets             (0%)    IBM>=4096         PASS
  shmall              107093 of 4294967296 pages (0%)    IBM>=2097152      PASS

System Settings
  file-max            5408 of 792955 files       (0%)    IBM>=524288       PASS
  tcp_keepalive_time  7200 seconds                       IBM<=300          FAIL

Current User Limits (wasadmin)
  nofile       (-Hn)  20000 files                        IBM>=10240        PASS
  nofile       (-Sn)  20000 files                        IBM>=10240        PASS
  nproc        (-Hu)  12 of 62767 processes      (0%)    IBM>=4096         PASS
  nproc        (-Su)  12 of 1024 processes       (1%)    IBM>=4096         FAIL

I'll fix the failing issues later, and update this post.

In the meantime, I installed MQ ( as root ): -

mkdir /tmp/MQ
cd /tmp/MQ
tar xvzf ~/WS_MQ_FOR_LNX_ON_X86_64_V7.5_EIMG.tar.gz 
./mqlicense.sh -accept

Licensed Materials - Property of IBM 
                 
 5724-H72 

 (C) Copyright IBM Corporation 1994, 2012 All rights reserved.

US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.

Agreement accepted:  Proceed with install.


rpm -ivh MQSeries*.rpm

Preparing...                ########################################### [100%]
   1:MQSeriesRuntime        ########################################### [  3%]
   2:MQSeriesJRE            ########################################### [  6%]
   3:MQSeriesJava           ########################################### [ 10%]
   4:MQSeriesFTBase         ########################################### [ 13%]
   5:MQSeriesServer         ########################################### [ 16%]
   6:MQSeriesFTAgent        ########################################### [ 19%]
   7:MQSeriesFTService      ########################################### [ 23%]
   8:MQSeriesAMS            ########################################### [ 26%]
   9:MQSeriesFTLogger       ########################################### [ 29%]
  10:MQSeriesXRService      ########################################### [ 32%]
  11:MQSeriesFTTools        ########################################### [ 35%]
  12:MQSeriesExplorer       ########################################### [ 39%]
  13:MQSeriesGSKit          ########################################### [ 42%]
  14:MQSeriesClient         ########################################### [ 45%]
  15:MQSeriesMan            ########################################### [ 48%]
  16:MQSeriesMsg_cs         ########################################### [ 52%]
  17:MQSeriesMsg_de         ########################################### [ 55%]
  18:MQSeriesMsg_es         ########################################### [ 58%]
  19:MQSeriesMsg_fr         ########################################### [ 61%]
  20:MQSeriesMsg_hu         ########################################### [ 65%]
  21:MQSeriesMsg_it         ########################################### [ 68%]
  22:MQSeriesMsg_ja         ########################################### [ 71%]
  23:MQSeriesMsg_ko         ########################################### [ 74%]
  24:MQSeriesMsg_pl         ########################################### [ 77%]
  25:MQSeriesMsg_pt         ########################################### [ 81%]
  26:MQSeriesMsg_ru         ########################################### [ 84%]
  27:MQSeriesMsg_Zh_CN      ########################################### [ 87%]
  28:MQSeriesMsg_Zh_TW      ########################################### [ 90%]
  29:MQSeriesSamples        ########################################### [ 94%]
  30:MQSeriesSDK            ########################################### [ 97%]
  31:MQSeriesXRClients      ########################################### [100%]


/opt/mqm/bin/setmqinst -i -p /opt/mqm/

118 of 118 tasks have been completed successfuly.
'Installation1' (/opt/mqm) set as the Primary Installation.


and tested MQ ( as wasadmin ): -

$ crtmqm DaveHay101

WebSphere MQ queue manager created.
Directory '/var/mqm/qmgrs/DaveHay101' created.
The queue manager is associated with installation 'Installation1'.
Creating or replacing default objects for queue manager 'DaveHay101'.
Default objects statistics : 74 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.


$ strmqm DaveHay101

WebSphere MQ queue manager 'DaveHay101' starting.
The queue manager is associated with installation 'Installation1'.
5 log records accessed on queue manager 'DaveHay101' during the log replay phase.
Log replay for queue manager 'DaveHay101' complete.
Transaction manager state recovered for queue manager 'DaveHay101'.
WebSphere MQ queue manager 'DaveHay101' started using V7.5.0.0.

endmqm DaveHay101

Quiesce request accepted. The queue manager will stop when all outstanding work
is complete.


For the record, I also made reference to: -


Having installed and tested WMQ, I then proceeded to install WMB.

Before I start the installation, however, there are a few pre-requisites, as outlined here: -


As root

groupadd mqbrkrs
$ usermod -g mqbrkrs wasadmin

$ groupadd mqm
$ useradd -g mqm mqm
$ usermod -g mqm wasadmin

mkdir /var/mqsi
touch /var/mqsi/install.properties
chmod -R 777 /var/mqsi

mkdir /opt/ibm/mqsi
$ mkdir /opt/ibm/mqsi/8.0.0.1
chmod -R a+wr /opt/ibm/mqsi/8.0.0.1/
$ chgrp -R wasadmins /opt/ibm/mqsi/8.0.0.1/

As wasadmin

$ cd /tmp
mkdir WMB
$ cd WMB
$ tar xvzf ../WMB_V8.0_LINUX_X86-64.gz 

$ cd /tmp/WMB/messagebroker_ia_runtime1
./setuplinuxx64.bin 

Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer…
...
The installer is now ready to install IBM WebSphere Message Broker onto your 
system at the following location:

   /opt/ibm/mqsi/8.0.0.1

PRESS <ENTER> TO INSTALL: 

===============================================================================
Installing...
-------------

 [==================|==================|==================|==================]
 [------------------|------------------|------------------|------------------]

===============================================================================
Installation Complete
---------------------

The installer has successfully installed IBM WebSphere Message Broker Version 
8.0.0.1 to:

/opt/ibm/mqsi/8.0.0.1

After the installer has ended, the log files will be written to the following 
locations:
[User]  /opt/ibm/mqsi/8.0.0.1/IBM_WebSphere_Message_Broker_InstallLog.log
[Debug] /var/mqsi/WMB_8001_installer_debug.log 

PRESS <ENTER> TO EXIT THE INSTALLER: 

Having installed WMQ and WMB, I then tested Broker: -

$ /opt/ibm/mqsi/8.0.0.1/bin/mqsicreatebroker DaveHay -q DaveHay101

AMQ8110: WebSphere MQ queue manager already exists.
WebSphere MQ queue manager 'DaveHay101' starting.
The queue manager is associated with installation 'Installation1'.
5 log records accessed on queue manager 'DaveHay101' during the log replay phase.
Log replay for queue manager 'DaveHay101' complete.
Transaction manager state recovered for queue manager 'DaveHay101'.
WebSphere MQ queue manager 'DaveHay101' started using V7.5.0.0.
BIP8081 An exception was caught while processing the response message for the command, 'Unable to format an ImbException message for output, ImbException message number is BIP8000'.

The exception caught me by surprise - a quick Google search found this: -

<snip>
On Linux and UNIX systems, the user ID that runs this command must be a member of the group mqbrkrs. If your user ID is not a member of mqbrkrs, the command fails with the following error message:
mqsideploy -i localhost -p 1414 -q qm2 -b brk2

BIP8081 An exception was caught while processing the command,
'Unable to format an ImbException message for output, ImbException message 
number is BIP2164'.
</snip>


I thought I'd already added wasadmin to the mqbrokers group, but I did it again ( as root ): -

usermod -g mqbrkrs wasadmin

and then retried the previous command ( as wasadmin ): -

$ opt/ibm/mqsi/8.0.0.1/bin/mqsideletebroker DaveHay

BIP8071I: Successful command completion. 

$ /opt/ibm/mqsi/8.0.0.1/bin/mqsicreatebroker DaveHay -q DaveHay101

AMQ8110: WebSphere MQ queue manager already exists.
BIP8071I: Successful command completion. 


$ /opt/ibm/mqsi/8.0.0.1/bin/mqsistart DaveHay

BIP8096I: Successful command initiation, check the system log to ensure that the component started without problem and that it continues to run without problem. 

$ /opt/ibm/mqsi/8.0.0.1/bin/mqsilist 

BIP1284I: Broker 'DaveHay' on queue manager 'DaveHay101' is running. 
BIP8071I: Successful command completion.


Sorted, I now have WebSphere MQ and WebSphere Message Broker installed and running.

Now to install the WebSphere Message Broker Toolkit and create my first flow  ……

No comments: