Tuesday, 21 August 2018

IBM BPM 8.5.6 - CWMCB0046E - Bootstrap failing

Working with my client to build out an IBM BPM Standard 8.5.6.0 CF2 Deployment Environment, we saw an exception whilst running the bootstrap process: -

/opt/ibm/WebSphere/AppServer/profiles/Dmgr01/bin/bootstrapProcessServerData.sh -clusterName AppCluster

which failed with: -
...
Bootstraping data into cluster AppCluster and logging into /opt/ibm/WebSphere/AppServer/profiles/Dmgr01/logs/bootstrapProcesServerData.AppCluster.log

WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode.

...
com.ibm.bpm.config.util.ConfigException: CWMCB0046E: The 'BPMImportOffline' command failed: Index: 0, Size: 0
...
com.ibm.bpm.config.util.ConfigException: com.ibm.bpm.config.util.ConfigException: CWMCB0046E: The 'BPMImportOffline' command failed: Index: 0, Size: 0
...
 
Thankfully, it was a relatively simple solution ….

I'd given the client a set of SQL scripts to create the three BPM schema - psuser, cmnuser and pdwuser - from my own environment; I'm using the same version of Oracle 12cR2 as they are.

This, it transpires, was a mistake !

I had not realised, despite having worked with BPM for 6 years, that the SQL scripts include the WAS and BPM users that one uses when one creates the Deployment Environment.

Ordinarily, that would NOT be a problem - assuming that everyone uses the Dave Hay convention of wasadmin and deAdmin respectively.

Guess what ….

My client, sensibly, chose to use DIFFERENT user names.

These two IBM documents showed me the error of my ways : -



To validate this, I checked my own environment: -

select * from psuser.LSW_USR_XREF;

   USER_ID USER_NAME
---------- ----------------------------------------------------------------
FULL_NAME
--------------------------------------------------------------------------------
PROVIDER
--------------------------------------------------------------------------------
      1002 DSManager1
DSManager1
uid=DSManager1,o=defaultWIMFileBasedRealm

      1003 DSUser1
DSUser1
uid=DSUser1,o=defaultWIMFileBasedRealm

   USER_ID USER_NAME
---------- ----------------------------------------------------------------
FULL_NAME
--------------------------------------------------------------------------------
PROVIDER
--------------------------------------------------------------------------------

 1 wasadmin
wasadmin
uid=wasadmin,o=defaultWIMFileBasedRealm

 9 deAdmin
deAdmin

   USER_ID USER_NAME
---------- ----------------------------------------------------------------
FULL_NAME
--------------------------------------------------------------------------------
PROVIDER
--------------------------------------------------------------------------------
uid=deAdmin,o=defaultWIMFileBasedRealm


select * from pdwuser.LSW_USR_XREF;

   USER_ID USER_NAME
---------- ----------------------------------------------------------------
PROVIDER
--------------------------------------------------------------------------------
 3 deAdmin


When I checked the raw source of those tables: -

cd /opt/ibm/WebSphere/AppServer/profiles/Dmgr02/dbscripts
fgrep -Ri deadmin *

PCCell1.De1/Oracle/orcl/psuser/createSchema_Standard.sql: 'deAdmin',
PCCell1.De1/Oracle/orcl/psuser/createSchema_Standard.sql: 'deAdmin') ; 


fgrep -Ri wasadmin *

PCCell1.De1/Oracle/orcl/psuser/createSchema_Standard.sql: 'wasadmin',
PCCell1.De1/Oracle/orcl/psuser/createSchema_Standard.sql: 'wasadmin') ; 

DECLARE
v_table_count NUMBER;
  BEGIN
   SELECT COUNT(*) INTO v_table_count FROM
    psuser.LSW_USR_XREF WHERE USER_ID = 9 ;
     IF (v_table_count = 0) THEN
      INSERT INTO
    psuser.LSW_USR_XREF("USER_ID",
 "USER_NAME",
 "FULL_NAME")
VALUES (9,
 'deAdmin',
 'deAdmin') ;

END IF ;
END ;

DECLARE
v_table_count NUMBER;
  BEGIN
   SELECT COUNT(*) INTO v_table_count FROM
    psuser.LSW_USR_XREF WHERE USER_ID = 1 ;
     IF (v_table_count = 0) THEN
      INSERT INTO
    psuser.LSW_USR_XREF("USER_ID",
 "USER_NAME",
 "FULL_NAME")
VALUES (1,
 'wasadmin',
 'wasadmin') ;

END IF ;
END ;


So the moral of the story ….

Whenever one creates a Deployment Environment, use the generated SQL scripts UNLESS you're 100% certain that the WAS/BPM users are the same …..

Doh!!!!

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...