Search Results for: 40

“Unable to obtain an object lock on “null” & table or view does not exist” after adding Vertical Portal Cluster member

We were getting the below error in the SystemOut.logs  in our newly added WebSpherePortal server during restart and at runtime .

Error:

[6/14/16 14:18:14:404 IST] 00000063 JPAEventlogRe E   Synchronization Failed. Error: Unable to obtain an object lock on “null”.   <openjpa-2.2.3-SNAPSHOT-r422266:1564471 fatal store error> org.apache.openjpa.persistence.OptimisticLockException: Unable to obtain an object lock on “null”.
FailedObject: SELECT V FROM VirtualPortalEntryImpl V WHERE V.VP = :VP [java.lang.String]
at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4983)
[6/14/16 14:18:15:994 IST] 00000063 ModuleManager E    <openjpa-2.2.3-SNAPSHOT-r422266:1564471 fatal store error> org.apache.openjpa.persistence.OptimisticLockException: Unable to  obtain an object lock on “null [java.lang.String]”.
FailedObject: 0 [org.apache.openjpa.util.IntId] [java.lang.String]

Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00942: table or view does not exist 
{prepstmnt 1108295475 SELECT t0.VPID FROM jcr.WCM_VPORTALS t0 WHERE t0.VPID = ?} [code=942, state=42000]

Image1

Image2

Background:

It’s a newly created Server with vertical cluster and two Members  ie WebSphere_Portal and WebSphere_Portal_1

1) The Portal Cluster Creation was performed before the DB transfer
2) Second Portal Vertical Cluster member was created after the DB transfer
3) DB Oracle :Schema Names , FDKBUSR,LMDBUSR,RELDBUSR,COMDBUSR,CUSTDBUSR,
JCRDBUSR
4) The error were only displayed in the SystemOut.log for Second Portal Member
“WebSphere_Portal_1”

Steps Taken:

As the logs mentioned some locking errors,

a) I stopped  WebSphere_Portal and just working on “WebSphere_Portal_1” still same error on WebSphere_Portal_1
b) I started WebSphere_Portal_1 first  and then started WebSphere_Portal ..still same error on WebSphere_Portal_1

 On reanalyzing the logs found this entry in the logs of WebSphere_Portal_1

“Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00942: table or view does not exist
{prepstmnt 1108295475 SELECT t0.VPID FROM jcr.WCM_VPORTALS t0 WHERE t0.VPID = ?} [code=942, state=42000]”

>>Our schema for JCRDB is JCRDBUSR whereas in the error  its referring to “SELECT t0.VPID FROM jcr.WCM_VPORTALS t0 WHERE t0.VPID = ?}”

Also this table didn’t exist in the Database

So it seems  “WebSphere_Portal_1” was somehow referring to the default schema instead of the one configured for the Cluster

Solution :

On checking the WebSphere Variable Under Scope : Node : Nodename and Server = ServerName

Ie Scope : Node : NodeName and Server : WebSphere_Portal_1

 Here the Variable  for WebSphere_Portal_1

WCM_Schema : jcr
WCM_DATASOURCE= jdbc/wpdbDS

 These were the default settings but those details were  not as per our environment

Image3

Comparing with same variables from WebSphere_Portal for these parameters

For WebSphere_Portal the variables were :
WCM_Schema : JCRDBUSR
WCM_DATASOURCE= jdbc/wpdbDS_jcr
WCM_PORT=10028

I changed the Websphere Variable for Node : NodeName and Server : WebSphere_Portal_1 from

 WCM_Schema : jcr
WCM_DATASOURCE= jdbc/wpdbDS
WCM_PORT=10028

To

WCM_Schema : JCRDBUSR
WCM_DATASOURCE= jdbc/wpdbDS_jcr
WCM_PORT=10103

 

Image4

>>Sync the config and Save the changes
>>Restart the  Portal Servers

This resolved the Errors from the logs and we were able to login and access the portal url of WebSphere_Portal_1

Additional Link:

Later found this link which mentions to make those changes if “transferred your databases after you created the cluster, “

https://www.ibm.com/support/knowledgecenter/SSHRKX_8.5.0/mp/install/add_vert_clus.html

 “ If you transferred your databases after you created the cluster, complete the following steps on each vertical cluster member:

  1. Log on to the deployment manager WebSphere Integrated Solutions Console.
  2. Go to Environment > WebSphere Variables.
  3. From the Scope menu, select the Node=nodename, Server=servername option to narrow the scope of the listed variables. Node=nodename is the node that contains the WebSphere Portal application server.
  4. Update the WCM_DATASOURCE variable with the JCR data source name. Create the variable in the jdbc/jcr.DataSourceName format. For example, jdbc/wpdbds_jcr.
  5. Save all changes and synchronize the nodes.

 

To get automated mail updates of my Posts..
Please subscribe to the site http://webspherepundit.com
And also like the Facebook Page
https://www.facebook.com/webspherepundit

Installing ifixes in IBM Connections 4.5 CR 5

This blog will provide the highlevel steps to install an ifixes on IBM Connections 4.5 CR 5.

Note: These steps are generic in nature and would apply for most of the ifix in connections unless specified by the PMR team or documented in the ReadMe of that ifix

Env: IBM Connections 4.5 CR 5

iFixes to be installed :

4.5.0.0-IC-News-IFLO75278.jar

4.5.0.0-IC-News-IFLO75278-OSGi.jar

IBM connections Installation Path : /opt/IBM/Connections

Step1: Ensure that the ifixes are not already installed

              a. Run the setupCmdLine.sh to load the env setting for the Connections

[root@connections1 /]$ . /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/setupCmdLine.sh

NOTE: the updateSilent.sh command will not launch if the setupCmlLine.sh is not executed

            b. Navigate to where the updateInstaller is located , in my case its /opt/IBM/Connections/updateInstaller

