Friday, 25 April 2014

IBM WebSphere Application Server V8.5 lab - Basic Liberty profile administration using the job manager

Scenario

You are a system administrator responsible for managing web application server installations. An application developer has asked you to deploy a Liberty profile installation to two different hosts in a first-level test environment. You decide to use the WebSphere Application Server Network Deployment V8.5 job manager to remotely deploy and administer the Liberty profile installations.

Goals

During this lab, you will do these tasks:

- Use the job manager to remotely deploy and manage a basic Liberty profile installation.
- Use the job manager to generate a merged web server plug-in configuration for multiple Liberty profile servers and set up IBM HTTP Server to use the merged plug-in configuration.


Thursday, 24 April 2014

How to get rid of smart quotes in OS X Mavericks!

I was getting cross with TextEdit in OS X Mavericks this afternoon, as it kept automatically converting single ( ' ) and double ( " ) quotes in my text.

Given that I'm then pasting this text into Terminal sessions, causing issues such as: -

wsadmin>AdminTask.registerWithJobManager('[-host rhel6.uk.ibm.com -port 9943 -user jobadmin -password passw0rd]')
Traceback (innermost last):
  (no code object) at line 0
  File "<input>", line 1
AdminTask.registerWithJobManager('[-host rhel6.uk.ibm.com -port 9943 -user jobadmin -password passw0rd]')
                                 ^
SyntaxError: Lexical error at line 1, column 34.  Encountered: "\u2018" (8216), after : ""

Thankfully, this blog post came to my rescue: -


Thanks to Scott Shaffer for his help :-)

Book Review - Testing Cloud Services:How to Test SaaS, Paas and IaaS

As per my earlier post: -


As per previous book reviews: -



working in association with the British Computer Society (BCS), I've just completed this book: -


http://www.polteq.com/wp-content/uploads/2013/10/Testing-Cloud-Services-150x191.png

and here's what I think: -

This book is presented as being pertinent to those considering the deployment of IT services in the cloud, via one of a number of engagement models, including: -
  • Software-as-a-Service (SaaS)
  • Platform-as-a-Service (Paas)
  • Infrastructure-as-a-Service (IaaS)
Whilst the book fully delivers upon its promise, I'd personally suggest that it's relevant to anyone with a responsibility for, or even an interest in, the testing of information systems.

At ~180 pages cover-to-cover, it provides a brief, and very easy to read, guide to the core aspects of testing, from the role of the test manager, through identifying, managing and mitigating risk by testing, to the aspects of a system that one should be testing.

Of course, given the subject, it also provides a very useful introduction to, and overview of, the currently available cloud solutions. Whilst remaining product and vendor neutral, it uses commonly available services, such as Amazon, Dropbox and hosted email, to provide the reader with context.

As a consultant with a deep interest in the functional AND non-functional aspects of any information system, including those delivered fully or partially via the cloud, this was an extremely useful reference to the aspects of testing, regardless of where the target system is.

Specifically, non-functional aspects such as availability, performance, resilience and security are more than adequately covered here. Whilst not claiming to cover absolutely every single non-functional requirement, the book gives a good grounding in why these measures matter.

From the preface and introduction, it's clear that the authors, Kees Blokland, Jeroen Mengerink and Martin Pol have considerable combined experience of software testing. This experience clearly translates across to the reader, whilst, as mentioned previously, showing no particular bias to their employer,Polteq, or to any particular vendor / solution / methodology.

In conclusion, this is an excellent book, providing the reader with a good grounding in the current crop of cloud-based solutions and services, whilst providing an extremely useful instruction in the art of testing.

For me, this book rates as 10 out of 10, as it provides the reader with all that is needed to get up-to-speed with the cloud and, more importantly, with systems testing.

Hope this is of some help.

Friday, 18 April 2014

Oracle DB - Broken, now Fixed

So I managed to break my Oracle 11g database, and have now fixed it.

The symptom was that, although Oracle was started, it wasn't really started.

I kept getting "Connected to an idle instance" and "ORA-01034: ORACLE not available" as per the following: -
 
sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 18 19:53:56 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> SELECT owner, table_name FROM dba_tables where owner like 'IBMBUSSP';

