Amol’s Weblog

Things, the way I see them…

Archive for November, 2008

Configuring Websphere MQ

Posted by Amol Chaudhari on November 9, 2008

Ok.. I am back again.. this time posting something technical..

I had a very hard time configuring the Wesphere MQ on our server (Ubuntu) and my laptop (WinXP) as well. Though, installing MQ is not a rocket science, somehow it took me several hours to make the basic configuration work. May be i am very dumb and this post is for people like me… :)

After being successful, I had decided to create a simple document which will explain the steps involved in the basic configuration of MQ. And this post is the result of that….

Installing WebSphere MQ on Windows XP:

1. Launch the Websphere MQ Server installation launchpad.

2. You should see the following welcome screen.

clip_image002

3. Click on the Software Requirements option in the left menu and check if you have all the required softwares installed.

clip_image004

4. If you want to configure Websphere MQ through UI, installing Websphere Eclipse Platform version 3.0.1 is necessary. You can install it from the <Setup>\Prereqs\IES directory or from the launchpad for the MQ Server by clicking on the CD-ROM option.

5. Choose all the default options and install the Websphere Eclipse Platform.

6. Then proceed to install the Websphere MQ Server by clicking on the Websphere MQ Installation option in the left menu. Select the language and click on the Launch Websphere MQ Installer button.

clip_image006

7. Choose all the default options and complete the installation.

Note: if you get the error message saying Unable to launch application gsk7win.exe, ignore it.

Installing Websphere MQ on Linux (Ubuntu)

This document outlines the basic steps necessary for installing and configuring Websphere MQ. In case advanced configuration is need to be done, please refer to the Websphere MQ documentation.

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqtac.doc/wq11280_.htm

1. Create the directory /opt/mqm if not present already.

2. Create the directory /var/mqm if not present already.

3. Ensure that the group and user for mqm are present. To check this login as root and check the following files:

a. /etc/passwd – contains user information. If the user “mqm” is not present add the following line to the file:

mqm:x:1001:1001::/var/mqm:/bin/bash

b. /etc/group – contains group information. If the group “mqm” is not present add the following line to the file:

mqm:x:1001:somedescription

4. Copy the installation files to /home/mq_install/ directory and navigate to that directory.

5. To install the Websphere MQ you first need to accept the license agreement. Run the following command to accept the license:

./mqlicense.sh -accept

Enter the number corresponding to the language and press enter. Enter 1 and press enter to accept the license agreement.

6. Install the necessary Websphere MQ packages with the following command:

rpm -ivh IBMJava2-142-ia32-SDK-1.4.2-1.0.i386.rpm MQSeriesRuntime-6.0.1-0.x86_64.rpm MQSeriesServer-6.0.1-0.x86_64.rpm MQSeriesJava-6.0.1-0.x86_64.rpm –nodeps

clip_image002[4]

Configuring Websphere MQ on Windows and Linux:

The configuration steps are almost the same for Windows and Linus systems.

1. Windows: Navigate to the Websphere MQ bin directory on the console.

Linux: Login as user “mqm”

2. Create the Queue Manager by using the following command:

crtmqm <Queue Manager Name>

clip_image004[4]

3. Start the Queue Manager with the following command:

strmqm <Queue Manager Name>

clip_image006[4]

4. To stop the Queue Manger you can use the following command:

endmqm <Queue Manager Name>

5. To delete the Queue Manager you can use the following command:

dltmqm <Queue Manager Name>

6. Now, you need to create the channels and queues. For that start the MQ scripting console by entering the following command at the command prompt:

runmqsc <Queue Manager Name>

clip_image008

7. Now create the channel using the following command:

DEFINE CHANNEL (CHANCLI1) CHLTYPE(SVRCONN) TRPTYPE(TCP) DESCR(‘ ‘) HBINT(300) MAXMSGL(4194304) RCVDATA(‘ ‘) RCVEXIT(‘ ‘) SCYDATA(‘ ‘) SCYEXIT(‘ ‘) SENDDATA(‘ ‘) SENDEXIT(‘ ‘) REPLACE

For Linux OS just the user name needs to be added to the above command, as follows:

DEFINE CHANNEL (CHANCLI1) CHLTYPE(SVRCONN) TRPTYPE(TCP) DESCR(‘ ‘) HBINT(300) MAXMSGL( 4194304) MCAUSER(‘mqm’) RCVDATA(‘ ‘) RCVEXIT(‘ ‘) SCYDATA(‘ ‘) SCYEXIT(‘ ‘) SENDDATA(‘ ‘) SENDEXIT(‘ ‘) REPLACE

clip_image010

8. Create the local queue using the following command:

DEFINE QLOCAL (INPTQ) REPLACE

clip_image012

You can also define the Tranmission Queue and Remote Queue using the following commands if needed.

DEFINE QLOCAL (TRANSQ) DESCR(‘Transmission Queue’) USAGE(XMITQ) TRIGGER TRIGTYPE(FIRST) TRIGDPTH(1) TRIGDATA(‘QM’) INITQ(‘SYSTEM.CHANNEL.INITQ’) REPLACE

DEFINE QREMOTE (OUTPTQ) XMITQ(‘TRANSQ’) RNAME(‘WMQ2InputQ’) RQMNAME(‘WMQ2QM’) REPLACE

9. Exit the MQ Scripting console using the following command:

end

10. Now start the MQ Listener using the following command:

runmqlsr -m QM -p 1414 -t TCP &

clip_image014

Note: Windows uses the default user or may be no user at all. When configuring your IMS component to use MQInputAdapter or MQOutputAdapter, you do not have to specify any username and password. Just leave them blank. In case you face any issues, ensure that you have not specified the username while creating your channel or may be the queue.

