Tuesday, August 11, 2015

Other

Enabling detiled logging in designer (console)?
Add below property to the designer.tra
java.property.javax.net.debug=ssl,plaintext,record,handshake

Troubleshooting

1. Adapter fails to start at deployment
Component
TIBCO Adapter for JD Edward 6.0.0
Issue Type
Adapter failing to start at run time
Error Desc
Adapter connection at design time is working well, but the failing start at run time (at deployment).
Error Details
Captured below error running the adapter from command line.
“Error occurred during initialization of VM Too small initial heap for new size specified”
Root Cause
Not enough java heap size
Resolution Steps
1. In the adjdexe.tra file set up below mentioned heap size values
• java.heap.size.max 1024M
• java.heap.size.min 128M
• java.thread.stacksize 128K
• java.heap.size.initial 2048M

2. In TIBCO admin provide below mentioned values
• java.heap.size.max 1024M
• java.thread.stacksize 512K
• java.heap.size.initial 1024M


2. MS-SQL Database Connection failure
Component
BW-DB
Issue Type
MS-SQL Database Connection failure
Error Desc
Not able to connect to MS-SQL Server through DB connection in Designer
Error Details
BW-JDBC-100034 "Configuration Test Failed. Exception [java.lang.UnsupportedOperationException] occurred.
java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.7 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0."
Root Cause
Sqljdbc.jar been loaded into designer which needs to replace with sqljdbc4.jar
Resolution Steps
1. Removed sqljdbc.jar file location from designer .tra and bwengine.tra
2. Add path to the sqljdbc4.jar file location to the designer .tra and bwengine.tra




3. Not able to add EMS server to the Admin domain
Component
EMS
Issue Type
Not able to add EMS server to the Admin
Error Desc
Test connection to the EMS server through Domain Utility failing
Error Details
Could not connect to the EMS server at "tcp://wbhome1073:7222"
The attempt returned the error.
java.lang.NoClassFoundError:com/tibco/tibjms/admin/TibjmsAdmin
Root Cause
1. With TRA 5.9.0 the EMS client libraries are no longer shipped, have to use traUpgradeManager following document.
Please refer the below document link.
<tibco-home>\tra\5.9\doc\pdf\tib_TRA_upgrade_5.9.0.pdf > Upgrade Steps > Upgrade Each Primary and Secondary Administration Server > Point 5.
2. The EMS_HOME variable needs to be set upto the version number in domainutility.tra
Resolution Steps
1.
(a)  C:\tibco\tra\5.9\bin>traUpgradeManager -path C:/tibco/tra/domain/<domain-name> -ems C:/tibco/ems/8.1
(b) C:\tibco\tra\5.9\bin>traUpgradeManager -path C:/tibco/administrator/domain/<domain-name> -ems C:/tibco/ems/8.1
2. Set EMS_HOME to c:/tibco/ems/8.1 in domainutility.tra


4. Connection to the EMS server from designer is failing.
Component
EMS-BW-Designer
Issue Type
Connection
Error Desc
Connection to the EMS server from designer is failing.
Error Details
when 'Not' using JNDI connection factory
Error: Cannot create connection factory in provider specific way
-------------------
when using JNDI connection factory
Error : Cannot instantiate class: com.tibco.tibjms.naming.TibjmsInitialContextFactory
Root Cause
Jms-2.0.jar was not loaded into desginer
Resolution Steps
Set path location of jms-2.0.jar, tibjms.jar, tibjmsadmin.jar in tibco Designer.
5. Validation Error
Component
TIBCO BW 5.12
Issue Type
Validation Error
Error Desc
Invalid reference though the its valid
Error Details
The following reference is no longer valid
Root Cause
Bug in BW 5.12(BW-16430 Relative path references failed to validate after upgrading to TIBCO)
Resolution Steps
Download this HotFix from the TIBCO Product Support ftp server,mft.tibco.com. You will need to provide your TSC (TIBCO Support Central) credentials. Once you have successfully logged into the server, go to/AvailableDownloads/BusinessWorks/5.12.0/hotfix-01


