Search This Blog

Saturday 12 April 2014

IBM Websphere MQ


websphere family.

MQ,MB,WAS,Portal

Features of MQ:

1) message delivery
2) Asynchronus messaging
3) Time dependent
4) Integrity
5) Support

Plat form independent

we can send messages from one os to other os.

A -------- B
solaris   windows
TCP/IP    SPNX

we can write our own code in any language.

JMS Supports Java language.

MQ is a s/w which is developed on java. but it supports all other languages.

it runs on eclipse palat form.

MQ version

dspmqver

ver 7.0  eclipse 3.3
ver 6.0
ver 5.2
ver 5.1
     .
     .
     .

server
client
client with XA enabled. used for commit and roll back transactions.

Default 4MB info including header.

max 100MB info
300MB segmentation is required.

QM is like our weblogic domain

it contains all queues.

runs on a listener. default 1414 unless you define a port.

Queue types:

Remote Queue
Local Queue
Transmission Queue
Dead letter Queue
Alias Queue
Cluster Queue


Local Queue -- where you store all the messages.
Remote Queue -- Contains All the parameters of definations
                It will not store any messages but it will send the messages to local Queue.

Sender recvr  -- names should be same

surconn -- We use surconn to send the message from the application to MQ.

client A -------> server B
         surconn


Below parameters are required to connect to the client
Qname
servername
port
protocol
   

#dspmqver ( it will display MQ version)

command not found ( MQ is not installed)

Before installation you Make sure that the below dir are exist


/opt/mqm ( all the binaries generated from installation)

/var/mqm ( all the configurations and log file )

Before installing MQ Execute licence file

cd /opt/mqm

./mqlicence.sh

check whether mqm user exist or not

more /etc/passwd | grep mqm

++++++++

#group mqm

mqm unixadms wheel

#pkgadd -d /home/melletit (used to install any s/w in solaris)

execute steps 1,2,3

select below options for MQ installation

1) MQ server

2) Man

3) sample programs

4) mq client

5) IBM jre

6) extended Architecture

enter : 1,3,5,6


cd /opt/mqm

ls -lrt

cd /var/mqm

ls -lrt

#crtmqm QM.DEMO  ( create Queue Manager)

#dspmq  ( It displays QM status )

#dltmq testqmgr ( delete QM)

#strmqm QM.DEMO ( Start Queue manager )

#dspmq ( displays QM status)

#cd /var/mqm

#more mqm.ini ( Contain all the configuration details of QM )

#cd /var/mqm/errors ( Contains installation error logs)

         .FDC ( Contains network issues )

$ffstsummary

The tool ffstsummary is also useful – it produces a summary of FFST reports in the current directory, sorted into time order. This can be a good place to start to see the errors reported in your errors directory.

For example:

[dalelane@dlane ~]$ cd /var/mqm/errors
[dalelane@dlane errors]$ ffstsummary
AMQ21433.0.FDC 2007/04/10 10:05:45 amqzdmaa 21433 2 XC338001 xehAsySignalHandler xecE_W_UNEXPECTED_ASYNC_SIGNAL OK
AMQ21429.0.FDC 2007/04/10 10:05:45 amqzmur0 21429 2 XC338001 xehAsySignalHandler xecE_W_UNEXPECTED_ASYNC_SIGNAL OK
AMQ21469.0.FDC 2007/04/10 10:05:45 runmqlsr 21469 2 XC338001 xehAsySignalHandler xecE_W_UNEXPECTED_ASYNC_SIGNAL OK
AMQ21422.0.FDC 2007/04/10 10:05:45 amqzfuma 21422 2 XC338001 xehAsySignalHandler xecE_W_UNEXPECTED_ASYNC_SIGNAL OK
AMQ21424.0.FDC 2007/04/10 10:05:45 amqzmuc0 21424 2 XC338001 xehAsySignalHandler xecE_W_UNEXPECTED_ASYNC_SIGNAL OK
AMQ21431.0.FDC 2007/04/10 10:05:45 amqrrmfa 21431 2 XC338001 xehAsySignalHandler xecE_W_UNEXPECTED_ASYNC_SIGNAL OK
AMQ21449.0.FDC 2007/04/10 10:05:45 amqzlaa0 21449 2 XC338001 xehAsySignalHandler xecE_W_UNEXPECTED_ASYNC_SIGNAL OK
AMQ21434.0.FDC 2007/04/10 10:05:45 amqzmgr0 21434 2 XC338001 xehAsySignalHandler xecE_W_UNEXPECTED_ASYNC_SIGNAL OK
AMQ21452.0.FDC 2007/04/10 10:05:45 runmqchi 21452 2 XC338001 xehAsySignalHandler xecE_W_UNEXPECTED_ASYNC_SIGNAL OK
AMQ21417.0.FDC 2007/04/10 10:05:45 amqzxma0 21417 4 XC338001 xehAsySignalHandler xecE_W_UNEXPECTED_ASYNC_SIGNAL OK
[dalelane@dlane errors]$