[[root@connections1 /]$cd /opt/IBM/Connections/updateInstaller

            c. Run the updateSilent.sh with the attributes mentioned below

 [root@connections1 updateInstaller]$ ./updateSilent.sh -fix -installDir /opt/IBM/Connections | grep 75278 

Where 75278   is the ifix Number  which we are going to install

image

We don’t have the ifixes installed so proceed with the downloading of the ifixes

Step2: Download the Fixpack from the Fixcentral based on your environment and your issues

We will downloading the ifix 4.5.0.0-IC-News-IFLO75278.jar & 4.5.0.0-IC-News-IFLO75278-OSGi.jar

NOTE :For the ifix to be installed the Fix Central will recommend the prerequisite updateInstaller

which needed to be installed

Download the following

      4.5.0.0-IC-News-IFLO75278.jar

      4.5.0.0-IC-News-IFLO75278-OSGi.jar

And also download the UPDI which is required to install the above ifix

    4.5.0.0-IC-Multi-UPDI-20131020.zip

image

=================================================================

NOTE : This is needed only if your updateInstaller is not of the same version

To check the version of the updateInsaller

            a. Navigate to /opt/IBM/Connections/updateInstaller/version

bash-3.2$ [root@connections1 /]$ cd /opt/IBM/Connections/updateInstaller/version

       b. Open lcui.product file

[root@connections1 version]$ more lcui.product‘<!DOCTYPE product SYSTEM “product.dtd”>
‘<product name=”Update Installer for IBM Connections”>
‘<id>lcui</id>
‘<version>4.5.0.0</version>
‘<build-info date=”10/20/2013” level=”00000001″/>
‘</product>
[root@connections1 version]$

Which is  4.5.0.0-IC-Multi-UPDI-20131020.zip

If the version are same as the one required by the ifix  you don’t need to upgrade your updateInstaller

===================================================================

Step3: Installation of the New updateInstaller 4.5.0.0-IC-Multi-UPDI-20131020.zip

NOTE: This step is needed only if the updateInstaller is lower that the one required by the ifixes

 a. Extract the 4.5.0.0-IC-Multi-UPDI-20131020.zip

b.Take the backup of the existing updateInstaller in the location /opt/IBM/Connections/

[root@connections1 Connections]$cd /opt/IBM/Connections/
[root@connections1 Connections]$mv updateInstaller updateInstaller.backup

c. Extract the file 4.5.0.0-IC-Multi-UPDI-20131020.zip in the location /opt/IBM/Connections

And make the scripts executable with chmod 755 *.sh if it is not in executable

[root@connections1 updateInstaller]$chmod –R 755 *.sh

That’s It .. This will install the updateInstaller

Step4: Take the necessary backup

        a. Take the backup of the Connections Customization Directory. You could take a tarzip

backup or copy it in a backup location

NOTE : To get the Customization Directory

Login to the connections admin console >>

WebSphere Variables >>CONNECTIONS_CUSTOMIZATION_PATH

[root@connections1 ifixes]$ cp -r /share/customization/ /backup/customization.backup

          b. Take the backup of the LotusConnections-config from the Dmgr Cell

[root@connections1 updateInstaller]$ cd /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/connectionsCell01/
[root@connections1 connectionsCell01]$ cp -r LotusConnections-config/ /backup/LotusConnections-config.backup

          c. Take the copy  of the Existing ifixes installed for references

For Eg.

[root@connections1 updateInstaller]$ . /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/setupCmdLine.sh
[root@connections1 updateInstaller]$ ./updateSilent.sh -fix -installDir /opt/IBM/Connections > /backup/VersionDetails_BeforeIfix.txt

 

        d. Take the Backup of the specific Database if the ifix modifies some changes in the DB

Step5: Installation of the Ifix

1. Stop the Connections Servers Servers and the Nodeagent

2. Ensure the dmgr is started Otherwise during the UpdateWizard will not be able to proceed further

 3. Copy the ifix which were downloaded from the fixcentral to the ifixes folder in updateInstaller Folder  , Though  It can be any location within the server

[root@connections1 updateInstaller]$ mkdir /opt/IBM/Connections/updateInstaller/ifixes

            

  The Files were transferred using Winscp

image

[root@connections1 updateInstaller]$ ls -l ifixes

image

  4. Launch the GUI Console of RHEL Server

As root ( or any user with which the installation was done) launch the GUI Console of the

RHELServer using VNC or Xming or any X11 forwarding tools

        

  5.  Run setupCmdLine.sh to load the env variables

[root@connections1 updateInstaller]$ . /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/setupCmdLine.sh

NOTE: the updateWizard.sh command will not launch if the setupCmdLine.sh is not executed

6. Then Launch the updateWizard.sh from  the GUI from the path /opt/IBM/Connections/updateInstaller

image

   7. Click Next on the welcome screen

image

          8. Select the “Install updates ” Option and provide the Path of the ifixes folder .

          In my case its /opt/IBM/Connections/updateInstaller/ifixes.

Then click Next

image

         9. The updateWizard will detect the ifixes in that folder . We had copied two ifixes  

4.5.0.0-IC-News-IFLO75278.jar

4.5.0.0-IC-News-IFLO75278-OSGi.jar

We can click “Details” if we want more information on these ifixes

Select both the ifixes and click Next

NOTE: If there are any dependencies ifixes requirement it will be prompted

image

        10. The updateWizard will provide a message to take the necessary backups before the installation.

Check the box and Click  OK

image

          11.  Provide the Deployment Manager Admin user name and Password . This will be validated to proceed

image

            l2. After the Validation Successful .. Click OK

image

          13.   Check the summary page . it will again display the ifixes which we have selected to Install

Click Install

image

Note : It may take some time depending on the number of ifixes

image

           14. The logs are created in the /opt/IBM/Connections/version/log/

Tail the logs for the ifixes

 [root@connections1 log]$ cd /opt/IBM/Connections/version/log/
[root@connections1 log]$tail –f  20151107_032631_LO75278-OSGi_news_install.log

image

              15.  If the iFIx installation was successful we will get a “ Result: The iFix Installation was successful”

message in the updateWizard

image

Checks the logs too . The BUILD SUCESSFUL message should be displayed in them

image

===============================================================================

NOTE: The Installation of the ifix can be done using command line too

For example:

[root@connections1 updateInstaller]$./updateSilent.sh -installDir /opt/IBM/Connections -fix -fixDir /opt/IBM/Connections/update/ifixes -install -fixes LO75278 LO75278-OSGi -wasUserId wasadmin -wasPassword <password>  -featureCustomizationBackedUp yes

=============================================================================

           16. Validate if the ifix is installed

[root@connections1 log]$ cd /opt/IBM/Connections/updateInstaller

a. Run setupCmdLine.sh

[root@connections1 /]$ . /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/setupCmdLine.sh

 b. Run updateScript.sh with the options mentioned below

[root@connections1 updateInstaller]$ ./updateSilent.sh -fix -installDir /opt/IBM/Connections | grep 75278

image

We see that the ifixes for LO75278 is installed

   17.  Restart Dmgr and Check the dmgr logs
Stop Dmgr

[root@connections1 /]$ cd /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/stopManager.sh

Provide the wasadmin credentials while stopping

           Start dmgr

[root@connections1 /]$ cd /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/startManager.sh

18. Start the nodeagent , Do a full synchronization

[root@connections1 /]$ /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startNode.sh
  1. Start the Sever , and check  the logs for any errors

In this way we can install the Ifixes for on IBM connections 4.5

 

To get regular mail updates on my Posts..
Please subscribe to the site http://webspherepundit.com
And also like the Facebook Page
https://www.facebook.com/webspherepundit

Integrate TDS LDAP with Websphere Applicaiton Server

Security is a critical aspect of any distributed application model. Most of the firms have a centralized repository of the users in LDAP servers like Active Directory, TDS, Open DJ etc.

Activity :
To Integrate Tivoli Directory Server LDAP with Websphere Application Server as Federated Repository

Assumptions : 
a) Tivoli Directory server is allready Installed and users are avaliable in it ( Note Any LDAP ie Active Directory , TDS , OpenDj , Sun Directory Server etc can be used )

b) Websphere Application Server is installed and profiles and servers created and running .
c) The TDS Ldap server should be reachable from the DMGR and the Nodes .. so you can test it using telnet command
From Dmgr and Node check telnet to LDAP at Port 389 ( or which ever port its is running)

Eg : telnet <Ldap IP> 389

d) In this example I have a Dmgr , Nodeagent and a server and will be integrating the Dmgr with TDS LDap

 

Steps to Integrate LDAP with WAS

Step 1: Details from the LDAP Team.
Before beginning the Ldap Integrating there are a few information  which are needed from the LDAP team ( If its not managed by you )

Basic Details needed :

Hostname/IP address of TDS Server : 10.0.0.15
Port No : 386  ( non SSL)
Bind DN : cn =root
Bind Password : password
Base Dn: dc=ibm,dc=com

Additional properties may be needed depending on your env like
User Filter:
Group filter:
User ID map:
Group ID map:  etc..

But in my case its not needed as most are default

NOTE : Ensure that the WAS admin user which we logged in the WAS console with ie wasadmin is unique in both the Filebased and in LDAP  ie the user wasadmin should not be avaliable in the LDAP  as its allready there in the FileBased Registry

And If “wasadmin” is also there in LDAP , then there will be conflict and we will be prevented to login to the admin console as “wasadmin” post the Integration with TDS.

As a best practice , keep wasadmin intact but create another user in the LDAP and later add this use to the admin group from the was console .

For eg  I have created “webadmin” as an user in the LDAP which I will add to the was administration group after the WAS integration wth LDAP in this article

This is applicable for all the users in the WAS and LDAP. It should be unique in the repositories

 

Step 2: Validating using LDAP Browsers

a) Downlaod the Ldap Browser and extract it . Then Launch the “lbe.jar”

lbe

lbe1

b) Go File >> New

lbe2

c) Give a name to the connections for recognition . I have entered TDSLDAP

lbe3

d) Go to “Connections” tab