To be very frank, I almost faint when i need to work on Linux. I do not have any idea of how things work on Linux. So to create this document, i had to uninstall the already installed MQ server on our server and as i do not have any idea of Linux, have to google a bit to understand how one can uninstall the stuff. So i noted down the uninstallation steps as well….

Uninstalling Websphere MQ on Linux system:

  1. Before starting to uninstall, end all WebSphere MQ activity.
    • Log in as root.
    • Use the dspmq command to display the state of all the queue managers on the system.
    • Use the endmqm command to stop all running queue managers.
    • Stop any listeners associated with the queue managers, using the command: endmqlsr -m QMgrName
    • To check that you have stopped all of the necessary WebSphere MQ processes, type: ps -ef | grep mq
    • Check that there are no processes listed that are running command lines beginning amq or runmq. Ignore any that start with amqi.
  2. Before you uninstall WebSphere MQ for Linux you must find out the names of the packages (components) currently installed on your system. To list all the packages with their version information, enter the following:
    1. rpm -q -a | grep MQSeries
    2. rpm -q -a | grep gsk
  3. If you have applied maintenance to the install, remove these maintenance packages before removing the base install.
  4. Some of the installed packages are dependent on others. The rpm command will not remove a package if others are dependent on it. For this reason you must uninstall the packages in such an order that each one you uninstall has no dependencies from other packages. To list all of the packages on which a named package (for example MQSeriesServer) depends, enter the following:
    1. rpm -q –requires MQSeriesServer (modify the names as per the installed versions)
  5. Alternatively, remove all the components at the same time by appending all the package names to the command arguments. For example, to remove the runtime, Server and SDK components, enter the following:
    1. rpm -ev MQSeriesRuntime MQSeriesServer MQSeriesSDK (modify the names as per the installed versions)
  6. After uninstalling, you might want to delete the contents of /var/mqm, which is not removed by the uninstallation. Only do this if you do not need your queue manager data. For example, do not delete the content if you plan to migrate to a later version of WebSphere MQ.
  7. To delete the contents along with the directory run the following command:
    1. rm -rf /var/mqm
  8. You have now uninstalled WebSphere MQ.

Posted in Other Technical Stuff | 1 Comment »

A romantic poem

Posted by Amol Chaudhari on November 9, 2008

Few days back i have received this poem in one of the forwards.. posting it here as i liked it a lot..

Your lips, your eyes, your soul
Are like a work of art,
The most creative thing of all
Is your beautiful heart.

If you were a painting,
No colours could express
The beauty deep inside you,
A rainbow, nothing less.

If you were a sculpture
The clay could hardly make
Your figure of an angel
Without one mistake.

If you were a euphony
No choir could really sing
All the beautiful music
Your eyes could possibly bring.

So here I am, an artist,
With inspiration beyond belief
But to capture such rare beauty,
I’d have to be a thief………………..

Posted in Poems | 1 Comment »

Importance of focus..

Posted by Amol Chaudhari on November 9, 2008

A few days back, I was chatting with my friends about the problems they are facing in their professional life. I realized that the problems are moreover the same and while thinking about the root causes I stumbled upon the much coveted word “Focus”. From my perspective, lack of focus is one of the major causes for being unsuccessful in achieving your goals.

The irony is, focus is one of the most fundamental things that we have learnt in our childhood. The experiment of the magnifying glass and the piece of paper came afresh in my mind. (I guess, almost everyone is familiar with this experiment) And more often than not, we forget this fundamental thing.

In the truest sense, focus means concentrating some kind of energy on a particular thing, like the paper in the magnifying glass example. So to achieve your goals, you have to start with one and focus all your energy on it unless it is achieved.  I have realized that, many of us either do not focus on anything (no clear goals) or tend to focus on so many things. We usually see others doing some stuff, which they are great at and mastered that art over time. We wish to master that thing and start our efforts. But, then we see another guy doing something else and he is simply fabulos as he had also mastered the art over the time. So we again start learning that thing as well. The end result… (well you can guess now) :) This quote from anonymous says it all..

“If you chase two rabbits, both will escape.”

I am not saying that one should not learn other things or should not be open for other stuff. The point here is to focus on one thing at a time and having once achieved that moving on to the next.

Having said this, other things are equally important as well. Lets consider, if someone tries the magnifying glass experiment in moon light or if the piece of paper is replaced by something thicker. Can you imagine the outcome? Following Anthony Robbins quote helps a bit in that..

“It’s not what’s happening to you now or what has happened in your past that determines who you become. Rather, it’s your decisions about what to focus on, what things mean to you, and what you’re going to do about them that will determine your ultimate destiny.”

I usually advise my friends to change their perspective and start afresh. But our mind does not allow us to. The memories of past clog our mind so much that most of us simply prefer maintaining the status-quo. Therefore it is very important to understand that its better to be late than never. And amongst those who dare to start afresh, again are clueless about what to focus on. They either focus on each and every trivial thing or focus on something that is very abstract or very difficult to achieve or something they do not have skills for. The point here i want to emphasize is, you should be well aware of your capabilities, the importance of the things you are focussing on and the (intensity of) desire you have for achieving that thing. So before starting out afresh, you must conduct a self awareness test which can help you understand what you really want, do you have the required skills and desire?

We also tend to expect the results very fast. So we sometimes again start loosing our focus. I think following few things might help one in staying focussed:

1. Share your goals with someone or at the least write them down on the paper and promise yourself to keep on looking at that paper time and again.

2. Choose a mentor and discuss the things you want to achieve. Decide to have frequent reviews with him to ensure that you are on the right track.

3. Keep in the company of passionate or highly motivated people. All these people are very focused on something they want to achieve.

4. And last but the most important thing is to put in your sincere efforts. Merely saying things or planning them does not do any wonders. One has to act on them.

Posted in Personal | Comments Off