Notes
The purpose of this presentation is to discuss various troubleshooting techniques available in WebSphere Message Broker.
Contents
How does the broker work ? Which log files do I check ? Tracing message flows Debugging message flows Collecting message flow statistics Advanced troubleshooting MustGather Information Websites to bookmark !!!
Notes
The presentation starts with a brief introduction to WebSphere Message Broker. We will look at the various troubleshooting techniques available, which are not only helpful in problem determination, but also useful to check the health of the broker as well as verifying your flow logic and gather simple performance measurements. Finally there are a few must bookmark websites listed, that are a good source of information on WebSphere Message Broker.
Notes
This chart gives a quick introduction to all the components in WebSphere Message Broker and shows the connectivity and flow of information between these components. The Toolkit in WebSphere Message Broker or the Control Center in WMQI V2.1 is a single user interface provided to developers and adminstrators. Developers use this tool to build the message flows and messages as well as use the built in debugger for analysis and problem determination. Administrators use this tool for deploys, administration of broker domain. The Configuration Manager is an administrative component and manages a broker domain. A broker domain may consistent of one or more brokers. Configuration Manager communicates with the Toolkit and the broker in order to manages all administrative actions issued from the Toolkit. In WMB V6, the Configuration Manager does not require an external database. In WBI Brokers V5, the Configuration Manager has an administrative database to store administrative data, while in WMQI V2.1, the Configuration Manager has a configuration database and message repository, which holds the message flow and message definitions. Broker is the run-time component that runs the message flows and processes messages. The broker has one administrative process and one or more execution group processes. The administrative process manages all the execution groups defined in the broker. Each execution group process runs the actual message flows which process messages.
Notes
Windows event viewer application log events are logged with the following event source WMQI V2.1 WMQIv210 WBI Brokers V5 BIPv500 WMB V6 - WebSphere Broker v6000 Unix and z/OS, messages are reported in the form of BIPnnnn where nnnn is the diagnostic message number Diagnostic message can be looked up on the below website http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.bipmsgs.do c/amsgtop_.htm On Unix, syslog needs to be configured by adding the following command to /etc/syslog.conf user.info /var/adm/user.log The file /var/adm/user.log must exist, and syslog daemon must be restarted to pick up the above command.
Status messages
Toolkit Alerts view or Operations view in WMQI V2.1 Control Center Status of Broker, Execution Group, Message flows
10
11
Tracing
User Level Flow Trace
Traces the path of message in your flow Can be enabled from Toolkit or command line Must be formatted on the broker machine Time stamp can be used to find time taken in each node performance
12
Notes
Start trace command mqsichangetrace <Broker> -u -e <Execution Group> -f <Msg Flow> -l <level> -r -c <trace file size> Note, the default trace file size is 4 MB. Its recommended this value be increased to an appropriate value to avoid trace getting overwritten, as it is circular. Stop trace command mqsichangetrace <Broker> -u -e <Execution Group> -f <Msg Flow> -l none Format trace commands mqsireadlog <Broker> -u -e <Execution Group> -f o trace.xml Mqsiformatlog -l trace.xml -o trace.log
13
Tracing
Trace snippet
Timestamp Thread Id
2003-07-27 14:29:28.547000 3540 UserTrace BIP2632I: Message received and propagated to 'out' terminal of MQ input node 'HextoASCII.MQInput1'.
Flow name Node name
2003-07-27 14:29:28.636999 3540 Recoverable Exception BIP2549E: (16, 1) : Type mismatch assigning to variable; value ''test'' inconsistent with type 'BLOB'. The source expression produced a value of ''test'' but the target variable was declared with a type of 'BLOB'. Ensure that only values of the appropriate data type are assigned to declared variables.
14
Tracing
Trace snippet
2004-02-06 15:08:29.685880 17 UserTrace BIP4080I: Message propagated to try terminal from try-catch node 'INTERFACE.WMQI_AUDIT_SINGLEDB1.TryCatch1'. 2004-02-06 15:08:39.725772 17 UserTrace BIP4124I: Message propagated to 'out' terminal of compute node 'INTERFACE.WMQI_AUDIT_SINGLEDB1.insert_audit_db'.
15
Primitive node to trace content of message in the flow Add to the message flow and configure
${Root}, ${Body}, ${ExceptionList}, ${LocalEnvironment}
Writes the message tree out, at the point in the flow Snapshot of Properties, Headers, and the message tree Destination can be User Trace, File, Local Error Log Destination Local Error Log is limited to 1024 bytes on Unix
16
Notes
Sample Trace node output :
(0x01000000):Properties =( (0x03000000):MessageSet = P258VC4002001' (0x03000000):MessageType = IN VOICE' (0x03000000):MessageFormat = 'XML'. . . (0x01000000):MQMD =( = 'TESTIN' = TRUE
(0x03000000):SourceQueue (0x03000000):Transactional
(0x03000000):Encoding = 546 (0x03000000):CodedCharSetId = 1208 (0x03000000):Format . . (0x01000010):XML =( (0 x01000000):MESSAGE = ( (0 x02000000): = ELEMENT1' ) = 'MQSTR
17
Unit testing of the message flow by developer Validation of message flow logic Displays message tree at run-time Stop the flow at any point by adding a breakpoint Alter the message at breakpoint Track single message through a flow using breakpoints ESQL, Java, Mapping nodes can be debugged Debug perspective in Toolkit
18
19
20
Must be the same port configured on Agent Controller server Default port on Agent Controller can be changed in
<RACInstallRoot>/config/serviceconfig.xml
See notes for configuration
21
Notes
Agent Controller runs on the broker machine and facilitates debugging functionality by controlling the debugging communications between the Toolkit and the execution group. The port used by Agent Controller can be changed in the configuration file <AgentController InstallRoot>/config/serviceconfig.xml as follows: Search for element AgentControllerConfiguration, and change the value for the attribute port to the new port number. Note, Agent Controller must be restarted to pick up this change.
22
23
Notes
Agent Controller V6.0.1 allows communication between Toolkit and Agent Controller server through a firewall. To enable this, change the configuration file <AgentController InstallRoot>/config/serviceconfig.xml as follows: Search for element AgentControllerConfiguration, and change value for the attribute isDataMultiplexed from false to true value for the attribute filePort from 10005 to 0 Note, Agent Controller must be restarted to pick up this change. During installation of Agent Controller, you must select the hosts that are allowed for communicating with the server. You can select all hosts, or provide the names of hosts that are allowed. This can be changed at anytime as follows: In configuration file serviceconfig.xml, change element <Allow host="LOCAL"></Allow> to <Allow host="ALL"></Allow> Note, Agent Controller must be restarted to pick up this change.
25
Ensure the check box Debug Java Source Code is checked Add source java project in Source panel in Debug configuration
wizard
26
27
28
29
Open message flow to add breakpoints Add a breakpoint before ESQL, Java, Mapping nodes, subflow
to debug
Step into code to debug ESQL, Java code Breakpoints can be set in ESQL, Java code, subflow Step into to debug a subflow Process a message to start debugging
30
Flow performance can be measured No changes needed to request statistics collection Enabled using command mqsichangeflowstats Output available in user trace, XML publication message or SMF117 records on z/OS
31
Notes
Sample command to start collection of statistics for a specific message flow mqsichangeflowstats <Broker> -s -e <EGName> -f <Message flow> -c active -t basic -n advanced -o usertrace This command enables the broker to produce accounting and statistics information for the specified message flow. The information produced will contain basic threadData and advanced nodeData. The accounting and statistics information generated will be written to a user trace, hence will need to be formatted using commands as follows: mqsireadlog <Broker> -u -e <EGName> -f o trace.xml mqsiformatlog -i trace.xml -o trace.log The command to stop producing the above accounting and statistics information is as follows: mqsichangeflowstats <Broker> -s -e <EGName> -f <Message flow> -c inactive -t basic -n advanced -o usertrace A re-deploy of the message flow with automatically cancel accounting and statistics on that flow.
33
Advanced troubleshooting
Abend file
Shows the stack back trace leading to the failure WMB V6 abend file logs the message flow name that caused
the severe error
34
Notes
+-----------------------------------------------------------------------------+ | First Failure Symptom Report | ======================== | Proc start time :- Mon May 01 09:46:01 2006 | Product Details | Vendor | Product Name | Program ID | Version . . | Failure Location | ++++++++++++++++ | Time of Report :- Mon May 01 10:02:03 2006 | Message Flow :- INVOICEPROC_ITEMS | Thread ID :- 0x0000126C . . | | | | | :- IBM :- WebSphere Message Brokers :- 5724-J04 :- 6001 | | | | | | | |
35
Advanced troubleshooting
Service level tracing
36
MustGather Information
Information requested by IBM support
37
Supported Software
http://www-306.ibm.com/software/integration/websphere/mqplatforms/ supported.html
38
39
News Groups
news://news.software.ibm.com/ibm.software.websphere.mqintegrator/ http://www.mqseries.net/
40
41
42