#cd /var/mqm/qmgrs/QM!DEMO

more qm.ini ( Contains all the details of particular QM - log, Services, service components)

logfile types

1) circular logs -- Info cant be retrived. It will overwrite previous logs.

2) linear logs  -- Will keep on appending the log file. (  use for production )

based on criticality of message we will decide the log types.

logpath = /var/mqm/log/QM!DEMO

cd  /var/mqm/log/QM!DEMO/errors -- give the errors to the particular QM.

cd /var/mqm/log/QM!DEMO/active -- we can check QM is active or not. Some times due to pending message QM goes into inactive state.

#runmqsc  ( used to run mq commands )

There are two ways to configure the objects in MQ

1) command line
2) console

#runmqsc QM.DEMO

AMQ8426: Valid MQSC commands are:

    ALTER
    CLEAR
    DEFINE
    DELETE
    DISPLAY
    END
    PING
    REFRESH
    RESET
    RESOLVE
    RESUME
    START
    STOP
    SUSPEND



Application     QM.DEMO QM.DEMO1 Application
RQ ( DEMO.REMOTE) LQ (LQ.DEMO1)
TX -- local Queue but usage -- transmission Recv chl
Sender channel



Create Remote Q:

define QREMOTE(DEMO.REMOTE)

alter qremote(DEMO.REMOTE) RNAME(LQ.DEMO1) RQNAME(QM.DEMO1) XMITQ(XQ.DEMO)


Create Local Q:

define qlocal(XQ.DEMO)

alter qlocal(XQ.DEMO) usage(XMITQ)

define channel(DEMO.DEMO1) chltype(SDR) trptype(TCP) connname('localhost(1415)') xmitq(XQ.DEMO)

end


creating 2nd QM


crtmqm QM.DEMO1

start QM.DEMO1

dspmq  ( check mq stauts)

ps -ef | grep QM.DEMO1

**it will not show any listener.

dis listener(*)

System.default.listener.TCP

alter listener (System.default.listener.TCP)  trptype(TCP) port(1415)

start listener(System.default.listener.TCP)

ps -ef | grep QM.DEMO1

*** 1415 listener


create local Queue:

define qlocal(LQ.DEMO1)

define channel(DEMO.DEMO1) chtype(RCVR) trptype(TCP)


dis channel(*) chltype(SDR)

start channel(DEMO.DEMO1)

dis chstatus(DEMO.DEMO1)

end

find . -name "amqsput"

$cd /opt/mqm/samp/bin

$./amqsput DEMO.REMOTE QM.DEMO

hi welcome to PavanBlog

$./amsget LQ.DEMO1 QM.DEMO1

hi welcome to PavanBlog



Trouble shooting & Interview questions:
***************************************

1) What is Remote Queue? and Remote Queue parameters

2) Reasons for message is going to retain state.

1) Not able to get the connection
2) Input parameter for remote queue might be wrong ( parameter)
3) Destination QM is not running
4) Sender and REcv channel names should be same ( might be wrong some time)
5) Message will be in local queue
6) Problem with message format



xmit Queue properties-> put : allowed
       get : allowed

Local Queue -> usage : Transmission becomes Transmission Queue.



Dead letter Queue (DLQ)
***********************

1.IF destination is not defined or unavailable then message without loss it will store in DLQ .
each queue manager (QM ) will have one DLQ .it is mandatory or suggested to have DLQ .