LdapBrowser1
             1) Enter the IP Address(10.0.0.15) Port No (389) and click Fetch DN .
             2) Select dc=ibm,dc=com
            3) Uncheck  “Anonymous bind”
            4) Enter username “cn=root” and password = password
            5) Click Save and then Connect

e) We will see all the users which are there in the Ldap in the Ldap Browser console

LdapBrowser2

Step 3: Once all the information is available and validated, we can proceed with the integration of Ldap with WAS


Step 4: 
Login to the WAS Admin console with wasadmin user

url :https://10.0.0.15:9043/ibm/console 

Just to check the list of users Navigate to Users and Group >> Manage Users
We  see the List of users before the integration . Only “wasadmin” as File Based Realm

FederatedRepos0

Step 5: To Integrate Ldap .. Click  “Global Security “

FederatedRepos

Then Click “Configure” on the Federated Repositories


Step 6:
 Click on “Manage Repositories” as per the screenshot

FederatedRepos1


Step 7:
 Click  “ADD” and  , Select “LDAP repository” from the dropdown

FederatedRepos3


Step 8:
 This page we need to enter the details of the LDAP ( shared by Ldap team )
      a ) Enter the LDAP Name  (  Can be any name which will identify it . I have named it TDSLDAP )
     b )  In the Drop Down Select “IBM Tivoli Directory Server “
     c ) Enter the Bind Distintguised Name : cn=root
    d )   Enter the Bind Password : password
    e )  Here the Federated Repository properties for login is “uid” it might differ based on your              environment it could be “cn” “email id ” etc
    f )  Primary Host Name : connections.ibm.com ( you could provide the ip too )
    g )  Port No : 389
    i )  Click Apply and Save

FederatedRepos4

 

FederatedRepos5


Step 9:
 Click on Global security > Federated repositories

FederatedRepos6

Click on “Add Repositories ( LDAP custom etc )


Step 10:
 From the drop Down Select “TDSLDAP”

FederatedRepos7

Enter the Base DN in our case : dc=ibm,dc=com


Step 11:
 Click Apply and Save

FederatedRepos8


Step 12:
 Check “Allow operations if some of the repositories are down”

FederatedRepos9

This will enable us to login as wasadmin to the admin console even if the LDAP id down .


Step 13: 
Click Apply and Save

FederatedRepos10

Step 14: Do full Synchronise


Step 15:
 Stop the Servers, Nodeagent and the Dmgr

Stop Servers
/opt/IBM/WebSphere/AppServer/profiles/Custom01/bin/stopServer.sh server1

Stop Nodeagent
/opt/IBM/WebSphere/AppServer/profiles/Custom01/bin/stopNode.sh server1

Stop Dmgr
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/stopManager.sh

 

Step 16: Start the Dmgr , Nodeagent and Servers
Start Dmgr :
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/startManager.sh

Start Nodeagent :
/opt/IBM/WebSphere/AppServer/profiles/Custom01/bin/startNode.sh

Start Server :
/opt/IBM/WebSphere/AppServer/profiles/Custom01/bin/startServer.sh server1

Check for any errors for LDAP etc in the SystemOut logs


Step 17:
 Validation : Now login with the file based registry user ie “wasadmin”

We can see the users from the LDAP and also  wasadmin user from file based repository


tds1

 

 

Testing

Test 1: We will add user “santosh”  from the LDAP as a monitor role in WAS  and test it

           a ) Click User and Groups >> Administrative user Roles
Currently only “wasadmin” is available

FederatedRepos32

b )
 Click Add ,

FederatedRepos32

          c ) Select “monitor” Role
Search the users using the Search button , We will be able to see the users from the ldap
Select “santosh” and drag it to the other side

FederatedRepos33
Select OK and Save the configurations

FederatedRepos34
The user “santosh “ is added to the Administrative role as a “monitor” Role

FederatedRepos35Apply and Sync with the nodes

         d )  Now Logout

         e )  Try login with user Santosh and password: password (As mentioned in the LDAP ) 
         f )  We are able to login properly if all the setting are done correctly

FederatedRepos36
           g )  Navigate to other options and you will not see lots of options which were visible in the                            wasadmin login

FederatedRepos37
for eg under Nodes we dont see the options like Full Syncronise , Add etc


Test 2 :
 We will add webadmin this user is from the LDPA we will add it to the admin group

               a)  Click User and Groups >> Administrative user Roles
Currently only “wasadmin” is there
              b )  Click Add ,

              c )  Select “administrator” Role
Search the users using the Search button , We will be able to see the users there
Select “webadmin” and drag it to the other side

FederatedRepos38

Click OK and Save the changes

FederatedRepos39
Apply and Sync with the nodes

          d ) Now Logout

         e )  Try login with user webadmin and password: password (Password from the Ldap) 

FederatedRepos40
         f ) We will see all the options which were available for wasadmin is also available for                     “webadmin“.

 

This is how we integrate TDS LDAP with Websphere Application Server . Similarly we can integrate any LDAP like Active Directory  etc in a federated Repository .

 

 

To get regular mail updates on my Posts..
Please subscribe to the site http://webspherepundit.com
And also like the Facebook Page
https://www.facebook.com/webspherepundit

 

Step By Step Installation and Configuration of Tivoli Directory Server 6.3 on RHEL

Activity : High Level Steps for Installation and basic Configuration of  Tivoli Directory Server 6.3 on Linux RHEL

Environment : Redhat Linux 5.6 64 Bit.
TDS Version : Tivoli Directory Server 6.3
Software File: tds63-linux-x86-64.iso

Step 1: Login to the Passport Advantage and download the TDS Software “tds63-linux-x86-64.iso

Step 2: Copy the software “tds63-linux-x86-64.iso” to the Linux Server

InstallTDS

InstallTDS1

Login to the TDS Server on the GUI Console or enable X11 forwarding to enable the GUI mode for the installation

Step 3: Mount the tds63-linux-x86-64.iso as a loop on the /mnt location using mount command

[root@connections IBMSoftware]# mount -o loop tds63-linux-x86-64.iso /mnt/

InstallTDS3
Step 4 :Navigate to the tds folder in the /mnt

login as: root
[root@connections2 ~]# cd /mnt/
[root@connections2 mnt]# ls -ltr

InstallTDS5

Step 5 :Execute the install_tds.bin folder

InstallTDS6

Step 6 : Select the English Language

InstallTDS7

Step 7 :The Install Shield Wizard opens up .. Click Next

InstallTDS8

 Step 8 : Accept the License

InstallTDS9

Step 9: Select the “Custom” Option

InstallTDS10

Step 10 : We can select the options available like

DB2 ( It is needed for the TDS . The user details , tree structure etc are all stored in the DB2 Database)
Tivoli Global Security Kit
Embedded Websphere Application Server  ( for the Web based administration )
etc
InstallTDS11

Step 11 :It provides the Summary of the path where the installation of various components would take place .
Click Install

InstallTDS12

Step 12 : It will take some time . the progress bar will display the components which are getting installed

InstallTDS13

InstallTDS14png

Step 13 :Once the Installation the TDS Instance Administration tool will open up
We need to create a new TDS instance ..

NOTE : you can launch the TDS Instance Administration tool using the idsxinst command too

[root@connections ~]# cd /opt/ibm/ldap/V6.3/sbin/
[root@connections sbin]# ./idsxinst

This tool will create the TDS Instance . Also note that this wizard will also create a DB instance

InstallTDS15

Step 14 :Check “Create the Instance “ Option

InstallTDS16

Step 15 : We will create a Default Instance

InstallTDS18

Step 16 : Update the passwords for the instance ( Please set a more complex password )
I have set password as “password
Encryption seed : qwertyqwerty
Administration DN password : password

Then Click Next

InstallTDS19
Step 17 :The Default Instance created is “dsrdbm01

InstallTDS20

Once done , Click Finish

It would take some time , Be patient ( you could view the logs on the console too )

InstallTDS21

Step 18 :The Task Completed Message would be prompted when its finished

InstallTDS22

Click Close

