Monday 5 December 2016

IBM BPM - Process Designer and the Mysterious Case of the Hostname

I saw this: -


and this: -

[05/12/16 19:29:23:233 GMT] 0000024b HttpProtocolH W com.ibm.bpm.endpoint.impl.strategies.HttpProtocolHostStrategy getEndpointUrl Unable to construct URL because servlet request argument was null
[05/12/16 19:29:23:274 GMT] 0000024b HttpProtocolH W com.ibm.bpm.endpoint.impl.strategies.HttpProtocolHostStrategy getEndpointUrl Unable to construct URL because servlet request argument was null
[05/12/16 19:29:23:335 GMT] 0000024b HttpProtocolH W com.ibm.bpm.endpoint.impl.strategies.HttpProtocolHostStrategy getEndpointUrl Unable to construct URL because servlet request argument was null
[05/12/16 19:29:23:356 GMT] 0000024b HttpProtocolH W com.ibm.bpm.endpoint.impl.strategies.HttpProtocolHostStrategy getEndpointUrl Unable to construct URL because servlet request argument was null
[05/12/16 19:29:23:409 GMT] 0000024b HttpProtocolH W com.ibm.bpm.endpoint.impl.strategies.HttpProtocolHostStrategy getEndpointUrl Unable to construct URL because servlet request argument was null
[05/12/16 19:29:23:487 GMT] 0000024b HttpProtocolH W com.ibm.bpm.endpoint.impl.strategies.HttpProtocolHostStrategy getEndpointUrl Unable to construct URL because servlet request argument was null
[05/12/16 19:29:23:510 GMT] 0000024b HttpProtocolH W com.ibm.bpm.endpoint.impl.strategies.HttpProtocolHostStrategy getEndpointUrl Unable to construct URL because servlet request argument was null
[05/12/16 19:29:23:534 GMT] 0000024b HttpProtocolH W com.ibm.bpm.endpoint.impl.strategies.HttpProtocolHostStrategy getEndpointUrl Unable to construct URL because servlet request argument was null


on a freshly-minted IBM BPM Process Center installation, when attempting to log into Process Designer from a remote Windows 7 box.

I know WHAT I did wrong; not sure precisely how, but I ended up with localhost in my BPMConfig properties file - Advanced-PC-ThreeClusters-DB2.properties :-

bpm.dmgr.hostname=localhost
bpm.de.node.1.hostname=localhost
bpm.de.db.1.hostname=localhost
bpm.de.db.2.hostname=localhost
bpm.de.db.3.hostname=localhost
bpm.de.db.4.hostname=localhost


This is an internal PoC, so, rather than rebuilding my Deployment Environment, I set out to "fix" the problem.

I suspect that it was related to the BPM Endpoints, that would've been misconfigured to use localhost rather than a real hostname.

In the context of these Endpoints, the ones that I'm specifically interested relate to the so-called EXTERNAL_CLIENT scenario, as described here: -


Therefore, I wrote this Jython script to resolve the problem: -

scenario='EXTERNAL_CLIENT'

bpmurlsid=AdminConfig.getid(dePath+'BPMURLS:/')
bpmurllist=AdminUtilities.convertToList(AdminConfig.list("BPMURL", bpmurlsid))
for item in bpmurllist :
  if AdminConfig.showAttribute(item,'scenario')==scenario : bpmurl=item

AdminConfig.modify(bpmurl,[['url','https://bpm855.uk.ibm.com:9443']])

AdminConfig.save()
AdminNodeManagement.syncActiveNodes()


which I then validated as follows: -

print AdminConfig.show(bpmurl)

which returns: -

[scenario EXTERNAL_CLIENT]
[strategies "com.ibm.bpm.endpoint.impl.strategies.WCCMConfigStrategy, com.ibm.bpm.endpoint.impl.strategies.HttpProtocolHostStrategy"]
[url https://bpm855.uk.ibm.com:9443]


Once I restarted the AppCluster, Process Designer just worked :-)

The moral of the story ? Get your hostnames RIGHT RIGHT RIGHT when building a Deployment Environment, but also know how to configure the BPM Endpoints, especially when adding web servers ( IBM HTTP Server ), load balancers etc.

No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...