QM.DEMO   QM.DEMO1
|->DLQ1  
|->DLQ

RQ LQ
TX Receiver channel.
SC (sender channel)
               

Before sender channel started message seats with or stores in TX .
once connection established it will reached the receiver channel and look for destination queue .
if that moment it will not able to find the destination queue it will store the message in DLQ1(which is with  Qmgr )


mqm@ /home/mqm
dspmq

dis qmgr (dispaly all the queue manager properties)
define qlocal(DLQ)

alter qmgr DEADQ(DLQ)

dis qmgr

dspmq

runmqsc QM.DEMO1

define qlocal(DLQ)

alter qmgr DEADQ(DLQ)

dspmq

runmqsc QM.DEMO

dis qremote(*)
dis qlocal(DLQ)
display

dis queue(DEMO.REMOTE)


alter qremote(DEMO.REMOTE) RNAME(LQ.DEMO)

channel --> start manually .
amqsput DEMO.REMOTE QM.DEMO

cd /opt/mqm
cd sampl/bin/

./amqsput DEMO.REMOTE QM.DEMO

Hai Test msg

runmqsc QM.DEMO

dis queue(XQ.DEMO)

CURDEPTH: properties of the queue *  tell the pending message count .


./amqsbcg DEMO.REMOTE XQ.DEMO   (browse the message )


runmqsc QM.DEMO


dis channel(*)   chltype(sdr)


CHANNEL (DEMO.DEMO1)
Start CHANNEL (DEMO.DEMO1)


dis chstatus(DEMO.DEMO1)

rummqsc

./amqsbcg DLQ QM.DEMO1



cd /var/mqm/qmrs/QM\!DEMO1/errors/



deadletter handler  :program will helps in retriveing the message from dlq to destination queue.


if destination queue is  fulled then receiver channel drop the msg into DLQ .

input count : no .of threads connection to local queue to put the msg . (put )
output count : get


always check mq logs .


if message flow is not happening then check following points;

1. MQ logs.
2. destination properties
3. channel is active ...
4. application security issue ......(proxy)


end .....

Dead letter Queue (DLQ)
***********************

1.IF destination is not defined or unavailable then message without loss it will store in DLQ .
each queue manager (QM ) will have one DLQ .it is mandatory or suggested to have DLQ .

QM.DEMO   QM.DEMO1
|->DLQ1  
|->DLQ

RQ LQ
TX Receiver channel.
SC (sender channel)
               

Before sender channel started message seats with or stores in TX .
once connection established it will reached the receiver channel and look for destination queue .
if that moment it will not able to find the destination queue it will store the message in DLQ1(which is with  Qmgr )


mqm@ /home/mqm
dspmq

dis qmgr (dispaly all the queue manager properties)
define qlocal(DLQ)

alter qmgr DEADQ(DLQ)

dis qmgr

dspmq

runmqsc QM.DEMO1

define qlocal(DLQ)

alter qmgr DEADQ(DLQ)

dspmq

runmqsc QM.DEMO

dis qremote(*)
dis qlocal(DLQ)
display

dis queue(DEMO.REMOTE)


alter qremote(DEMO.REMOTE) RNAME(LQ.DEMO)

channel --> start manually .
amqsput DEMO.REMOTE QM.DEMO

cd /opt/mqm
cd sampl/bin/

./amqsput DEMO.REMOTE QM.DEMO

Hai Test msg

runmqsc QM.DEMO

dis queue(XQ.DEMO)

CURDEPTH: properties of the queue *  tell the pending message count .


./amqsbcg DEMO.REMOTE XQ.DEMO   (browse the message )


runmqsc QM.DEMO


dis channel(*)   chltype(sdr)


CHANNEL (DEMO.DEMO1)
Start CHANNEL (DEMO.DEMO1)


dis chstatus(DEMO.DEMO1)

rummqsc

./amqsbcg DLQ QM.DEMO1



cd /var/mqm/qmrs/QM\!DEMO1/errors/



deadletter handler  :program will helps in retriveing the message from dlq to destination queue.


if destination queue is  fulled then receiver channel drop the msg into DLQ .

input count : no .of threads connection to local queue to put the msg . (put )
output count : get


always check mq logs .


if message flow is not happening then check following points;