Step 19 : We can see the dsrdbm01 Instance Created

InstallTDS23

But you need to have X11 forwarding enabled on the Putty or the GUI mode for the Linux

Step 20 :Once the TDS Administration tool is launched

We observe that the TDS Instance Server is stopped state and TDS Administration Server is started state

To start the TDS Instance Server click on “Start/Stop”

InstallTDS23

Step 21 :Click the “Start Server” button

InstallTDS24
InstallTDS25

InstallTDS26

Step 22 : To View the details of the ports .. Click the View Button on the TDS Administration tool

InstallTDS26

InstallTDS29

Step 23 :To change the TDS Admin password :

In the TDS Administration tool >> Click on Manage

InstallTDS30
It will launch the TDS Configuration Tool

NOTE : To launch the TDS configuration tool you can navigate to /opt/ibm/ldap/V6.3/sbin/idsxcfg
[root@connections ~]# cd /opt/ibm/ldap/V6.3/sbin/
[root@connections sbin]# ./idsxcfg

Click on “Manage Administrator password “
Set the password

InstallTDS31

we need to restart the TDS Instance Server which will be prompted

InstallTDS32

These are the steps to install and create a Tivoli Directory Server Instances

Some Important Commands
Note : In our case “LDAP Install directory” is /opt/ibm/ldap/V6.3/sbin/
a) Starting an instance                     LDAP Install directory/sbin/idsslapd -I
b) Stopping an instance                   LDAP Install directory/bin/ibmdirctl stop -h [IP of the Server] -D cn=root -w password
Or
c) Stopping an instance                   LDAP Install directory/sbin/idsslapd -I -k
d) Checking an instance                  LDAP Install directory/bin/ibmdirctl status -h localhost -D cn=root -w password
e) Displaying list of instances        LDAP Install directory/sbin/idsilist
f) Loading the instance administration tool                         LDAP Install directory/sbin/idsxinst
g) Loading the configuration tool for an instance                    LDAP Install directory/sbin/idsxcfg -I 

==================================
==================================

Launch  WEB Admin Client

Note : Ensure that the Embedded Websphsere Application server was selected during installation .

If you have forgot to select or chose not to install it , it can be done later too ( a post for another time )

Step 1 : Launch the TDS Web App
a) Ensure that the embedded websphere server “server1” is Installed and started
Navigate to /opt/ibm/ldap/V6.3/appsrv/profiles/TDSWebAdminProfile/bin/
To start the webapp ./startServer.sh server1
To stop the webapp ./stopServer.sh server1

b) Once the server1 is started launch the browser
http://10.0.0.10:12100/IDSWebApp/
These are the default credentials for the IDSWebApp
username : superadmin
password : secret

InstallTDS33
c) We need to the add the new TDS instance in the WebApp for management
Click on “Manage Console Servers”

InstallTDS36

d) Click on “Add”


InstallTDS37

Update the hostname , IP address and the port no of the TDS ( We will get from the TDS Administration Tool)

InstallTDS38
InstallTDS39png
  e) Ensure that the TDS instance Server is started (  Steps  to start mentioned above )

InstallTDS30

f) Click Logout

g)  Access the url http://10.0.0.10:12100/IDSWebApp/ again now ,
We will see the Node which we have added

InstallTDS40
h) Enter the login credentials ie “cn=root” And Password ” passord “ which we have set above
InstallTDS41
i) From this web console we can manage the TDS instance
InstallTDS44

 

==================================
==================================
Adding Suffices to the TDS LDAP

Adding Suffices to the LDAP

a) Launch the TDS Configuration tool ( Ensure that you have X11 forwarding to enable the GUI Mode ”

[root@connections sbin]# cd /opt/ibm/ldap/V6.3/sbin/
[root@connections sbin]# ./idsxcfg

InstallTDS45
b) Click on Manage Suffixes

InstallTDS46

Enter dc=ibm,dc=com  ( you can provide your own suffices like dc=myorg,dc=com )
Click Add

InstallTDS47
c ) We need to create an  ldif files which contains the users and groups

Suffix : dc=ibm,dc=com
create a file createUser.ldif
[root@connections V6.3]# vi /opt/ibm/ldap/V8.3/createuser.ldif

you can refer to for sample from the links below

Sample ldif file — 1  for suffix dc=ibm,dc=com
or
Sample ldif file — 2  for suffix   dc=myorg,dc=com

d ) We need to import the ldif files

Click on “Import LDIF Data
Browse the createUser.ldif file
Click Import
If there is any errors in the ldif file it will only load the once which are proper . The duplicate once or the error once will not be loaded

InstallTDS48
It will require the TDS Instance to be stopped .

InstallTDS49

e ) Once the import is completed then start the TDS Instance server
Navigate to Manage server state >> Start Server

InstallTDS50
f ) Validate the imported users in the TDS using the TDS WebApp console
Login to the TDS WebApp console
To validate the import of the users

http://10.0.0.10:12100/IDSWebApp

InstallTDS41

Click on the “Mange entries”

We will see all the users which are loaded from the ldif file .

InstallTDS53

  g) Validating using ldap Browsers
You can use any other Directory browsers avaliable

1)  Extract the Ldap Browser Utility and Launch the lbe.jar

lbe
lbe1
2) Click on File >> New

lbe2

3) Enter a Session Name : I have entered it TDSLDAP

lbe3

4)  Go to connections tab
LdapBrowser1
1) Enter the IP Address, Port No and click Get suffix .
2) Select dc=ibm,dc=com
3) Uncheck Anonymous login
4) Enter username cn=root and password = password
5) Click Save

5)  We will see all the users which are populated in the console

LdapBrowser2

These are the highlevel steps to start and have a running Tivoli Directory Server LDAP 6.3 quickly.

You can customize and change the configs as per your requirement.

To get regular mail updates on my Posts..
Please subscribe to the site http://webspherepundit.com
And also like the Facebook Page
https://www.facebook.com/webspherepundit

Update Websphere App Server Fixpack using “imcl” command line

 Note : This method to update Websphere Application Server can be used for Any WAS version which uses IBM Installation Manager 

Command : ./imcl install

Current Version : WAS ND 8.5.5.0
New Version : WAS ND 8.5.5.1

Procedure
a) Stop All the WAS Processes ( dmgr, Nodeagent , Server ) Also Apply the Fixpack to Dmgr First before applying to other nodes

b) Take the tar backup of the WAS directories, Profiles, IIM, IIM Data ( var/ibm ) etc to revert in case of any issues

c) Check the Current version of the WAS Installation using Installation Manager Command Line : imcl “./imcl listInstalledPackages”

[root@connections tools]# cd /opt/IBM/InstallationManager/eclipse/tools
[root@connections tools]# ./imcl listInstalledPackages
com.ibm.cic.agent_1.8.2001.20150409_1833
com.ibm.websphere.ND.v85_8.5.5000.20130514_1044

The version is WAS ND 8.5.5.0
Imcl

 

d) Check the Path of the WAS installation using “./imcl listInstallationDirectories”

[root@connections bin]# cd /opt/IBM/InstallationManager/eclipse/tools
[root@connections tools]# ./imcl listInstallationDirectories
/opt/IBM/WebSphere/AppServer

Imcl3

 

 

e) Also Check the Version of WAS using “versionInfo.sh”

[root@connections tools]# cd /opt/IBM/WebSphere/AppServer/bin/
[root@connections bin]# ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2012; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.1.48, dated 2/8/12——————————————————————————–
——————————————————————————–
Name IBM WebSphere Application Server Network Deployment
Version 8.5.5.0
ID ND

Imcl2

 

f) Extract the Fixpack zip 8.5.5-WS-WASND-FP0000001-part1.zip & 8.5.5-WS-WASND-FP0000001-part2.zip in the same Folder .

I have extracted it in /IBMsoftware/Fixpacks/WASND_8.5.5.1FP/

 

g) List the Available packages in the fixpack Extracted path ie /IBMsoftware/Fixpacks/WASND_8.5.5.1FP/

