Running webMethods API Portal on Azure cloud environment

 Microsoft Azure provides Infrastructure as a service (IaaS) which is an instant computing infrastructure provisioned and managed over the Internet. We could host our webMethods API Portal as well in Azure infrastucture. 

Hostname

Fully Qualified names provided for the machines provisioned in Azure cloud environment are unusually long. This lengthy names were causing the loadbalancer component of API Portal fails to start.

C:\Windows\system32>hostname
IntegrationSrv

C:\Windows\system32>nslookup IntegrationSrv
Server: UnKnown
Address: 168.63.129.16

Name: IntegrationSrv.pasaei3nsfyu5dxsol0fgp3r3e.ax.internal.azurecloudapp.de
Address: 10.18.99.4

Load balancer runnable with API Portal will fail to start complaining the unusal lengthy name.

[Tue Nov 14 09:07:41.830 2017] [9844:5752] [error] jk_check_attribute_length::jk_util.c (830): Worker host name 'win2012R2.5rguh4zeuezezhsensiodl4qub.tx.internal.cloudapp.net' is 1 bytes too long, a maximum of 60 bytes is supported 

Problem

There is the limitation with the Apache HTTPD component used in API Portal. Hostname used by the Apache httpd workers can not exceed 60Bytes length. These workers are responsible for routing context based requests to corresponding MicroServices. Apache HTTPD will use the service registry to infer the hostname of different registered services.

So the solution would be to provide a shorter name for the hosts during serivce registration with Zookeeper component. 

Solution

We could easily fix this by reconfiguring apiportalbundle / loadbalancer runnables in API Portal. Using the reconfigure command below we are instructing to use the specific hostname(shorter one) rather than automatically inferring from the host. This shorter name will be used for the service registration with ZooKeeper for service discovery. 

stop apiportalbundle_s

stop loadbalancer_s

 
reconfigure apiportalbundle_s zookeeper.application.instance.host="IntegrationSrv" 

reconfigure loadbalancer_s zookeeper.application.instance.host="IntegrationSrv" 


start apiportalbundle_s

start loadbalancer_s

Hope this helps.

Cheers.

1 Like