1. MQ logs.
2. destination properties
3. channel is active ...
4. application security issue ......(proxy)


end .....


what is OSB?

OSB is a shared domain and used for transformation and routing like Message Broker in Websphere.

OSB requires Weblogic.
MB  requires    MQ.

$runmqsc QM.DEMO

dis channel(*) chtype(snd)  ( it will display All channels)

Xmit Q->Trigger control : on
Trigger type    : first
                          full
 depth

depth   : 1

data    : ALSB.TO.EC -> channel
Init Q  : SYSTEM.CHANNEL.INIT Q

dis qlocal(XQ.DEMO)

alter qlocal(XQ.DEMO) TRIGDATA(DEMO.DEMO1) INITQ(SYSTEM.CHANNEL.INITQ)

SYSTEM.CHANNEL.INITQ : Is default for QM.


Putting some msg into remote Q:
_______________________________

cd /opt/mqm/samp/bin

./amqsput DEMO.REMOTE QM.DEMO

type some text here

runmqsc QM.DEMO  (run queue manager)

dis chstatus(DEMO.DEMO1)

./amqsget DLQ QM.DEMO1


** Triggering can start any process ( Ex: star channel)

Queue ->
-> Advanced
-> channel
-> new - sender channel
server channel

Cluster--Full repository -- All running object info
         Partial repository -- Only info of objects to which it communicating


server   --------->  client
        conn channel
(application)------> (MQ server)

Ex: OSB or TUX application -----> (MQ server)
Conn channel



server--conn channel
--> General
--> Extended ----> Max msg length = (should be more than 4MB)
  hearbeat       = 300
  max instances  = 999999999
  max instance per client = 999999999
  message compression     =
  Keep alive.Auto         =


MCA : Message Channel Agent ---> UserID : MQALSB
-->Exist-> Security exit name: BlockIP(Block Exit)
  user data : FN = /var/mqm/exist641/ALSB.txt

  ALSB.txt file : Contains user details . Those users can only alter the QM using server channel.

-->SSL -- Used for security purpose and some certificates have been installed.
          Cipher Text : /#A&sjfsjslf08j)+/jllljjj


./amgsbcg DLQ12 QM.DEMO1

Error: reason 2085

mqrc 2085 ( It will display error details )

endmqm QM.DEMO1 (stop QM)


IMP Error numbers:
-----------------

mqrc 2085

      2085  0x00000825  MQRC_UNKNOWN_OBJECT_NAME
 mqrc 2058

      2058  0x0000080a  MQRC_Q_MGR_NAME_ERROR
 mqrc 2059

      2059  0x0000080b  MQRC_Q_MGR_NOT_AVAILABLE
mqrc 2035

      2035  0x000007f3  MQRC_NOT_AUTHORIZED
mqrc 2033

      2033  0x000007f1  MQRC_NO_MSG_AVAILABLE
mqrc 2038

      2038  0x000007f6  MQRC_NOT_OPEN_FOR_INQUIRE
mqrc 2039

      2039  0x000007f7  MQRC_NOT_OPEN_FOR_OUTPUT
mqrc 2016

      2016  0x000007e0  MQRC_GET_INHIBITED




binding concept:

/bea/osb103/scripts/jmsadm.scp

binding files : ex: .bindings

binding file contails Queue info in osb

like connection factory, Jndi info , etc.



Saturday 22 March 2014

Weblogic Interview Questions


IBM Interview questions
================================
How to create weblogic domains using jython scripts and configuration wizard?
ssl certificate generation and installation?
how to generate selfsigned certificates and trusted certificates?
What is the difference b/w one way ssl and two way ssl certificates?
apache installation and integration with weblogic server?
where will you copy the modules into apache server?
What is auto deployement in weblogic?
How many types of deployment modes available in weblogic? What is the difference b/w staging and nostaging mode?
What is the difference between unicast and multicast messaging modes in cluster?
In unicast how does group leaders comunicate?
How do you achieve cluster session replication?
How to configure multipool in weblogic?
What is the deployment order? How to set the deployment order?
How to find out memory leaks?
How many types of garbage collection are there? What happens if major collection is not happening?
How do you enable garbage collection logs? Which command is used to generate garbage collection?
How to generate heap dump in weblogic? Explain the command?
Will the heap dump be generated automatically when we get an out of memory error? If yes, Which flag do you use to generate the heapdump automatically?
What is the difference between server hang and crash?
What is the difference b/w core dump and heap dump?
How to generate core dump?
How do you take thread dump in weblogic?
How to write a wlst script for deployment?
how to troubleshoot jdbc and jms issues?
Where the weblogic cache will be stored after the deployment?
How to configure foreign JMS servers?
What is jms bridge and why do we use it?
how to check list of available port numbers?
how to check running servers in linux?
What is the command to find out the operating system version?
How do you install patches in weblogic?
How to schedule the job in crontab? and what are the parametes do you use to set a job?
what is "at" command in unix?