Command : ./imcl listAvailablePackages -repositories /IBMsoftware/Fixpacks/WASND_8.5.5.1FP/

[root@connections tools]# ./imcl listAvailablePackages -repositories /IBMsoftware/Fixpacks/WASND_8.5.5.1FP/ com.ibm.websphere.BASE.v85_8.5.5001.20131018_2242
…………………..
com.ibm.websphere.ND.v85_8.5.5001.20131018_2242
………………………..
com.ibm.websphere.NDTRIAL.v85_8.5.5001.20131018_2242
[root@connections tools]#
[root@connections tools]#

Here we can see “com.ibm.websphere.ND.v85_8.5.5001.20131018_2242” Package .. We will upgrade this package as we are using websphere.ND.V8.5.5

Imcl5

 

h) Update the Fixpack using the imcl command
Command: ./imcl install com.ibm.websphere.ND.v85_8.5.5001.20131018_2242 -repositories /IBMsoftware/Fixpacks/WASND_8.5.5.1FP/ -installationDirectory /opt/IBM/WebSphere/AppServer -acceptLicense -sP

[root@connections tools]# ./imcl install com.ibm.websphere.ND.v85_8.5.5001.20131018_2242 -repositories /IBMsoftware/Fixpacks/WASND_8.5.5.1FP/ -installationDirectory /opt/IBM/WebSphere/AppServer -acceptLicense -sP
25%                  50%                     75%                     100%
——————|——————|——————|——————|
…………………………………………:….

Imcl6

 

h) After the completion of the above command .  check the updated version of WAS , it should be WAS 8.5.5.1 now .
We can see that the package is now “com.ibm.websphere.ND.v85_8.5.5001.20131018_2242″

[root@connections ]# cd /opt/IBM/InstallationManager/eclipse/tools/
[root@connections tools]# ./imcl listInstalledPackages
com.ibm.cic.agent_1.8.2001.20150409_1833
com.ibm.websphere.ND.v85_8.5.5001.20131018_2242
[root@connections tools]#

Imcl7

 

i) Check the versionInfo.sh to see if the Version of the WAS has been updated .

[root@connections tools]# cd /opt/IBM/WebSphere/AppServer/bin/
[root@connections bin]# ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2012; All rights reserved.
——————————————————————————–Name IBM WebSphere Application Server Network Deployment
Version 8.5.5.1
ID ND ………….

Imcl8

 

j) Start the Dmgr, NodeAgent, WAS Servers after the fixpack updation and check the SystemOut.log to see if there are any errors

This is how we can easily update the fixpack using imcl

 

 

To get regular mail updates on my Posts..
Please subscribe to the site http://webspherepundit.com
And also like the Facebook Page
https://www.facebook.com/webspherepundit

=========================================================================

Distributed MQ Channel Setup – Single Way communication

Requirement : To set up a minimal steps for a Single way MQ communication between two queue managers ie From QMC01 to  QMC02

Architecture :
OS : Linux Redhat 5.6
MQ Version : 7.0
Source Qmgr :  QMC01
Destination Qmgr : QMC02 ( Both the Qmgrs on same IP)

Infrastructure Diagram :

distributed communication

High level Steps create the Single WAY MQ  communication between QMGRs :

Destination QMGR
Step1:  Create the Destination QMGR
Step2: Create Local queue where the message needs to be received
Step3: Define Listener and Start the Listener
Step4: Creating Receiver Channel with same name as the Sender channel
Step5: Start the Receiver Channel

Source QMGR
Step1: Create the qmgr
Step2: Define Transmission Queue
Step3: Creating Sender Channel
Step4: Create Remote Queue Definitions
Step5: Start the Sender Channel

######################################################################################
                         Detailed Steps
######################################################################################

 Destination QueueManager
Step1: Create a Destination Queue Manager QMC02

bash-3.2$ crtmqm QMC02

Step2:  Start the Queue Manager QMC02

bash-3.2$ strmqm QMC01

Step3:  Enter the Mqsc prompt of QMC02

bash-3.2$ runmqsc QMC01

Step4: Create the Local Queue in the Dest Qmgr where the message is to be received from the Source Qmgr Qmc01

DEFINE QLOCAL(QL.A)

Step5:  Define Listener for Source Qmgrs to connect to Dest Qmgrs

DEFINE LISTENER(QMC02.LISTENER) TRPTYPE(TCP) PORT(1414) IPADDR(192.168.111.128)

Step6: Start Listeners (QMC02.LISTENER) on the Dest Qmgr QMC02

START LISTENER(QMC02.LISTENER)


NOTE : Listener can be started by the command line to as mentioned below

/opt/mqm/bin/runmqlsr -r -m QMC02 -t TCP -p 1414 -i 192.168.111.128

Step7: Define the Receiver Channel CHL(QMC01.QMC02)

DEFINE CHL(QMC01.QMC02) CHLTYPE(RCVR) REPLACE TRPTYPE(TCP)

Step8: Start the Receiver Channel

START CHANNEL(QMC01.QMC02)

Step9: Display Listener Status

DISPLAY LSSTATUS (QMC02.LISTENER)

Step10: Display Receiver Channel Status

DISPLAY CHSTATUS(QMC01.QMC02)

Step11: Check if the listener is running on the Destination Qmgr server

ps -ef | grep runmqlsr

 

Screenshots for commands

MQcommunication1

 

######################################################################################

 Source QueueManager
Step1: Create the source queue manager QMC01

bash-3.2$ crtmqm QMC01

Step2: Start the Queue Manager  QMC01

bash-3.2$ strmqm QMC01

Step3: Enter the MQSC prompt of the QMC01

bash-3.2$ runmqsc QMC01

Step4: Create the Transmision Queue : QMC02.XMITQ 

DEFINE QLOCAL(QMC02.XMITQ) REPLACE USAGE(XMITQ)

Step5: Create the Sender Channel QMC01.QMC02  with these details
a)  CHLTYPE and TRPTYPE ( as we are using TCP protocol for connection )
b) CONNAME ( Use the Ip address of the Destination QMgr and the port of the Dest Listener)
c) XMITQ ( Use the Transmission Queue for the senders channel )

NOTE : The Sender Channel Name created here should be same as the Receive Channel created for the Destination QMgr QMC02

Usually the naming  convention is source.to.destination for ease of understanding the infra

DEFINE CHANNEL(QMC01.QMC02) CHLTYPE(SDR) REPLACE TRPTYPE(TCP) CONNAME(‘192.168.111.128(1414)’) XMITQ(QMC02.XMITQ)

Step6: Define the Remote Queue Definitions with Remote Queue Name and Remote Qmgr Name

DEFINE QREMOTE(QRMT02) RNAME(QL.A) RQMNAME(QMC02) XMITQ(QMC02.XMITQ)

Step7: Start the Sender Channel QMC01.QMC02
NOTE: As the receiver channel is still not created and started, … the sender channel will still not be in the running status

START CHANNEL(QMC01.QMC02)

Step8: Display the Channel Status QMC01.QMC02

display chstatus(QMC01.QMC02)

Screenshots for commands

MQcommunication3

 

######################################################################################

Testing

######################################################################################

Step1: Ensure that the listeners is started and running on the Dest Qmgr Server QMC02

START LISTENER(QMC02.LISTENER)

Step2: Check the Status of Listeners on Qmgr QMC02

DISPLAY LSSTATUS (QMC02.LISTENER)

Step3: Ensure the Receiver channel is started on the Destination Qmgr Server QMC02

START CHANNEL(QMC01.QMC02)

Step4: Display the Receiver Channel Status on the Destination Qmgr Server QMC02

DISPLAY CHSTATUS(QMC01.QMC02)

Step5: Ensure that the Sender Channel is started and running on the Source Qmgr Server QMC01

START CHANNEL(QMC01.QMC02)

Step6: Display the channel Status QMC01.QMC02 on the Source Qmgr Server QMC01

DISPLAY CHSTATUS(QMC01.QMC02)

