+

Search Tips   |   Advanced Search

Configure an ODR to dynamically update the web server plug-in configuration

In a topology with a web server which forwards requests to an on demand router, the ODR can be set to dynamically generate and update plugin-cfg.xml. By configuring an ODR to dynamically update plugin-cfg.xml, we avoid manually updating the file during administrative actions, which can affect the content.

Each ODR can generate a plugin-cfg.xml file which includes all URIs that it can handle. The generated plugin-cfg.xml file can be configured to: all, cell, node, and server. The configuration scope determines which ODRs are included in plugin-cfg.xml, and therefore, what ODRs a web server forwards requests to. By default, plugin-cfg.xml includes only running ODRs.

The plugin-cfg.xml configuration scope can be:

An ODR configured to generate plugin-cfg.xml must be running in order for dynamic updates to occur. If a single ODR is configured to generate plugin-cfg.xml, and that ODR is stopped, plugin-cfg.xml is not regenerated until the ODR is restarted. Therefore, run plugin-cfg.xml generator as a highly available service.

The plugin-cfg.xml file is generated by an ODR process. Therefore the file is generated on the file system that hosts the generating ODR. For all, cell, and node, the default directory where the ODR generates plugin-cfg.xml is...

The default directory for server is...

The default generation directory can be overridden by setting a JVM system property on the generating ODR. To set the JVM system property, go to...

...and set...


Configure ODR to dynamically update the web server plug-in configuration

  1. In the administrative console, go to the On demand router settings page:

    • For stand-alone ODR processes, click...

        Servers > Server types > On demand routers > ODR_name > On demand router properties > On demand router settings

    • For a static cluster of ODR processes, click...

        Servers > Clusters > On demand router clusters > ODR_static_cluster_name > On demand router properties > On demand router settings

    • For a dynamic cluster of ODR processes, go to...

        Servers > Clusters > Dynamic clusters > ODR_dynamic_cluster_name > Server template > > On demand router properties > On demand router settings

  2. In the Proxy plugin configuration policy section, select the scope from the Generate plugin configuration drop-down list.

  3. Optional: In the Plugin config change script text box, enter an absolute path to a script.

    The script is invoked every time the plugin-cfg.xml is dynamically updated.

    • We can define multiple scripts to run after the plugin-cfg.xml is generated. The delimiter used to separate the path to each script is a semi-colon ( ; ). The scripts run in the order they are defined:

        /tmp/executeFirst.sh;/bin/executeSecond.sh

    • To automatically propagate the generated plugin-cfg.xml file, use the autoPropagate keyword in the Plugin config change script text box.

      Examples:

      • autoPropagate,*:*:*
      • /tmp/executeFirst.sh;/bin/executeSecond.sh;autoPropagate,*:*:*

    • To automatically propagate the generated plugin-cfg.xml file using the propagatePluginCfg.py script, enter the script in the Plugin config change script text box.

      Examples:

      • /opt/WAS/bin/wsadmin.sh -f /opt/WAS/bin/propagatePluginCfg.py -lang jython https://myIHSHost:8192 ihsusr ihsusrPassword /tmp/plugin-cfg.xml /opt/HTTPServer/plugins/config/webserver1/plugin-cfg.xml

      • /tmp/executeFirst.sh;/bin/executeSecond.sh;/opt/WAS/bin/wsadmin.sh -f /opt/WAS/bin/propagatePluginCfg.py -lang jython https://myIHSHost:8192 ihsusr ihsusrPassword /tmp/plugin-cfg.xml /opt/HTTPServer/plugins/config/webserver1/plugin-cfg.xml

  4. Click Apply, and save and synchronize the changes.

  5. Restart the ODR to generate a new plugin-cfg.xml file and to save changes.

The plugin-cfg.xml file is automatically generated every time the ODR starts, when there are administrative actions performed that impact what URIs the ODR handles, and when changes in the environment affect the content of plugin-cfg.xml. The ODR automatically updates plugin-cfg.xml when configuration changes occur.

If we are using an ODR server and if the web servers are running on managed nodes (a node agent is present on the web server system), disable the automatic generation and propagation of the web server plug-in. This ensures that we use the ODR server's plug-in file rather than the web server plug-in file. The reason is that the web servers automatically update their plugin-cfg.xml file when plug-in-related configurations occur in the environment. This has to be disabled because the plugin-cfg.xml file generated on the web servers directs requests directly to the application server environment rather than to the ODRs.

To disable automatic generation and propagation of the Web server plug-in, follow these steps:

  1. Go to...

      Servers > Web servers > Web_server_name > Plug-in properties

  2. Clear the check boxes...

    • Automatically generate the plug-in configuration file
    • Automatically propagate plug-in configuration file

  3. Click OK, and save the configuration.

This process does not apply to topologies that have enabled the web server for Intelligent Management.


What to do next

We can override the plugin-cfg.xml default attribute values automatically generated by the ODR.


Related:

  • Overview of request flow prioritization
  • Create and configure ODRs
  • Create ODRs
  • Generate the plug-in configuration in a high availability environment
  • Routing requests directly from a web server to a back-end application server
  • Intelligent Management: controlling the generation of plugin-cfg.xml