Bootstrap FreeKB - IBM WebSphere - Generate web server plugin (plugin-cfg.xml) using wsadmin
IBM WebSphere - Generate web server plugin (plugin-cfg.xml) using wsadmin

Updated:   |  IBM WebSphere articles

The web server plugin is used to create a communication channel between IBMs IHS web server and a WebSphere application server.

 

This assumes you have already done the following:

Generating the web server plugin creates/updates the plugin XML file (plugin-cfg.xml).

 


The following wsadmin command can be used to list the web servers that have been added to your deployment manager

~]$ /opt/WebSphere/AppServer/profiles/your_profile/bin/wsadmin.sh -lang jython -c "print AdminTask.listServers('[-serverType WEB_SERVER ]')"
WASX7209I: Connected to process "dmgr" on node your_node using SOAP connector;  The type of process is: DeploymentManager
WebServer01(cells/your_cell/nodes/your_node/servers/your_server|server.xml)
WebServer02(cells/your_cell/nodes/your_node/servers/your_server|server.xml)
WebServer03(cells/your_cell/nodes/your_node/servers/your_server|server.xml)

 

Then the following wsadmin command can be used to get the ID of the web servers plugin properties (plugin-cfg.xml), using the web server ID returned by the prior command.

/opt/WebSphere/AppServer/profiles/your_profile/bin/wsadmin.sh -lang jython -c "print AdminConfig.list('PluginProperties', 'myWebServer(cells/your_cell/nodes/myNode/servers/myWebServer|server.xml#Server_123456789)')"

 

Which should return something like this.

(cells/myCell/nodes/myNode/servers/myWebServer|server.xml#PluginProperties_1483544295379)

 

And then the following wsadmin command can be used to display the plugin properties for the web server, using the plugin properties ID returned by the prior command.

AdminConfig.showall('(cells/myCell/nodes/myNode/servers/myWebServer|server.xml#PluginProperties_1483544295379)')

 

Which should return something like this. Notice this example has PluginGeneration AUTOMATIC and PluginPropagation AUTOMATIC which means the plugin-cfg.xml file will be automatically generated and propagated.

[ASDisableNagle false]
[AcceptAllContent true]
[AppServerPortPreference HOSTHEADER]
[ChunkedResponse false]
[ConfigFilename plugin-cfg.xml]
[ESIEnable true]
[ESIInvalidationMonitor false]
[ESIMaxCacheSize 1024]
[IISDisableNagle false]
[IISPluginPriority HIGH]
[IgnoreDNSFailures false]
[KeyRingFilename plugin-key.kdb]
[LogFilename /opt/WebSphere/Plugins/logs/myWebServer/http_plugin.log]
[LogLevel ERROR]
[PluginGeneration AUTOMATIC]
[PluginInstallRoot /opt/WebSphere/Plugins]
[PluginPropagation AUTOMATIC]
[RefreshInterval 60]
[RemoteConfigFilename /opt/WebSphere/Plugins/config/myWebServer/plugin-cfg.xml]
[RemoteKeyRingFilename /opt/WebSphere/Plugins/config/myWebServer/plugin-key.kdb]
[ResponseChunkSize 64]
[VHostMatchingCompat false]
[pluginServerClusterProperties [[CloneSeparatorChange false]
[LoadBalance ROUND_ROBIN]
[PostBufferSize 0]
[PostSizeLimit -1]
[RemoveSpecialHeaders true]
[RetryInterval 60]]]
[properties []]

 

The following wsadmin command can be used to manually generate / re-generate the web server plugin.

AdminControl.invoke('WebSphere:name=PluginCfgGenerator,process=dmgr,platform=common,node=<your node>,version=<WebSphere version e.g. 8.5.5.21>,type=PluginCfgGenerator,mbeanIdentifier=PluginCfgGenerator,cell=<your cell),spec=1.0', 'generate', '[/opt/WebSphere/AppServer/profiles/your_profile/config <cell name> <web server name> <web server name> false]')

 


Validation

To verify that the plugin-cfg.xml file was successfully generated, you can check for event PLGC0052I in the deployment managers HPEL or SystemOut log.

PLGC0052I: Plug-in configuration file generation is complete for the Web server. yourCell01.yourNode.yourWebServer

 

You can view the plugin in the dmgr. The plugin-cfg.xml file should now have the context root of the app being requested, which is /beta in this example.

<UriGroup Name="default_host_yourCluster_URIs">
  <Uri Name="/beta/*"/>
</UriGroup>

 

In this example, URI /beta maps to the UriGroup named default_host_yourCluster_URIs. There should be a routing tag that contains the UriGroup, and this will list the cluster that the app is in, as well as the virtual host being used. You will want to ensure that the application resides in the cluster. Typically, virtual host "default_host" is used.

<Route ServerCluster="yourCluster" UriGroup="default_host_yourCluster_URIs" VirtualHostGroup="default_host"/>

 

You can also ensure that the ports listed for the default_host are the ports that the web server and WebSphere application server are using for the app.

<VirtualHostGroup Name="default_host">
  <VirtualHost Name="*:80"/>
  <VirtualHost Name="*:443"/>
  <VirtualHost Name="*:9080"/>
  <VirtualHost Name="*:9081"/>
  <VirtualHost Name="*:9443"/>
  <VirtualHost Name="*:9444"/>
</VirtualHostGroup>

 

 


After the web server plugin has been generated you would next propagate the plugin.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 506170 in the box below so that we can be sure you are a human.