Step7: Check the Queue Depth of the Dest Queue ie QL.A

bash-3.2$echo “DISPLAY QLOCAL(QL.A) CURDEPTH ” | runmqsc QMC02 | grep CURDEPTH

MQcommunication4

Step8: Put the message in the Source Qmgr using the “./amqsput [Remote Queue Def]  [Source Qmgr] “ 

bash-3.2$/opt/mqm/samp/bin/amqsput QRMT02 QMC01

MQcommunication5

I put the message “This is a Remote Test” in the Remote Queue Definition  QRMT02 in the source Qmgr QMC01 .

So if the configurations are proper then this message should be received by the Destination Queue QL.A on Qmgr QMC02

So the Message would flow internally from

MQcommunication8

 

Step9: View the Queue Depth of Destination Queue QL.A

bash-3.2$echo “DISPLAY QLOCAL(QL.A) CURDEPTH ” | runmqsc QMC02 | grep CURDEPTH

MQcommunication6

The Message has successfully arrived at the destination Queue ie QL.A

Step10: Browser the messages from the QL.A using “./amqsgbr [Dest Queue]  [Dest Qmgr]” or get the message using “./amqsget [Dest Queue]  [Dest Qmgr]”

bash-3.2$/opt/mqm/samp/bin/amqsgbr QL.A QMC02

Put some messages form the Source Qmgr and see if the messages is recived in the Destination Qmgrs and in Queue specified

 

MQcommunication7

######################################################################################

Troubleshooting

######################################################################################

Step1: Ensure that Sender Channel in the Source Qmgr and Listener and Reciever Channel in the Destination Qmgr is started and running

Step2: The Sender Channel Name in the Source Qmgr  and the  Receiver Channel Name in the destination Qmgr should have the same Name

Step3:  The Listener port shouldn’t be used by any other application

Step4:  Recheck the configurations done

Step5:  Check if the message is there in the transmission queue

 

 

 

To get automated mail updates of my Posts..
Please subscribe to the site http://webspherepundit.com
And also like the Facebook Page
https://www.facebook.com/webspherepundit

 

Setting up MQ Triggerring

MQ Triggering
WebSphere MQ provides a feature that enables an application or channel to be started automatically when there are messages available to retrieve from a queue

mqtriggering

1) A message is put to a queue defined as triggered.
2) If a series of conditions are met, the queue manager sends a trigger message to an initiation queue.
3) This is called a trigger event.
4) A trigger monitor reads the trigger message and takes the appropriate action based on the contents of the message, which is typically to start a program to process the triggered queue.
5) Trigger monitors may be built-in or user defined

Some links for more elaborate details on triggering
https://hursleyonwmq.wordpress.com/2007/02/09/triggering-checklist/
http://blog.niklasottosson.com/?p=598
http://www-01.ibm.com/support/docview.wss?uid=swg27039569
http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg27008375
http://www-01.ibm.com/support/docview.wss?uid=swg27041673&aid=1

Types of triggering:
1. Channel Triggering
2. Application Triggering
3. Client Triggering

Modes of Triggering
Trigger on first message- Call a program when depth of queue goes from 0 to 1
Trigger on every message- Call a program for every message entering the queue
Trigger on depth- Call a program when depth of queue gets to a certain number like on 10 messages

In this tutorial I will display the minimal steps to start the application triggering

High level steps for Application triggering
a) Create an initiation queue or use the default SYSTEM.DEFAULT.INITIATION.QUEUE.
b) Create a process definition.
c) Create or alter a local or model queue.
d) Associate the initiation queue and process definition with the local queue, and specify the trigger attributes .

Environment Details :
MQ Version : 7.0
OS : Redhat Linux
TYPE : Application Triggering
MODE : FIRST,EVERY,DEPTH

For a QUICK REFERENCE on TRIGGERING refer to  http://webspherepundit.com/?p=1699

######################################################################################
######################################################################################

Example 1
Trigerring Scenario : To start the http process on a First message put in the Queue

Assumption
a) The http process can be started an stopped using mqm user ( the method to stop/start http as mqm is not covered in this tutorial .. may be for some other day
NOTE : It can be any process/script which you want to start , I used it to get the proper understanding of starting a process using trigerring
b) Your queue manager is created and started
NOTE : create a queue manager : crtmqm QMC01
Start the queue manager : strmqm QMC01

Step1 : Start the queue manager QMC01
As user mqm .. start the queue manager QMC01

bash-3.2$ strmqm QMC01

Step2 : Launch the MQSC prompt for the queue manager QMC01 using runmqsc

bash-3.2$ runmqsc QMC01

mqtriggering1

Step3 : Initiation Queue : Create an Initiation queue which the trigger monitor process will monitor

DEFINE QL(TRIGGER.INITIATION.QUEUE) like SYSTEM.DEFAULT.INITIATION.QUEUE

mqtriggering2

Step4 : Local Queue with Trigerring: Define a Local queue where you want the triggering to be set

NOTE : We will set the MODE as FIRST ie on the First message which the queue receives the trigger will be enabled and for the subsequent message the trigger will not be fired

DEFINE QLOCAL(TRIGGER.Q) TRIGGER TRIGDPTH(1) TRIGTYPE(FIRST) INITQ(TRIGGER.INITIATION.QUEUE) PROCESS(TRIG.PROCESS)

mqtriggering3

Step5 : Process Definition : Define the Process which needs to be started by the trigger
In this case its ‘/etc/init.d/httpd start’

DEFINE PROCESS (‘TRIG.PROCESS’) APPLTYPE(UNIX) APPLICID(‘/etc/init.d/httpd start’)

mqtriggering4

 

Complete Sample

mqtriggering5

Testing for Example 1
Step1 :  Stopping httpd as mqm to simulate the testing

mqtriggering6

Step2 : Check the Message depth of the Trigger Queue .. it will be zero now

bash-3.2$ echo “DISPLAY QL(TRIGGER.Q) CURDEPTH TRIGGER ” | runmqsc QMC01

mqtriggering7

Step3 :  Start the MQ triggering Process which will monitor the initiation queue

bash-3.2$ runmqtrm -m [QMGR Name] -q [INITIATION QUEUE] 

It can be run in the background using

bash-3.2$ runmqtrm -m [QMGR Name] -q [INITIATION QUEUE]  &

mqtriggering43

runmqtrm can be run as a service too in MQ & It will be covered later in this blog

bash-3.2$ runmqtrm -m QMC01 -q TRIGGER.INITIATION.QUEUE

mqtriggering8

Step4 :
Open another Putty session and Put the Message to the TRIGGER.Q and see the response of the runmqtrm on the other session
Put a message in TRIGGER.Q using ./amqsput TRIGGER.Q 

mqtriggering9

Step5 :  Check the TRIGGER.Q depth count it will be 1

bash-3.2$ echo “DISPLAY QL(TRIGGER.Q) CURDEPTH TRIGGER ” | runmqsc QMC01

mqtriggering10

Step6 : Check the http process .. it should be started now using ps –ef | grep http

mqtriggering11
######################################################################################
######################################################################################

Example 2
Trigerring Scenario : Enable triggering to start a unix script with a receipt of a message

In this example we will be running a script instead of starting a process with trigerring set for FIRST( ie On the arrival of the first message )

Step1 :  Create a test script as per the sample below  (It can be any script of your choice)
This script will use amqsgbr output and send it to a  file /var/mqm/script.log

Create a script file testscript.sh

bash-3.2$ vi /var/mqm/testscript.sh
############################
echo `date` >> /var/mqm/script.log
/opt/mqm/samp/bin/amqsgbr TRIGGER.Q QMC01 | grep “[1-9] <” >> /var/mqm/script.log
echo “==========================” >> /var/mqm/script.log
############################

mqtriggering12

Step2 :  Change the permission to make it executable

bash-3.2$ chmod 755 /var/mqm/testscript.sh

Step3 :  Testing the script : Test this script works

