+ All Categories
Home > Documents > Installing the WebSphere Plugin

Installing the WebSphere Plugin

Date post: 02-Jun-2018
Category:
Upload: srinivasraja
View: 269 times
Download: 0 times
Share this document with a friend

of 39

Transcript
  • 8/11/2019 Installing the WebSphere Plugin

    1/39

    Installing the WebSphere Plug-in with Apache

    Configuring Apache HTTP Server V2.2 - background This topic describes how to change configuration settings for Apache HTTP Server Version 2.2.

    Install Apache 2.2 and the latest version of the Web server plug-ins for WebSphere ApplicationServer 7.0 using the UpdateInstaller.

    Apache HTTP Server v2.2 is different from IBM HTTP Server (powered by Apache). When youinstall the Web server plug-ins for WebSphere Application Server on a non-iSeries system, thePlug-ins installation wizard configures the Web server.

    This topic describes how to configure the Apache HTTP Server Version 2.2 Web server. Other procedures in Editing Web server configuration files describe configuring other supported Webservers.

    Note:

    If you are using an Apache HTTP Server that supports 64-bit addressing, you must use the 64-bitCD provided with the WebSphere Application Server product to install the Apache Web server

    plug-in binaries. If you use the 32-bit CD, you will receive an error message indicating that the plug-in binaries did not load.

    If you are using an Apache HTTP Server that supports 32-bit addressing, you must use the 32-bitCD provided with the WebSphere Application Server product to install the Apache Web server

    plug-in binaries. If you use the 64-bit CD, you will receive an error message indicating that the plug-in binaries did not load.

    A sample error message follows:

    httpd: Syntax error on line XXX of /home/apache/conf/httpd.conf: Cannot load/home/apache/Plugins/mod_was_ap22_http.sl into server: Invalid argument

    The plug-in was tested with the threaded worker multi-processing module (MPM) on all platforms except Windows. The plug-in was tested with the default threaded MPM on Windows.

    The plug-in works with the Apache 2.2 prefork MPM but works best with the worker MPM. The plug-in maintains connection pools to backend WebSphere Application Servers and uses in-memory caching. These plug-in functions perform most efficiently when Apache is configured touse a single child process with the ThreadsPerChild value equal to the MaxClients value. The

    plug-in can be used with the prefork MPM or the worker MPM that is configured with multiplechild processes, but at reduced efficiency.

    Compatibility Statement The plug-in works with versions of the Apache HTTP Server that claimfull binary compatibility with Apache 2.0.47 and later, which are built with compilers andcompiler options that are compatible with those used to build the plug-in.

  • 8/11/2019 Installing the WebSphere Plugin

    2/39

    Perform the step that configures Apache 2.2 for your operating system.

    Examples and messages are shown on more than one line for clarity. Place each directive in aWeb server configuration file on one line.

    Local file path means a file path to the plugin-cfg.xml file on an Application Server that is on thesame machine as the Web server. Remote file path means the file path to the plugin-cfg.xml filewhen the Application Server is on a remote machine. The Plug-ins installation wizard installs adummy plugin-cfg.xml file during installation, but this file requires periodic propagation fromthe real file on the Application Server machine.

    The node_name in the following Application Server local file paths is web_server_name_nodefor a stand-alone Application Server or managed_node_name for a managed node.

    The name of the Web server definition in the following steps is webserver1.

    [AIX] Configure entries in the httpd.conf file.

    Use the following examples of the LoadModule and the WebSpherePluginConfig directives asmodels for configuring your file:

    LoadModule

    was_ap22_module /usr/IBM/WebSphere/Plugins/bin/mod_was_ap22_http.so

    Local distributed example:

    WebSpherePluginConfig

    profile_root/config/cells/

    dmgrcell/nodes/managednode/servers/webserver1/plugin-cfg.xml

    [Linux] [Solaris] Configure entries in the httpd.conf file.

    Use the following examples of the LoadModule and the WebSpherePluginConfig directives asmodels for configuring your file:

    LoadModule

    was_ap22_module /opt/IBM/WebSphere/Plugins/bin/mod_was_ap22_http.so

    Local distributed example:

    WebSpherePluginConfig

  • 8/11/2019 Installing the WebSphere Plugin

    3/39

    profile_root/config/cells/

    dmgrcell/nodes/managednode/servers/webserver1/plugin-cfg.xml

    [Solaris] On the Solaris SPARC 64-bit platform, the Plug-ins installation wizard installs both 32-

    bit and 64-bit versions of the plug-in for Apache 2.2, however it configures the Web server touse the 32-bit plug-in only. If the Web server is 64-bit, you need to configure the LoadModuledirective in the httpd.conf file to use the 64-bit plug-in as follows:

    LoadModule

    was_ap22_module /usr/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap22_http.so

    [HP-UX] Configure entries in the httpd.conf file.

    Use the following examples of the LoadModule and the WebSpherePluginConfig directives as

    models for configuring your file:

    LoadModule

    was_ap22_module /opt/IBM/WebSphere/Plugins/bin/mod_was_ap22_http.sl

    Local distributed example:

    WebSpherePluginConfig

    profile_root/config/cells/

    dmgrcell/nodes/managednode/servers/webserver1/plugin-cfg.xml

    [Windows] Configure entries in the httpd.conf file.

    Use the following examples of the LoadModule and the WebSpherePluginConfig directives asmodels for configuring your file:

    LoadModule was_ap22_module

    drive:\IBM\WebSphere\Plugins\bin\mod_was_ap22_http.dll

    Local distributed example:

    WebSpherePluginConfig

    profile_root\config\cells\

    dmgrcell\nodes\managednode\servers\webserver1\plugin-cfg.xml

  • 8/11/2019 Installing the WebSphere Plugin

    4/39

    The Apache 2.2 Web server is reconfigured.

    The Plug-ins installation wizard installs the GSKIT SSL encryption library at the required levelif it is not installed. If you manually copy the plug-in to a new machine, you might not have therequired GSKIT libraries for encrypting back-end connections.

    After configuring a Web server, you can install applications on it. See the Applications section ofthe information center for more information.

    Steps 1. cd lin_x64_suppl/plugin

    2. ./install

    3. Skip docs step, Accept License, click Next

    4. Select Apache Web Server V2.2, then click Next

  • 8/11/2019 Installing the WebSphere Plugin

    5/39

    5. If Apache and Was plug are installed on the same machine as the DM, and cluster nodes thenchoose local. For multiple Apache instances ie to be used with a load balancer then you would dothis for [n] Apache nodes.

  • 8/11/2019 Installing the WebSphere Plugin

    6/39

    /opt/IBM/WebSphere/Plugins

    /var/apps/was7nd_apache/plugins

  • 8/11/2019 Installing the WebSphere Plugin

    7/39

    /opt/IBM/WebSphere/AppServer

    /var/apps/was7nd

  • 8/11/2019 Installing the WebSphere Plugin

    8/39

    Select node01 profile.

    Note: On a vertical cluster ie all nodes are on same physical machine and we have only oneapache server on same machine then we only need actual set of plug-in binaries for apache. If

    Apache is on 2 machines then we install it twice. We also need to manually create web serverdefinitions for all nodes in the cluster.

  • 8/11/2019 Installing the WebSphere Plugin

    9/39

    /opt/IBM/HTTPServer/conf/httpd.conf

    /etc/httpd/conf/httpd.conf

  • 8/11/2019 Installing the WebSphere Plugin

    10/39

  • 8/11/2019 Installing the WebSphere Plugin

    11/39

    /var/apps/was7nd_apache/plugins/config/webserver01/plugin-cfg.xml

  • 8/11/2019 Installing the WebSphere Plugin

    12/39

  • 8/11/2019 Installing the WebSphere Plugin

    13/39

    Restart the deployment manager as the wizard has created a web server definition (web server01)and needs to be picked up. Note : we could have done this web server definition manually inWAS admin console..

    Best to restart Apache to check it is ok.

    LoadModule was_ap22_module /var/apps/was7nd_apache/plugins/bin/64bits/mod_was_ap22_http.so WebSpherePluginConfig /var/apps/was7nd_apache/plugins/config/webserver01/plugin-cfg.xml

    Are added to httpd.conf file. You can see that the actual plugin binaries are located/var/apps/was7nd_apache/plugins and could be anywhere, maybe even located near apache install if you want.

    Lets log into the admin console to see the webserver01 definition.

  • 8/11/2019 Installing the WebSphere Plugin

    14/39

  • 8/11/2019 Installing the WebSphere Plugin

    15/39

    Save, before we create another one , lets test it.

    Wizard breaks, need to update httpd.conf to correct location for mod_was_ap22_http.so

    #LoadModule was_ap22_module /var/apps/was7nd_apache/plugins/bin/64bits/mod_was_ap22_http.so LoadModule was_ap22_module /var/apps/was7nd_apache/bin/64bits/mod_was_ap22_http.so

    Process definitions

  • 8/11/2019 Installing the WebSphere Plugin

    16/39

    Use command:

    which apachectl

    To find where apache is installed

    You can use WAS variables like $(APCHE_INSTALL_ROOT}/bin/apachectl, but I am usingfull path as admins might not want to add WAS variables.

    Process definition

    /usr/sbin/httpd

    Start command

    /usr/sbin/apachectl

    Start command arguments

    -k start

    -f

    /etc/httpd/conf/httpd.conf

    Stop command

    /usr/sbin/apachectl

    /usr/sbin/apachectl

    -k stop

    -f

    /etc/httpd/conf/httpd.conf

    Working directory

    /usr/sbin/

  • 8/11/2019 Installing the WebSphere Plugin

    17/39

    Save changes and you should see that Apache process can be seen by web server definition. Youcannot stop and start due to bugs in WAS.

    Enable automated Web server configuration processing

    The service automatically generates the plug-in configuration file whenever the Webserver environment changes, with a few exceptions. For example, the plug-inconfiguration file is regenerated whenever one of the following activities occurs:

    A new application is deployed on an associated application server The Web server definition is saved An application is removed from an associated application server A new virtual host is defined

    In WebSphere Application Server, Network Deployment configurations, the plug-in

  • 8/11/2019 Installing the WebSphere Plugin

    18/39

    configuration file does not regenerate when: A cluster member is added to a cluster.TCP channel settings are updated for an application server.

    By default, this option is selected. Clear the field to disable automated Web serverconfiguration processing.

    Auto updating

    You can change the timing, but best to leave as default.. When scripting we can call commandsto do this.

  • 8/11/2019 Installing the WebSphere Plugin

    19/39

    Testing Install default application to get snoop servlet

  • 8/11/2019 Installing the WebSphere Plugin

    20/39

    Next past application setting screen and map modules to servers. The provides details for the plugi-cfg.xl file which us used to tell Apache of the clusters and server etc.

    Make sure all web modules are bound to both the cluster and the web server.

    Save installation. Note: ,you can also go back in to application settings and re-map modules toservers.

    Ensure that the cluster is started.

    Generate plugin

  • 8/11/2019 Installing the WebSphere Plugin

    21/39

    Result, the plugin-cfg.xml is updated with the URL paths for mapped applications and containcluster state.

    Then click Propagate

    Result, the plugin-cfg.xml is copied to the location that apache is looking for this file as specifiedin httpd.conf

    Restart Apache every time the Plugin is propagated

    cd /var/apps/was7nd_apache/plugins/webserver01 to see the plugin-cfg.xml has been updated

  • 8/11/2019 Installing the WebSphere Plugin

    22/39

  • 8/11/2019 Installing the WebSphere Plugin

    23/39

  • 8/11/2019 Installing the WebSphere Plugin

    24/39

    ServerIOTimeout="60" WaitForContinue="false">

  • 8/11/2019 Installing the WebSphere Plugin

    25/39

  • 8/11/2019 Installing the WebSphere Plugin

    26/39

    http://192.168.0.71:9082/snoop -> node01

    http://192.168.0.71:9083/snoop - >node01

    http://192.168.0.71/snoop

    First refresh for node see port below is 9082 which is node 01 cluster clone 01 (server 01)

    http://192.168.0.71:9082/snoophttp://192.168.0.71:9082/snoophttp://192.168.0.71:9083/snoophttp://192.168.0.71:9083/snoophttp://192.168.0.71/snoophttp://192.168.0.71/snoophttp://192.168.0.71/snoophttp://192.168.0.71:9083/snoophttp://192.168.0.71:9082/snoop
  • 8/11/2019 Installing the WebSphere Plugin

    27/39

    Second refresh on Apache produces port 9083 which is Node 02, cluster clone 02 (server 02)

  • 8/11/2019 Installing the WebSphere Plugin

    28/39

    Session Affinity (Sicky sessions)

    IgnoreAffinityRequests

    Specifies whether the plug-in ignores the number of affinity requests made to a serverwhen selecting servers based on the Round Robin algorithm. Specify zero or oneattribute for each ServerCluster. The value is true or false . If the value is set tofalse , the number of affinity requests made is also taken into account in the server

    selection process.

    The default value is true , which means the number of affinity requests made are notused in the Round Robin algorithm.

    Setting IgnoreAffinityRequestsBy default, when using Apache and Plugin, the JSESSIONID that you get remains for thatsession until application clears that session cookie ie logout or the browser gets closed or theserver fails over, however The plugin by default has IgnoreAffinityRequests="true" and we need to make this false.

  • 8/11/2019 Installing the WebSphere Plugin

    29/39

    After adding properties for the plug-in, Re-generate the plug-in-cfg.xml and propagate toApache.

    Session persistence

    Overview Some basic background on how WAS deals with sticky sessions.

    WAS plugin The WebSphere Plugin for Apache can detect fail over

    Detects failure in the WAS web container, then marks the web container as unavailable ie theURI set is changed.

    The request is then routed to the next available web container Of a clone in a cluster. Thus allof this requires WAS ND and clusters. As new cluster members (Clones) are added to the cluster,the plugin-cfg.xml files needs to be re-generated and propagated to Apache. These step areoutlines above.

    In-flight sessions can be persisted to a data base and can be replicated to other cloves viamemory-to-memory replication.

  • 8/11/2019 Installing the WebSphere Plugin

    30/39

    You set up persistence to save sessions in case of failure during access and replication ensuresthat once a session is failed ove r the sessions are available from the next clones web container

    High Availability of Sessions

    Session objects are volatile, and so are lost if the server fails or is restarted.

    There are two methods to provide session high availability i.e. persisted in the event

    of server failure. Database

    Session are stored in a session database Uses JDBC Greater overheard, but guaranteed . Memory-t0-memory replication

    Session are replicated to each server via the internal messaging provider

  • 8/11/2019 Installing the WebSphere Plugin

    31/39

  • 8/11/2019 Installing the WebSphere Plugin

    32/39

  • 8/11/2019 Installing the WebSphere Plugin

    33/39

    Creating a DB for session persistence How create a DB for session persistence and setup a JDBC data source as required.

    Create a Schema / Creating a table for session persistence

    To be verified

    You can use a database table to collect and store session data. If you are using a database tablefor session persistence, you must create and define a database table that is associated with theapplication server.

    Whenever the session manager is set for database persistence, the session manager creates a tablefor its use. If you want to expand the column size limits to make it more appropriate for yourWeb site, you can create the table externally. If the external table is specified as the target tablein the session manager database persistence configuration, then during the session manager startup, the external table is used. In most cases it is better to let the session manager create the table

    during startup.

    To create a table for collecting session data, do the following:

    For DB/2

    CREATE TABLE .sessions (

    ID VARCHAR(128) NOT NULL ,

    PROPID VARCHAR(128) NOT NULL ,

    APPNAME VARCHAR(128) NOT NULL,

    LISTENERCNT SMALLINT ,

    LASTACCESS BIGINT,

    CREATIONTIME BIGINT,

    MAXINACTIVETIME INTEGER ,

    USERNAME VARCHAR(256) ,

    SMALL VARCHAR(3122) FOR BIT DATA ,

    MEDIUM LONG VARCHAR FOR BIT DATA ,

    LARGE BLOB(2M)

  • 8/11/2019 Installing the WebSphere Plugin

    34/39

    )

    For Oracle:

    CREATE TABLE SESSIONS (

    ID VARCHAR(128) NOT NULL ,

    PROPID VARCHAR(128) NOT NULL ,

    APPNAME VARCHAR(128) NOT NULL,

    LISTENERCNT SMALLINT ,

    LASTACCESS INTEGER,

    CREATIONTIME INTEGER,

    MAXINACTIVETIME INTEGER ,

    USERNAME VARCHAR(256) ,

    SMALL RAW(2000),

    MEDIUM LONG RAW ,

    LARGE RAW(1)

    )

    If the Web container custom property UseOracleBLOB is set to true then:

    CREATE TABLE SESSIONS (

    ID VARCHAR(128) NOT NULL ,

    PROPID VARCHAR(128) NOT NULL ,

    APPNAME VARCHAR(128) NOT NULL,

    LISTENERCNT SMALLINT ,

    LASTACCESS INTEGER,

  • 8/11/2019 Installing the WebSphere Plugin

    35/39

    CREATIONTIME INTEGER,

    MAXINACTIVETIME INTEGER ,

    USERNAME VARCHAR(256) ,

    SMALL RAW(2000),

    MEDIUM BLOB,

    LARGE RAW(1)

    )

    Note:

    At run time, the session manager accesses the target table using the identity of the J2EE server inwhich the owning Web application is deployed. Any Web container that is configured to use persistent sessions must have both read and update access to the subject database table.

    HTTP session processing uses the index defined using the CREATE INDEX statement to avoiddatabase deadlocks. In some situations, such as when a relatively small table size is defined forthe database, DB2 may decide not to use this index. When the index is not used, databasedeadlocks can occur. If database deadlocks occur, see the DB2 Administration Guide for theversion of DB2 you are using for recommendations on how to calculate the space required for anindex and adjust the size of the tables that you are using accordingly.

    It might be necessary to tune DB2 to make efficient use of the sessions database table and toavoid deadlocks when accessing it. Your DB2 administrator should refer to the DB2Administration Guide for specific information about tuning the version of DB2 that you areusing.

    [Updated in February 2011] During run time, the session manager may create an entry in thedatabase for each web module of the application. This row of data is used internally for sessionmanagement purposes, such as in session invalidation. Do not be concerned with this entry. Itcan be overlooked. [Updated in February 2011]

    Create a Data source / J2C alias Create the appropriate setting in the servers environment settings

    Configuring a table for session persistence To configure a table for collecting session data, you must add the name of the table to the Webcontainer configuration properties.

  • 8/11/2019 Installing the WebSphere Plugin

    36/39

    If you are using database for session persistence, you must create and define a database table tothe application server to collect session data.

    To configure a table for collecting session data, use the administrative console to add the nameof this table to the Web container's configuration properties:

    Procedure 1. Open the administrative console.

    2. Click Servers > Server Types > WebSphere application servers.

    3. Select a server from the list of application servers.

    4. Under Additional Properties, click Web Container.

    5. Under Additional Properties, click Custom properties.

    6. Click SessionTableName to configure the DB2 table, or click New to create a new property.

    7. Specify 'SessionTableName' in the Name field if you are creating a new property. In the Valuefield, enter the name of the session table. The value must have the form,schema_name.table_name. For example, if the schema name is DB2ADMIN and the table nameis SESSIONS, enter DB2ADMIN.SESSIONS for Value. Optionally, you can update thedescription of this table in the Description field. For example, you might enter "Table name forHTTP session data."

    8. Click Apply > Save.9. When the product is restarted, the session management facility creates the new SESSIONStable in the specified tablespace.

    .to be verified

    How to configure session replication

    You can create a replication domain for memory only.

  • 8/11/2019 Installing the WebSphere Plugin

    37/39

    How to tune session replication Tips and settings on how to tune Memory-to-Memory session replication.

    Single replica

    o For every session there will be a copy stored on a different server/clone. This copy is thenused to failover when a server become unavailable.

    Domain

    o Sessions are copied to every member in the replication domain and every member has to storeall the copies from all other members, so performance can be an issue

    Specify

    o As the setting says, you can specify the number of replicas to use in the cluster. Replicas , thisway you can tune how may replicas of the session information exist.

  • 8/11/2019 Installing the WebSphere Plugin

    38/39

    Plug-in Administration Service Plug-in Administration Services is set by default, but good to check.

  • 8/11/2019 Installing the WebSphere Plugin

    39/39


Recommended