SELECT owner, table_name FROM dba_tables where owner like 'IBMBUSSP'

*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


A quick Google search later, I found this: -


which said, in part: -

ORA-01034 is thrown during the attempt to upgrade because there is an invalid entry in one of the following files:

• /etc/oratab
• /var/opt/oracle/oratab
...

As root, I checked for oratab: -

locate oratab

/etc/oratab
/home/oracle/app/oracle/product/11.2.0/dbhome_1/install/oratab


so I did a quick compare/contrast: -

diff /etc/oratab /home/oracle/app/oracle/product/11.2.0/dbhome_1/install/oratab

1c1
< orcl:/home/oracle/app/oracle/product/11.2.0/dbhome_1/:Y
---
> orcl:/home/oracle/app/oracle/product/11.2.0/dbhome_1:Y


Can you spot the difference ?

Yes, the trailing slash character …

A quick edit ( using vi of course ) of /etc/oratab later, plus a reboot to ensure that Oracle started cleanly and …. c'est voila

sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 18 19:59:41 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> SELECT owner, table_name FROM dba_tables where owner like 'IBMBUSSP';

OWNER        TABLE_NAME
------------------------------ ------------------------------
IBMBUSSP        NAVNODE_LOD
IBMBUSSP        NAVNODE_DD
IBMBUSSP        NAV_TREE
IBMBUSSP        COMMUNITY_DEF
IBMBUSSP        ACL
IBMBUSSP        SPACENODE
IBMBUSSP        SPACENODE_LOD


Do you want to know the worst bit ??

Yes, I hit the same problem back in March 2013: -


Tuesday, 15 April 2014

CWMCB0046E seen during the bootstrap of an IBM BPM Advanced 8.5.0.1 environment

Whilst bootstrapping a new IBM BPM 8.5 environment: -

cd /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin
./bootstrapProcessServerData.sh -clusterName BPM85Advanced.AppCluster

I kept seeing: -

com.ibm.bpm.config.util.ConfigException: CWMCB0046E: The command failed.

Caused by: com.lombardisoftware.expimp.ExportImportException: PreparedStatementCallback; SQL [insert into LSW_RESOURCE_BUNDLE_KEY (RESOURCE_BUNDLE_KEY_ID,VERSION_ID,AKEY,VALUE,GUID,LAST_MODIFIED,RESOURCE_BUNDLE_ID,LAST_MODIFIED_BY_USER_ID) values (?,?,?,?,?,?,?,?)]; Error for batch element #1: DB2 SQL Error: SQLCODE=-1476, SQLSTATE=40506, SQLERRMC=-964, DRIVER=4.11.69; nested exception is com.ibm.db2.jcc.am.SqlTransactionRollbackException: Error for batch element #1: DB2 SQL Error: SQLCODE=-1476, SQLSTATE=40506, SQLERRMC=-964, DRIVER=4.11.69

Caused by: org.springframework.dao.ConcurrencyFailureException: PreparedStatementCallback; SQL [insert into LSW_RESOURCE_BUNDLE_KEY (RESOURCE_BUNDLE_KEY_ID,VERSION_ID,AKEY,VALUE,GUID,LAST_MODIFIED,RESOURCE_BUNDLE_ID,LAST_MODIFIED_BY_USER_ID) values (?,?,?,?,?,?,?,?)]; Error for batch element #1: DB2 SQL Error: SQLCODE=-1476, SQLSTATE=40506, SQLERRMC=-964, DRIVER=4.11.69; nested exception is com.ibm.db2.jcc.am.SqlTransactionRollbackException: Error for batch element #1: DB2 SQL Error: SQLCODE=-1476, SQLSTATE=40506, SQLERRMC=-964, DRIVER=4.11.69

Caused by: com.ibm.db2.jcc.am.SqlTransactionRollbackException: Error for batch element #1: DB2 SQL Error: SQLCODE=-1476, SQLSTATE=40506, SQLERRMC=-964, DRIVER=4.11.69

com.ibm.bpm.config.util.ConfigException: com.ibm.bpm.config.util.ConfigException: CWMCB0046E: The command failed.

Thankfully, Google came to my rescue, with this blog post: -