bash-3.2$ cd /opt/mqm/samp/bin
bash-3.2$ ./amqsput TRIGGER.Q QMC01
Sample AMQSPUT0 start
target queue is TRIGGER.Q
This is Script TestSample AMQSPUT0 end
bash-3.2$bash-3.2$ /var/mqm/testscript.sh
bash-3.2$
bash-3.2$ tail -f /var/mqm/script.log
Thu Jun 11 12:47:23 IST 2015

mqtriggering13

Enabling Triggering to run this script

Now that we know the script works , Put it for triggering

Step1 : We will use the same example1 only we will alter the process definition with APPLICID(‘ /var/mqm/testscript.sh’)
we will alter APPLICID(‘/etc/init.d/httpd start’)”  with  APPLICID(‘ /var/mqm/testscript.sh’)  

ALTER PROCESS (‘TRIG.PROCESS’) APPLTYPE(UNIX) APPLICID(‘/var/mqm/testscript.sh’)


mqtriggering14

Step2 : Check the Queue Depth of Trigger Queue .. IT should be “Zero”

bash-3.2$ echo “DISPLAY QL(TRIGGER.Q) CURDEPTH TRIGGER ” | runmqsc QMC01 | grep CURDEPTH


mqtriggering15

Step3 : Run the “runmqtrm” command

bash-3.2$ runmqtrm -m QMC01 -q TRIGGER.INITIATION.QUEUE

Testing for Example 2

NOTE: use ./amqsget TRIGGER.Q or CLEAR TRIGGER.Q to clear the messages in  TRIGGER.Q before starting the test 

Step1: Put a message in the TRIGGER.Q

mqtriggering16

Step2 : View the runmqtrm console

mqtriggering17

Step3 : Tail the script has run by seeing the logs

mqtriggering18

 

Now even if we put more messages in the Queue TRIGGER.Q the trigger will only happen once ( ie the First message ie when the Queue Depth goes from Zero to One .

For eg : The initial queue depth of “TRIGGER.Q” is zero .. Then I put 3 messages in it

mqtriggering20

mqtriggering22

But with the runmqtrm  we see that the script only ran only ONCE.

mqtriggering21

mqtriggering23

With this we have simulated a situation wherein the only the first message to a queue ( Queue depth Zero to One)  will trigger the  script to run 

######################################################################################

######################################################################################

Example 3

Trigerring Scenario : We will Test the Trigerring method for EVERY Message instead of the FIRST message entering the Trigger queue.
I will use the same object created in the previous Example 2 

bash-3.2$  runmqsc QMC01

Step1 : Alter the Definitions of the TRIGGER.Q with  TRIGTYPE(EVERY)

ALTER QLOCAL(TRIGGER.Q) TRIGGER TRIGDPTH(1)  TRIGTYPE(EVERY) INITQ(TRIGGER.INITIATION.QUEUE) PROCESS(TRIG.PROCESS)

mqtriggering24

Step2 : Run the runmqtrm for the Initiation Queue

bash-3.2$ runmqtrm -m QMC01 -q TRIGGER.INITIATION.QUEUE

 Testing for Example 3

Step1 : Check the Current Depth of the TRIGGER.Q its “Zero”
NOTE: use ./amqsget TRIGGER.Q or CLEAR TRIGGER.Q to clear the messages in  TRIGGER.Q

mqtriggering26

Step2 :Clear the script logs

mqtriggering27

Step3 :Put 4 messages using amqsput TRIGGER.Q . So if our configurations are corrent for each message the trigger monitor will execute the testsctipt.sh

mqtriggering28

Step4 :Check the output of the trigger ie runmqtrm. You will see for each message the testscript.sh is run

mqtriggering29

Step5 : Check the Logs to ensure the script has run for each trigger

bash-3.2$ tail -f /var/mqm/script.log


mqtriggering30

bash-3.2$ echo “DISPLAY QL(TRIGGER.Q) CURDEPTH TRIGGER ” | runmqsc QMC01 | grep CURDEPTH

######################################################################################

######################################################################################

Example 4
Trigerring Scenario : We will test the triggering for the Depth of the Queue ie when the QUEUE Depth reaches the defined setting a triggering should be fired

We will use the same Example 2 for this test 

Step1 : Clear the queue TRIGGER.Q of the messages

bash-3.2$ ./amqsget TRIGGER.Q QMC01
bash-3.2$ >/var/mqm/script.log

mqtriggering32

 

Step2 : Alter the Queue definitions for TRIGDPTH(3) TRIGTYPE(DEPTH)

ALTER QLOCAL(TRIGGER.Q) TRIGGER TRIGDPTH(3) TRIGTYPE(DEPTH) INITQ(TRIGGER.INITIATION.QUEUE) PROCESS(TRIG.PROCESS)

mqtriggering33

Step3 : Run the runmqtrm for the Initiation Queue

bash-3.2$ runmqtrm -m QMC01 -q TRIGGER.INITIATION.QUEUE

Testing for Example 4

Step1 : Put 3 messages in the Queue TRIGGER.Q .. Observe that until we put 3 messages in the TRIGGER.Q the triggering is not fired

 

mqtriggering35

 

Step2 :The trigger is run only one when the Queue Depth reaches 3 messages
Check the output of the script which writes to the logs script.log to ensure that the script has run only once when the Depth is 3 

mqtriggering38

 

One thing to observe is that once the triggering is fired for TRIGTYPE( DEPTH) the triggering is disabled for the Queue

Here we can see that the Triggering is disabled “NOTRIGGER”  onces the triggering is fired

mqtriggering39

We need to enable TRIGGERING Again for the TRIGGER.Q as below

bash-3.2$ echo “ALTER QLOCAL(TRIGGER.Q) TRIGGER ” | runmqsc QMC01


mqtriggering40

 

NOTE : An Application can use MQSET within it to re-enable the Triggering the QUEUE

######################################################################################

######################################################################################

Runmqtrm as a SERVICE

Instead of running runmqtrm from the putty prompt , A better way to runmqtrm is as a service
Step1 : Define Service

DEFINE SERVICE(TRIGMON) CONTROL(QMGR) SERVTYPE(SERVER) +
STARTCMD(‘+MQ_INSTALL_PATH+bin/runmqtrm’) +
STARTARG(‘-m +QMNAME+ -q SYSTEM.DEFAULT.INITIATION.QUEUE’) +
STOPCMD(‘+MQ_INSTALL_PATH+bin/amqsstop’) +
STOPARG(‘-m +QMNAME+ -p +MQ_SERVER_PID+’) STDOUT(‘/tmp/TrigMon.stdout’) +
STDERR(‘/tmp/TrigMon.stderr’)


mqtriggering44

Step2 :Start the Service

START SERVICE(TRIGMON)

mqtriggering45

Step3 :View the Services attributes

DISPLAY SVSTATUS(TRIGMON)


mqtriggering46

mqtriggering48
Step4 : Notice that the output files defined for the trigger monitor are created:

STDOUT(‘/tmp/TrigMon.stdout’)
STDERR(‘/tmp/TrigMon.stderr’)

Step5 : List the OutPut files

bash-3.2$ ls -lt /tmp/Trig*
-rw-r–r– 1 mqm mqm 239 2014-03-20 13:18 /tmp/TrigMon.stdout
-rw-r–r– 1 mqm mqm 0 2014-03-20 13:18 /tmp/TrigMon.stderr

 

bash-3.2$ cat /tmp/TrigMon.stdout
5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED.
03/20/2014 01:18:24 PM : WebSphere MQ trigger monitor started.
__________________________________________________
03/20/2014 01:18:25 PM : Waiting for a trigger message

At this point, notice that the trigger monitor has not handled any messages yet:

 

 

To get automated mail updates of my Posts..
Please subscribe to the site http://webspherepundit.com
And also like the Facebook Page
https://www.facebook.com/webspherepundit

 

Different ways to find the Version of WAS

There are various ways to check the versions of the WebSphere Application Server Installation
1.Executing VersionInfo.sh
2.Executing genVersionReport.sh
3.Using Wsadmin scripting command
4.Using Admin console
5.Viewing SystemOut.logs

Method 1 : Executing VersionInfo.sh

VersionInfo.sh script within the bin directory will give following details
> Version of the WAS
> Bit type ie 32 bit or 64 bit
> Installation Path
> Architecture  etc

a) Navigate to the bin directory of the WAS_HOME path
[root@mercury bin]#cd /opt/IBM/WebSphere/AppServer/bin