6. DB storage for Multi Engine Shared Variable
Component
TIBCO Designer 5.9
Issue Type
Not able to configure designer to use DB storage for Multi Engine Shared Variable
Error Desc
Not able to start up (getting struck at “Starting up” page)
Error Details

Root Cause
Need to configure “.cfg” file to create DB objects to store variable info
Resolution Steps
1. Create properties.cfg file in tibco/designer/5.x

2. Add below properties to the file
• Engine.UseDatabase=true
Engine.Database.Configuration=/sharedConfig/JDBCOra
• Database.Tablename.Prefix=CP
7. Not able to start ADMIN NT Service
Component
TIBCO Administrator 5.9
Issue Type
Not able to start ADMIN from the Windows Services (However it  starts from CMD)
Error Desc
Not able to start up from Windows Services, but able to start up from command line (however it was taking too long from cmd as well)
Error Details


Root Cause
Service taking longer time to start and windows service times out
New features introduced with Tomcat 7, namely due to Servlet 3.0 plug ability features, causes TIBCO Administrator slowness on starting
Resolution Steps
Add below property to the “catalina.properties” file in the locations specified below and then run service from command line. And then run tibcoadmin_<domain_name>.exe –update and then start service from NTServices.
Property:
#The comma-separated list of additional filenames of JARs that Tomcat will not scan for Servlet 3.0 pluggability features. #The coded default is that no JARs are skipped however the system property is set in a default  #Tomcat installation via the $CATALINA_BASE/conf/catalina.properties file. org.apache.catalina.startup.ContextConfig.jarsToSkip=*.jar
Locations:
C:\tibco\administrator\5.9\tomcat\conf
C:\tibco\administrator\domain\Ent_RTI_PD\tomcat\conf


8. Deployment Failure (Failure contacting Hawk Agent)
Component
TIBCO Admin
Issue Type
Deployment Failure
Error Desc
Failure contacting Hawk Agent”, “Container plugin not called”, “Deployable, containers require deployment”.
Error Details

Root Cause
This happens due to incompatibility between Microsoft MA SQL driver and security vendor entrust.
By default for most TIBCO Products the security vendor is enrust.
So, I explicitly changed the security vendor to j2se and that resolved the issue.
The issue may occur in some environment and not in others but you may add the below lines in tibcoadmin_<domain-name>.tra file and hawkagent_<domain-name>.tra files
Resolution Steps
add the below property in the hawkagent_<domain-name>.tra file
for all BW and ADMIN machines of the domain
java.property.TIBCO_SECURITY_VENDOR=j2se