**************************

                NTTDATA Interview questions
================================

1) Introduction to you self?
2)During deployment u can face memory issue how can u handle?
3)About garbage collection and its algorithems?
4)about session replication, types, configuration?
5)Entire about ssl, types, certificate genaration, an its configuration in admin console?
6) about Thread dump, how to take thread dump, how to analyze, how many types threads?
7)about heap dump?
8)about "Wily introscope " real time tool?
9) about shell scripting ?
10) top command?
11)about MQ, how many types of queues, trobleshooting of mq?
12)jms server, subdeployement, connection factory, trobleshooting of jms issues?
13)work manager, request classess, thread constrains, diff between thread constrains and Execute queue?

******************************
                Mindtree Interview questions
================================
Differences b/w different versions of weblogic server
Explain about your current environment
Difference b/w webserver and application server
Difference b/w developmode and production mode
jdk version for weblogic 11g
how to recover administrator password if boot.properties got currupted
stubs in cluster
http session replication
t3 protocal
msi mode in weblogic
apache installation
how to enable modules
virtual hosting in apache
what is the difference b/w jndi and jdbc
how to do connection pool shrink
what is the differenc b/w server crash and hang
how many log levels available
what is the difference b/w execute Queues and work managers
how to find out the memory leaks in the application
how to take thread dump and heap dump and explain the jmap command
how to find ip address?
how to find port numbers?
find command
top command
touch command
how to trouble shoot wlst python script issues
how to set deployment order
how dns resolve the client request
vmstat
swap
iostat

******************************
                TCS Interview questions
================================
1)what is persistent store?
2)difference b/w weblogic 8 & 10?
3)difference b/w Queue and Topic?
4)what is permSize?
5)how to increase the heap size?
6)what is subdeployement ? use of subdeployement?
7)how to deploy an application using wlst script?
8)type of deployement mode?
9)how to clear the weblogic cache?
10)how to check the memory & CPU usage?
11)how to check the disk usage?


******************************
                CSC Interview questions
================================
1) What is weblogic domain?
2) What are the basic requirements for cluster?
3) What are the benifits/advantages of clustering?
3) How does cluster work?
4) Explain cluster algorithms
5) What is the session replication? How does it work when the failover situation?
6) What is primary and secondary replication groups?
7) What is persistance store? How many types of persistance mechanisms are there?
8) HOw can we achive load balancing for cluster?
9) What is the diff b/w data source and multidata source?
10) What are the diff types of multidata source algorithms available? and explain?
11) HOw does apache know whether the weblogic server is failed state in cluster?
12) HOw to handle stuck thread issues in weblogic?
13) HOw to handle memory issue in weblogic?
14) Explain the steps for creating jms setup?
15) Why dont we target jms server to cluster? and why we target data source to cluster?
16) what is subdeployment in weblogic?
17) What is the diff b/w queue and topic?
18) what is the diff b/w queue and distributed queue?
19) How to configure external security LDAP?
20) HOw to configure siteminder ? What is SSO (single sign on )?

******************************
                TechMahendra Interview questions
================================
1.roles and responsibilities
2.how to ceate domain
3.jms configurations
4.what is connection factory
5.what is jms module
6.jvm out of memory issues
7.what is garbage collector
8.how to configure datasorce
9. work manager
10.wlst
11.ticketing tool
12.msi mode
******************************
                HCL Interview questions