b) Execute ./versionInfo.sh from the bin folder

[root@mercury bin]#./versionInfo.sh

versionInfo

c) View the Output to find the Version Details of the WAS ..

d) Use “#./versionInfo.sh -long ” to get detailed output . It will include the fixes , ifixes etc

e) Use “#./versionInfo.sh -help” to get the other options for avaliable with versioninfo

Here in the below example the version is highlighted in Yellow .
I have installed Websphere ND v8.0.0.5 with 32 Bit

 

Method 2 : Executing genVersionReport.sh
The genVersionReport command uses the versionInfo command to generate the versionReport.html report file in the current working directory. The report includes a list of installed fix packs and interim fixes. VersionReport.html  can be opened with any borwser

a) Navigate to the bin directory of the WAS_HOME/bin path
[root@mercury bin]#cd /opt/IBM/WebSphere/AppServer/bin

b) Execute genVersionReport.sh from the <WAS_HOME>/bin directory

[root@mercury bin]# ./genVersionReport.sh
genVersionInfo

c) It will create a file versionReport.html in the bin directory as shown below
genVersionInfo1

d) Open the versionReport.html using a browser

genVersionInfo2

Highlighted in Yellow is the Version viz Websphere ND v8.0.0.5 with 32 Bit

 

Method 3 : Using Wsadmin scripting command
The version details of WAS Installation can be found using the wsadmin commands too..

a) Navigate to the <profile_home>/bin directory
[root@mercury bin]# cd /opt/IBM/WebSphere/AppServer/profiles/wp_profile/bin

b) Get the Cell Name, Node Name and Server Name of the JVM server
[root@mercury bin]# cd /opt/IBM/WebSphere/AppServer/profiles/wp_profile/config/cells/mercuryCell/nodes/
mercuryNode/servers/WebSphere_Portal

In My Example its as follows
Cell Name :
mercuryCell
Node Name :mercuryNode
Server Name : WebSphere_Portal

c) Execute the wsadmin.sh and provide the necessary credentials
[root@mercury bin]# ./wsadmin.sh

d) Set the Server Variable using the Cell , Node and Server Name from above step
wsadmin>set server [$AdminControl completeObjectName cell=CellName,node=NodeName,name=ServerName,type=Server,*]

For Eg
wsadmin>set server [$AdminControl completeObjectName cell=mercuryCell,node=mercuryNode,name=WebSphere_Portal,type=Server,*]

Output of the command WebSphere:name=WebSphere_Portal,process=WebSphere_Portal,platform=proxy,node=mercuryNode,
j2eeType=J2EEServer,version=8.0.0.5,type=Server,mbeanIdentifier=cells/mercuryCell/nodes/
mercuryNode/servers/WebSphere_Portal/server.xml#Server_1358966625559,cell=mercuryCell
,spec=1.0,processType=UnManagedProcess

versionInfo2

e) After the Server Variable is set , Execute the $AdminControl getAttribute $server serverVersion to get the server Version.

wsadmin>$AdminControl getAttribute $server serverVersion

versionInfo3

The Output is similar to VersionInfo.sh which is Websphere ND v8.0.0.5 and its 32 Bit

f) Some More commands to get the Platform Version and the Server Status
wsadmin>$AdminControl getAttribute $server platformVersion

versionInfo4

wsadmin>$AdminControl getAttribute $server state

 

Method 4 : Using Admin console
a) Login to the WAS admin console
b) Click on the Welcome link on the left side

WAS_VersionInfo

WAS_VersionInfo1

Here we can see the versions

c) Alternatively we could get the version from Product Information link
1) Navigate to Application servers > serverName .
Here my server name is “WebSphere_Portal”

2) Click on Runtime tab
WAS_VersionInfo2
c) On the Runtime tab there is a link on the right Side “Product Information ” Link

WAS_VersionInfo3

d) Click on Application servers > WebSphere_Portal > Product Information > Product Report

WAS_VersionInfo4
Here we will get the version Details of the WAS Version : Websphere ND v8.0.0.5 

 

Method 5 : Viewing SystemOut.logs
The Version of the WAS is also visible in the SystemLogs
When Ever a systemOut.log is created it appends the few parameters in the starting of the file
>Websphere Version and Build
>Host Operating System
>Java version
>was.install.root etc

a) Navigate to the Logs folder of the Websphere JVM process <profile_root>/logs/<serverName>

[root@mercury]# cd /opt/IBM/WebSphere/AppServer/profiles/wp_profile/logs/Websphere_Portal

b) View the starting few lines  of the systemOut.log using vi or head or more command

Tail_VersionInfo

c) Here we can see the version details of the WAS ie
WebSphere Platform 8.0.0.5 [ND 8.0.0.5 cf051243.01]

 

 

 

To get automated mail updates of my Posts..
Please subscribe to the site http://webspherepundit.com
And also like the Facebook Page
https://www.facebook.com/webspherepundit

 

| Websphere MQ |

=================================================================
List of Topics for Websphere MQ 
=================================================================

 

 

 

Mqconfig: Check Kernal Parameter needs for MQ

The mqconfig command is run to verify the system configuration matches or exceeds that which is required by IBM MQ. The configuration values are minimum values, and large installations might require values greater than those checked by this command.

1) When i ran mqconfig before Installing MQ ,  these were the failures for the Kernal Paramater

mqinstall9
2) You need to modify these Parameters which are failed

Run the below commands to check the values of the Semaphores paramaters

a) These parameters can only be changed with a root or a superuser .
b) These changes also may affect the other applications which are running on that Node. These needs to be concurred by the other application owners if any
#cat /proc/sys/kernel/shmmni
#cat /proc/sys/kernel/shmall
#cat /proc/sys/kernel/shmmax
#cat /proc/sys/kernel/sem
#cat /proc/sys/fs/file-max

For eg
mqinstall10
3) To Modify these values as per the MQ recommendations , Log on as a user with root authority.

4) Open the file /etc/sysctl.conf with a text editor, then add or change the following entries to the values shown
a ) #vi /etc/sysctl.conf
b) Enter the below parameters in this file and Save and Exit
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 268435456
kernel.sem = 500 256000 250 1024
fs.file-max = 524288

c) To load these sysctl values immediately, enter the command
#sysctl -p
Capture12
4) Maximum open files : ie “nofiles
If the system is heavily loaded, you might need to increase the maximum possible number of open files.
Issuing the following command to check the current set value
cat /proc/sys/fs/file-max

a) Edit the /etc/security/limits.conf files
b) Add the below values in the limits.conf
mqm soft nofile 10240
mqm hard nofile 10240

Capture13
5) Maximum Process : ie “nproc
a) A running WebSphere MQ queue manager consists of a number of thread programs, and each connected application will increase the number of threads running in the queue manager processes.
b)  You should ensure that the maximum number of processes which the mqm user is allowed to run is not restricted .
c) Set
nproc for the mqm user to 4090 or more.
d) Edit the /etc/security/limits.d/90-nproc.conf to increase the nproc limit for all users .You can also set it for specific user too ..
mqm soft nproc 4090

6) ReRun the mqconfig.sh to check the all the kernal paramaters are Passed

mqinstall16

7) Once all the paramaters are sucessful you could proceed with the installation of the MQ on these nodes

NOTE : These are the basic kernal values you need for MQ . But these may vary based on your application load and usage . So you may have to do a Trial and Error method to arrive at an appropriate value . but in most of the cases these values suffice

 

 

 

 

To get regular mail updates on my Posts..
Please subscribe to the site http://webspherepundit.com
And also like the Facebook Page
https://www.facebook.com/webspherepundit