Then restart hawk from command line for both admin and BW machine and try to deploy.
If it help then run "hawkagent_<domain-name>.exe --update" and then restart it from NT service
9. JMS process Starter fails at deployment
Component
EMS-Admin
Issue Type
JMS process Starter fail at deployment
Error Desc
caused by: Could not create connection with JMS server caused by: javax.naming.NoInitialContextException: Cannot instantiate class: com.tibco.tibjms.naming.TibjmsInitialContextFactory [Root exception is java.lang.ClassNotFoundException
Error Details
process initialization failed for JNDI Context/Process Definition.processprocess initialization failed for JNDI Context/Process Definition.process at m.tibco.pe.core.WorkflowBuilder.build(Unknown Source) at com.tibco.pe.core.WorkflowLoader.setWorkflows(Unknown Source) at com.tibco.pe.core.WorkflowLoader.loadWorkflows(Unknown Source) at com.tibco.pe.core.JobPoolConfigurator.a(Unknown Source) at com.tibco.pe.core.JobPoolConfigurator.if(Unknown Source) at .tibco.pe.core.JobPool.<init>(Unknown Source) at com.tibco.pe.core.JobPoolCreator.init(Unknown Source) at com.tibco.pe.core.JobPoolCreator.<init>(Unknown Source) at com.tibco.pe.PEMain.a(Unknown Source) at com.tibco.pe.PEMain.do(Unknown Source) at com.tibco.pe.PEMain.a(Unknown Source) at com.tibco.pe.PEMain.<init>(Unknown Source) at com.tibco.pe.PEMain.main(Unknown Source)caused by: Initialization error in [JNDI Context/Process Definition.process/JMS Queue Sender]
Root Cause
EMS home directory, EMS/bin, and EMS/lib not specified in bwengine.tra file
Resolution Steps
Specify EMS home directory, EMS/bin, and EMS/libin bwengine.tra file


10. Adapter Tester start up issues
Component
JDE Adapter
Issue Type
Adapter Tester fail to start
Error Desc
 java.lang.NullPointerException at com.tibco.ae.tools.adaptertester.AdapterProcess.run
(AdapterProcess.java:606)
 at java.lang.Thread.run(Unknown Source)
Error Details
 java.lang.NullPointerException
 at com.tibco.ae.tools.adaptertester.AdapterProcess.run
(AdapterProcess.java:606)
 at java.lang.Thread.run(Unknown Source)
Root Cause
Permission issue to write to the default log directory : c:\Temp
Resolution Steps
Use different directory


11. Enable EMS Server Tracing
Component
EMS
Issue Type
Not enough logging details
Error Desc

Error Details

Root Cause

Resolution Steps
To turn on EMS Server tracing and detailed logging into the EMS log file use below command to turn it on

set server log_trace=default,+INFO,+WARNING,+LIMITS,+ACL,+ROUTE,
+ADMIN,+CONFIG,+CONNECT,+CONNECT_ERROR,+PRODC
ONS,+MSG,+RVADV

And to capture the mgs details (body and headers) on a queue/topic, turn on
the trace for that queue/topic

Addprop queue <queue_name> trace=body
Addprop topic <topic_name> trace=body


Now you should be able to see the details of msg sent to this particular
queue/topic.

Sample:
2014-11-24 09:58:52.011 [MSG:7488541] received from user='admin'
: connID=3198 prodID=3359 msgID='ID:ADMIN-EMS-
SERVER.CF454715A0211CF:19' Time=1416844732040  mode=PERSISTENT
 size=119 queue='sample' msg=TextMessage={Header={
 JMSDestination={QUEUE:'sample'} JMSDeliveryMode={PERSISTENT} JMSPriority={4} JMSMessageID={ID:ADMIN-EMS-SERVER.CF454715A0211CF:19} JMSTimestamp={1416844732040}
JMSDeliveryTime={1416844732040}} string:''Hello'}}


12. BW Engine not detected on Admin
Component
Admin
Issue Type
BW engine not detected on admin, ( BW Software not shown under Installed software)
Error Desc
Need to deploy in a Service Container
Error Details
When try deploying it will deploy successfully however it won’t show you the service instance and give error message as” Need to deploy in a Service Container”.
When you try adding the BW Component by selecting add to additional machine by clicking on the Process archive, there won’t be any machine to add
Root Cause
If installation is not done correctly/installer don’t exist by itself then it will create .installerregistrylock under TIBCO_HOME and this file was preventing Domain Hawk Agent to detect the BW components.
Resolution Steps
In the .tsm log file  under C:\tibco\tra\domain\admin\logs
You will find “Thread TsmSyncInventory Waiting for a lock on a Vpd file” warning.

Remove installerregistrylock.file  from TIBCO_HOME
13. Invalid references
Component
Adapter
Issue Type
Invalid reference Error to WSDL & Schema
Error Desc
Invalid reference Error to WSDL & Schema
Error Details
`

Root Cause
Schema location/path which is imported/used by wsdl is incorrect
Resolution Steps
Fix the path/location in the WSDL (Correct item Red Box as in Green Box)



14. Cannot open Database, Login Failed.
Component
BW - DB Connection
Issue Type
DB connection is failed
Error Desc
BW-JDBC-100034 "Configuration test failed. Exception [com.microsoft.sqlserver.jdbc.SQLServerException] occured.
Com.microsoft.ssqlserver.jdbc.SQLServerException: Connot Open databse “JDE_QA” requested by the login. The login failed”
Error Details
"JDBC error reported: (SQLState = S0001) - com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "JDE_QA" requested by the login. The login failed.
Root Cause
Incorrect DB name have been given in the DB connection parameter.
jdbc:sqlserver://WBHONPSQL01\QA:1437;databaseName=JDE_QA
Resolution Steps
Provide correct DB name.

15. TLSv1.2 security mechanism working
Component
REST-JSON plugin
Issue Type
Connection to REST server failed
Error Desc
SSL handshake to REST server failed
Error Details
Activity invocation failed
caused by: com.sun.jersey.api.client.ClientHandlerException: iaik.security.ssl.SSLException: Server certificate rejected by ChainVerifier
Caused by: iaik.security.ssl.SSLException: Server certificate rejected by ChainVerifier
Root Cause
BW TRA 5.9 and BW 5.12 bydefault doesn't support TLSv1.2
Resolution Steps
Enable TLSv1.2 by adding below properties to the designer.tra and to make it work at the run time, add properties to the bwengine.xml located at :'<TIBCO_HOME>/bw/<ver>/lib/com/tibco/deployment' and build EAR.
java.property.TIBCO_SECURITY_VENDOR=j2se
java.property.https.protocols=TLSv1.2

Thursday, April 23, 2015

EMS

Define Messaging Models supported by EMS.
EMS supports three Messaging models.
1. Point to Point (Queue)
2. Publish-Subscribe (Topic)
3. Multicast (Topic)

Describe Queues functionality.
  • Queue represent Point to Point communication model, in this model, the message sent by Producer("Queue Sender") is can only be consumed by one Consumer ("Queue Receiver") at any given time. However, many consumers can can listen on to the same queue but no two consumers can consume same message at all.
  • Point to Point Model delivers the messages in a Round-Robin fashion, meaning that when multiple consumers are retrieving the messages from queue, the messages will be delivered to only one consumer at time and the next message will be deliver to the next consumer and so on.
  • You can configure to override the queue's Round-Robin delivery of messages by means of "Exclusive". When you define a queue as exclusive, only the first consumer will receive all the messages, reaming consumers cant retrieve.
Can multiple Producers send messages to the same Queue?
Yes. Many producers can send messages to same queue and Many receivers can retrieve messages from same queue.

How do you load Balance the messages across multiple receivers?
By default, having multiple receivers is a load balanced as the messages will delivered in Round-Robbin.

When producer sends a msg to a queue and the consumer is not active, will consumer receive the msg when it become active?
Yes.

How long the msg for Queue Receiver is stored on server when it's not active.
1. Until the msg expires OR
2. Until the maxRedelivery 
then it moves the msg to the $sys.undeliverd system queue only if JMS_TIBCO_PRESERVE_UNDELIVERED property for the msg is set to true, else it will just delete the msg.

Describe Topics functionality.
  • Topic represent Publish-Subscribe communication model. In this model, the message published by Producer("Topic Publisher")can be consumed by all the Consumers ("Topic Subscriber"). 
  • This model is also know as "Broadcast" messaging.
  • Many publishers can publish to the same topic, and a message from a single publisher can be received by many subscribers. Subscribers subscribe to topics, and all messages published to the topic are received by all subscribers to the topic.
When Publisher publishes a msg to a topic and the subscriber is not active, will subscriber receive the msg when it become active?
No. by default, subscribers receive msgs only when they are active. 

What is Durable Subscription?
Defining Durable Subscriber for a topic, it ensures that the msgs are received by the subscriber even if the subscriber is not active when msgs published. Msg will be stored on server and will delivered when the subscriber become active.

How long the msg for Durable Subscriber is stored on server when it's not active.
1. Until the msg expires OR
2. Until Storage Limit  reached for that topic OR
3. As long as the subscription for that topic exist.

Define JMS Message structure.
JMS includes three sections.
Header
Properties
Body

Can we exclude "Body" section from a JMS message when sending/Publishing?

Yes. "Body" and "Properties" sections are optional & can be excluded but the "Header" section is required so cant be left empty. 

Can we use any Message Type to leave the Body section empty?

No. To leave "Body" section to be empty the "Message Type" should be "Simple".

List the JMS Message Header Fields.

JMS Message Headers are configured in the "Configuration" and "Advanced"  or "Input" section of a Sender/Publisher JMS activities.
JMSDestionation
Queue/Topic

JMSDeliveryMode
Persistent/Non-Persistent/Reliable

JMSExpiration
Length of time the msg will live. "0" indicates no expiration

JMS DeliveryTime
Time when EMS server will deliver the msg to the consumer

JMSPriority                   
0 to 9, higher the number higher the priority

JMSMessageID               
Value uniquely identifies each message sent by a provider.

JMSTimestamp             
Time stamp of time when message was handed off to a provider to be sent.

JMSCorrelationID         
This ID can be used to link msgs, such as linking a response msg to a request msg.

JMSReplyTo                  
A destination to which a msgreply should be sent. Entering a value for this field is ptional.

JMSType 
Message type

JMSRedeliverd             
true/false-Indicates if the msg is redelivered

Are all the JMS Header fields are settable by sender/publisher method?
No, Not all the header fields, some of the fields are settable by 'message client' and 'JMS provider'. Refer below list:

Set By send or Publish method
JMSDestionation
JMSDeliveryMode
JMSExpiration
JMS DeliveryTime
JMSPriority
JMSMessageID
JMSTimestamp

Set by Message Client
JMSCorrelationID
JMSReplyTo

JMSType

Set by JMS provider
JMSRedeliverd

List the EMS Message Properties.
The properties are optional but can be set by defining them in the "JMS Application Properties" activity and mapping to the send/publish activities.
JMS_TIBCO_CM_PUBLISHER
JMS_TIBCO_CM_SEQUENCE
JMS_TIBCO_COMPRESS
JMS_TIBCO_DISABLE_SENDER
JMS_TIBCO_IMPORTED
JMS_TIBCO_MSG_EXT
JMS_TIBCO_MSG_TRACE
JMS_TIBCO_PRESERVE_UNDELIVERED
JMS_TIBCO_SENDER
JMS_TIBCO_SS_SENDER

Whats the Maximum Message Size for EMS?
512 MB. Best practice is to use smaller msg to avoid performance issues.


Describe Delivery Modes
Persistent: EMS server writes the msg to disk before delivery it to the Consumer & Producer waits for confirmation receipt.
Non-Persistent: EMS server never writes to the disk and producer wont wait for the confirmation reply considering Authorization=Disabled and npcheck_send_mode=never.
Reliable: EMS server never writes to the disk and never sends a confirmation receipt.

Explain how Authorization & npcheck_send_mode will affect Non-Persistent delivery mode?
Authorization:
For a Non-Persistent delivery mode when Authorization=Enabled, the producer of the msg will wait for confirmation receipt just as in case of Persistent Delivery Mode.

For a Non-Persistent delivery mode when Authorization=Disabled, the producer of the msg will NOT wait for confirmation receipt & avoids the overhead.

npcheck_send_mode:
Regardless of whether authorization is enabled or disabled, you can use the npsend_check_mode parameter in the tibemsd.conf file to specify the conditions under which the server is to send confirmation of NON_PERSISTENT messages to
the producer.
npsend_check_mode = [always | never | temp_dest | auth | temp_auth]

Is Persistent Delivery mode behaves same for Queues & Topics?
No, behavior is different.
Queues:
Server always persist the msgs to disk.
Topics:
Server persist the msgs to disk only if that topic has at least one Durable subscriber or one subscriber with a Fault Tolerance connection to the EMS Server.


What happens to the msg if the server fails before writing persistent msg to disk?
Msg will be lost, there is no way to recover it. By default server doesn't wait for write-to-disk operation to complete (Persistent msgs are written to disk Asynchronously). This default behavior can be override by setting mode=sync in the stores.conf file.

What are the different stores in EMS?
EMS server defines below default stores.
$sys.meta (meta.db)
The server writes state information about durable subscribers, fault-tolerant connections, and other metadata in this store
$sys.failsafe (sync-msgs.db)
Persistent msgs are written to this store for the destination using store=$sys.failsafe.
$sys.nonfailsafe (asyn-msgs.db)
Persistent msgs are written to this store by default.

What is default store for Queues and Topics?
When a queue or topic is create, by default it uses store=$sys.nonfailsafe & persistent msgs for these queues/topics are written to asyn-msgs.db

What are the different stores Types in EMS?
File-Based Stores
mstores
Data-Based Stores
By default EMS uses Files-based store to write persistent messages.

Describe Message Compression.
  • Message compression is useful in reducing the memory space in storage.
  • This feature should be used if message body is large & will be stored on server.
  • Compression usually takes longer time than uncompressed.
  • Compression option only compresses the body of a message but not headers.
  • Compression can be set using JMS_TIBCO_COMPRESS EMS property.
  • Message compression is set per message level, cannot be set per Queue/Topic Level.
List Destination Properties.
channel
export 
exclusive
maxRedelivery   
redeliveryDelay  
expiration  
flowControl  
global  
import  
maxbytes  
maxmsgs  
overflowPolicy  
prefetch
secure
sender_name
sender_name_enforced
store
trace
Properties in BLUE applicable to Topics Only & Properties in Orange applicable to Queues Only. Properties in WHITE applicable to both Queues &Topics.

Which two destination properties are defaulted when Queue/Topic is created.
Prefetch and Store properties are assigned by default.
Prefetch =5 for Queues and Prefetch=64 for Topics.
Store=$sys.nonfailsafe for both Queues & Topics.

Describe Wild Cards in EMS.
* and > are two wild cards in TIBCO EMS. Use of each of this explained below
Wild Card ">"
The wildcard > by itself matches any destination name.
Meaning when you just search queues and/ or topic just by >, it will list list all queues/topics ( it is just same as Show Queues/Show Topics command)
Show queues >
Show topics >

When > is mixed with text, it matches one or more trailing elements.
Meaning when a search is made with first part of the queue/topic name text, it will list all which matches this text.

Example: Existing Queues are
queue.1
queue.sample
queue.sample.1
queue.sample.2

show queues queue.> 
it will list all above queues

Wild Card "*"
The wildcard * means that any token can be in the place of *.

Example: Existing Queues are
queue.1
queue.sample
queue.sample.1
queue.sample.2

show queues queue.*
it will list only one trailing matched elements.

Explain the steps involved in creating a secure queue and allowing only one user to send/receive msgs?
  1. Create a queue
  2. Create User
  3. Enable "Authorization" property for the server.
  4. Add "Secure" property to the queue
  5. Grant permission to the queue


Note: "Secure" property will not be in effect if the server authorization is disabled.


Explains Authorization.
Authorization acts a master switch for validating user authentication and checking permissions on secured destinations.
If Authorization is disabled any user is allowed to connect to the server (ems connection will be successful even if incorrect password has been passed) and any user can send or receive msg to/from destinations. To enforce proper connection and permission validation "authorization" must be enabled.

How often does EMS server reads the configuration files?
EMS server reads configuration file only once when it starts. In order to make any changes done in configuration files to be current you must restart the server.