which had me update two DB2 logging parameters: -

db2 update db cfg for BPMDB using LOGSECOND 40
DB20000I  The UPDATE DATABASE CONFIGURATION command completed successfully.

db2 update db cfg for BPMDB using LOGFILSIZ 2048
DB20000I  The UPDATE DATABASE CONFIGURATION command completed successfully.

Once done, the bootstrap went through smooth as silk: -

./bootstrapProcessServerData.sh -clusterName BPM85Advanced.AppCluster

Bootstraping data into cluster BPM85Advanced.AppCluster

WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode.
0
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/system-toolkit.twx
deploy: false
latestSystemToolkit: true
activateSnapshot: false
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/system-coaches.twx
deploy: false
latestSystemToolkit: false
activateSnapshot: false
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/system-dashboards.twx
deploy: false
latestSystemToolkit: false
activateSnapshot: false
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/governance-toolkit.twx
deploy: false
latestSystemToolkit: false
activateSnapshot: false
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/content-integration-toolkit.twx
deploy: false
latestSystemToolkit: false
activateSnapshot: false
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/ssi4bpm-guided-workflow.twx
deploy: false
latestSystemToolkit: false
activateSnapshot: false
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/process-portal.twx
deploy: true
latestSystemToolkit: false
activateSnapshot: false
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/saved-search-admin.twx
deploy: true
latestSystemToolkit: false
activateSnapshot: false
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/standard-hiring-sample.twx
deploy: true
latestSystemToolkit: false
activateSnapshot: false
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/advanced-hiring-sample.twx
deploy: false
latestSystemToolkit: false
activateSnapshot: false
importFile: /opt/IBM/WebSphere/AppServer/BPM/Lombardi/imports/procurement-sample.twx
deploy: false
latestSystemToolkit: false
activateSnapshot: false
'BootstrapProcessServerData admin command completed successfully.....'

I will be thanking the blog post's author :-)

Interesting exception seen whilst starting IBM Business Process Manager 8.5.0.1

So I saw this exception: -

[15/04/14 19:25:40:071 BST] 00000001 WsServerImpl  E   WSVR0009E: Error occurred during startup
com.ibm.ws.exception.RuntimeError: Exception while verifying the datasource version: failed to get stardard DB version by jndi jdbc/PerformanceDB

( Yes, that's correct - it did say stardard DB version !! )

This occurred whilst I was starting the Support cluster of an IBM BPM 8.5.0.1 Advanced environment.

From a bit of digging about, it looks like I failed to completely create the required databases schemata, tables etc.

It looks like I had at least one missing table - LSW_SYSTEM_SCHEMA.

Once I ran the appropriate scripts to create the Performance Data Warehouse (PDW) DB schemas: -

db2 -tvf createSchema_Advanced.sql 

I was able to validate the existence and contents of the missing table: -

DB2 "SELECT PROPVALUE FROM LSW_SYSTEM_SCHEMA WHERE PROPNAME = 'DatabaseSchemaVersion' "

which now returns: -

PROPVALUE                                                                                                                                                                                              
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8.5.0                                                                                                                                                                                                  

  1 record(s) selected.


Now the cluster starts nicely, which is nice.

Memo to self - remember to create all the database objects, not just the containers themselves :-)

Monday, 14 April 2014

Issues with BPMDeleteSnapshot and BPMSnapshotCleanup commands in IBM Business Process Manager (BPM)

This Flash from IBM Support was released today: -


Because issues have been discovered with the BPMDeleteSnapshot and BPMSnapshotCleanup commands, these commands require the interim fixes that are listed in the Content section. Do not use these commands without applying all of the interim fixes for your release. 

The snapshot deletion commands do not delete all of the related artifacts, which potentially leads to issues when you subsequently install or import snapshots. The fixes address the completeness of the deletion and repair previous deletions as needed.


Please review the article, and apply the relevant iFixes for BPM 7.5.1.2, 8.0.1.2 and 8.5.0.1.

Note to self - Firefox and local connections

 Whilst trying to hit my NAS from Firefox on my Mac, I kept seeing errors such as:- Unable to connect Firefox can’t establish a connection t...