================================
First Round ( Technical )
1) How do you create weblogic domain
2) What is the purpose of node manager
3) How do you create cluster? Pre-requisites for cluster creation?
4) What is the process for connecting to the data base from the application?
5) What is JNDI?
6) How to test the connection pool from console?
7) What should be running from the DB side to connect to the data base?
8) What is the differences b/w unicast and multi cast?
9) Do you have exp in performance tunning? How do you handle stuck thread issues?
10) What  are the different thread states?
11) Explain how to handle memory issue? What are the types of memory leaks?
12) How do you check all the running java processes in unix?
13) How do you check updated log file?
14) What is ulimit command in unix?
15) Steps for creating data source and connection pool from the console?
16) How to  trouble shoot the deployment issues?
17) Application deployed it in weblogic and weblogic is down, The requesting is comming from apache and apache is running.
      Will you be able to access the static content when weblogic is down?
13.deployment modes? stagemode, nostage, external stage
14.top command - complete analysis of top
15.df - kh
16.find ( how to find the files which are older then 5 days) use -mtime. search for the syntax in google
17.weblogic life cycle
18.log levels
19.weblogic domain structure
20.config file location
21.node manager - how to add the new domain into node manger by editing property files
22.solaris - commands
23.parameters of jvm
24.diff between java heap and perm? and JVM arguments
26.garbage collection algorithms
27.scenarios
28. How to handle stuck thread issues?


******************************
                NESS  Technologies Interview questions
================================
1) Introduce your-self with current Environment and Work Experience?
2)can you tel me recently faced issues?
3)MQ
          What is transmission queue?
           Remote Queue?
4) currently which version of weblogic using and what are the features ?
5) what is thread dump and how to analyze, you find blocked threads what can u do?
6)application running in weblogic suddenly it will slow what are the possible reasons?
7)what is heap dump, how can you take, and its syntax?
8)what is garbage collection?
9) what is hacking threads in weblogic?
10)how to install apache?
11)what is virtual hosting?
12) what is "keep alive" in ( apache)?
13)what is harizontal clustering, how it works?
14)ssl how will provide security for our application? how to genarate keys tel me everthing process ?
15)how to create datasource?
16)what is "multidatasource"?
17) database connection leak issues, in weblogic? if every thing is fine database side fine, network is fine what is the reason?
18)diff between XA-driver and Non-xA driver?
19)How to release connection from connectionpool?
20)If Jms issues occured, how to troble?
21)find command
22)Tcp, netstat  -anp(what is "a"), ps -ef, awk, cut, what is diff between awk and cut?
23)vi editor
      how to open 10 files at a time in vi editor
24) what is "nodemanager", nodemanager process, port numbrt of node manager?
25)telnet
26)pack, unpack?
27)scp
28)how to create softlink, hard link files in linux?
29)what is the process connecting to the database, if weblogic is not connecting to the database what could be the reason?
30)native momory issues?


******************************
                WIPRO  Technologies Interview questions
================================
DIFF B/w Jdk 1.5 and 1.6 ?
DIFF B/w apache 2.0 and 2.2 ?
DIFF B/w wls 8 and wls 9 ?
wls installation in gui mode ?
Data source and conection properties ?
how to create Data source ?
patch installation ?
deployment modes ? diff b/w stage and no stage mode ?
cpu utilizaton ?
war , ear , jar files ?
what deployment descriptor ?
what is thread?
Log levels ?
Domain creation ?
Deployments ?

******************************
                Wels Fergo Telephonic Interview Questions
================================
1.Tell me about yourself and roles and responsibilities in current Project?
2.How to install the servers and configure the domains? Do you use any tools or scripts?
3.Do you have any experience in writing scripts?
4.If there is any issue with script while running, then how do you debbug the script?
5.If i will give a generic jar to install 32-bit of weblogic server, How do you do that?
6.Is JMS server targetting to Cluster?
7.What is the use of having Subdeployments?
8.How can MQ get the message from Weblogic Server?
9.Can you tell the functionality of SSL? How does it work ?
10.What is a domain wise administration port? Do you have any idea?
11. What are the webservers you know? What version of apache you are using?
12.What is the weblogic version you are using?
13.How to display only files using ls command?
14.How can you debbug a shell script?
15.How to print the word hello from a test file?
16.How to remove empty lines from a file?
17.How to print the lines using sed command?