Num4 Ibm
Num4 Ibm
Data or
HTTP group PTFs. See the iSeries Net.Data Web site for updated information:
http://www.iseries.ibm.com/netdata
You should also refer to 7.3, “Net.Data: A ready-made scripting tool” on page 161.
Note: The HTTP Server (powered by Apache) does not support the -vi, -ve, and -vv
switches on server restart. If you are unable to end all server jobs, use the Trace TCP/IP
Application (TRCTCPAPP) command instead (see Figure 13-17).
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
The HTTP server trace can be set to operate at three different levels: error, information, and
verbose. User trace data for both parent and child helper jobs is automatically dumped as
soon as a failure condition is detected. The Dump User Trace (DMPUSRTRC) command is
otherwise used to direct trace output to the same database file while server jobs are still
active. Job name, number, and user profile for each one of your HTTP server jobs are
required. Trace output is dumped to file QAP0ZDMP in QTEMP in a member called
QP0Znnnnnn (where nnnnnn is the HTTP server job number you gave to the DMPUSRTRC
command).
-ve *ERROR Server startup only. Nothing else is recorded unless an error
occurs.
-vv *VERBOSE All the above plus application programming interface (API) and
module invocation, HTTP headers, error messages.
Here are three examples of how an HTTP server trace can be collected in different
environments:
A test environment, an ideal situation in which you have complete control over the server
A business-critical application, where the HTTP server is the core component of your On
Demand Business infrastructure and must be available at any time
Somewhere in between, a third scenario that fits in between the two extremes
A test environment
You are testing a stand-alone HTTP Server (powered by Apache) configuration that is not
working as you expected. The server stopped and you are ready to collect an HTTP trace.
1. Start the HTTP server with the -ve, -vi, or -vv option. Look for completion message
CPCA984 (see Figure 13-18) in the server job log for confirmation that the trace option
you specified was accepted.
Bottom
Press Enter to continue.
2. Reproduce the failure. Skip the next step if the server jobs already ended.
3. Stop the HTTP server.
342 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
4. Use the Work with Spooled Files (WRKSPLF) CL command or iSeries Navigator
(Operations Navigator for V5R1) to retrieve QZSRHTTPTR spooled files for the
QTMHHTTP user profile (see Figure 13-19).
Bottom
Parameters for options 1, 2, 3 or command
===> WRKSPLF SELECT(QTMHHTTP)
F17=Top F18=Bottom F21=Select assistance level F24=More keys
Figure 13-19 Work with All Spooled Files: Startup switch output
A business-critical application
The HTTP Server (powered by Apache) is a business-critical application running full time. It
cannot be stopped. You are experiencing occasional problems and need a server trace to
identify the source of your troubles.
1. Start the trace using the command:
TRCTCPAPP APP(*HTTP) SET(*ON) HTTPSVR(SERVERNAME) TRCLVL(*VERBOSE)
Select an appropriate level of information. Message CPC1129 (see Figure 13-21) is
posted to the server job log.
2. Reproduce the failure. Skip the next step if server jobs already ended.
3. Stop the trace with the command:
TRCTCPAPP APP(*HTTP) SET(*OFF)
Bottom
Parameters for options 1, 2, 3 or command
===>
F3=Exit F10=View 4 F11=View 2 F12=Cancel F22=Printers F24=More keys
Somewhere in between
You are developing an intranet application, but you constantly run into an error. The server
cannot be stopped, but you are free to choose your debugging options.
1. Start the trace using the command:
TRCTCPAPP APP(*HTTP) SET(*ON) HTTPSVR(SERVERNAME) TRCLVL(*VERBOSE)
Select an appropriate level of information. Message CPC1129 (see Figure 13-21) is
posted to the server job logs.
Bottom
Press Enter to continue.
344 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
3. At this point, you want to examine the data collected so far, but you still need to keep
tracing server activity. Retrieve job numbers for your HTTP server jobs and feed them to
the DMPUSRTRC command. Message CPCA986 is posted to your job log (see
Figure 13-22).
Bottom
Press Enter to continue.
4. Look for the file QAP0ZDMP in QTEMP. This file contains a QP0Znnnnnn member for
each one of the server job numbers (nnnnnn) you used in the DMPUSRTRC command.
Tips: Never forget to stop the trace with TRCTCPAPP APP(*HTTP) SET(*OFF) when it
is no longer needed. Also remember that you can access only the content of the
QTEMP library from your current session. It is discarded as soon as you sign off.
Tip: The iSeries HTTP Server (powered by Apache) does not support mod_status. This
simple module allows a Web administrator to take a picture of an Apache server and see
performance-related statistics that drill down to the work performed by each individual
thread.
mod_status was adjusted to work with the Apache 2.0 threaded server by the Apache
Software Foundation (ASF). However the fact that iSeries implements asynchronous
input/output (I/O) (see 10.2.1, “Threads and asynchronous I/O” on page 228) provides
complex challenges for implementing mod_status on the iSeries server.
Unique to the iSeries, HTTP server statistics are saved into collection services in V5R2.
The advantage on the iSeries server is that these reports can provide a more holistic view
of system performance. For example, it helps in situations where you may say, “Ah, I see
the reason that the HTTP Server (powered by Apache) is running so slow. That
programmer recompiled the entire LOB application again on the production server!”
As shown Figure 13-23, the Standard plus protocol profile (the default used by Collection
Services) automatically collects HTTP Server (powered by Apache) if Collection Services
detects this application server is active on the system. As with all Collection Services
“collection object data”, the new statistics are placed into the following files via the currently
available iSeries Navigator “Create performance database files” function or the OS/400
Create Performance Data (CRTPFRDTA) command:
QAPMHTTPB: Contains the basic data for HTTP Server (powered by Apache)
QAPMHTTPD: Contains detailed data for HTTP Server (powered by Apache)
HTTP data collection category to contain HTTP performance data for Collection Services.
The HTTP performance data can then be queried to analyze HTTP server activity and better
understand what types of HTTP transactions are being processed by the iSeries (for
example, static files, CGI, or Java Servlets).
In addition, V5R2 Performance Tools for iSeries, 5722-PT1, has new sections in the System
and Component Reports for HTTP statistics.
The types of data collected are broken down into the following ways. Note that this is per
server job and the statistics are shown for each interval and request type within the interval.
346 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
SR: Requests handled internally by the server itself. No program processing is necessary.
SL: Requests of all types received via SSL. Reports activity that occurred over an SSL
connection even though that activity is also reported with other applicable request types.
PX: Proxy requests.
CG: CGI requests.
WS: WebSphere requests.
JV: IBM Java Servlet Engine requests.
UM: Requests handled by user modules.
FS: Static requests handled by FRCA.
FX: Requests proxied by FRCA.
At this point, your HTTP Server (powered by Apache) server and related applications should
be up and running in a “steady state”. Collect the data for as long as you need.
When you are done collecting the data, stop Collection Services:
1. Right-click Collection Services and select Stop Collecting...
2. In the Stop Collection Services panel, click OK.
348 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
4. In the Print Performance Report - Sample data display (Figure 13-25), type option 1
(System report) to the left of the collection data member. Use the Date and Time columns
to make sure you select the correct one.
Library . . . . . . QMPGDATA
5. In the Select Sections for Report display, press F6 to print the entire report.
6. In the Select Categories for Report display, press F6 to print the entire report.
7. In the Specify Report Options display, enter a meaningful report title.
Tip: We like to copy this System Report title so we can paste it to the Component
Report title later. This allows us to match these pairs of reports in the future.
When the batch jobs finish, you should have two new spool files in OUTQ QPFROUTQ.
Figure 13-26 shows the output of the System Report.
Looking closely, you can tell via the SL Request Type (all requests handled under an SSL
connection) that all such requests were handled by some application running under a
WebSphere Application Server (WS Request Type). As defined on the next page, SL counts
also appear under another request type. You have to adjust to this accounting method to
know that actually 321 requests were received from browsers, not the 642 (2 x 321) shown as
total requests received and responses sent.
This example shows that no response was rejected or considered “in error”. High error or
reject values need to be investigated.
Note also the algorithm used when computing average K bytes per second. The Performance
Tools code knows that SL and WS values represent duplicates of each other. Using our 2
intervals example, we have 5K Bytes and 0K bytes per second transmitted averaged as 2K
bytes per second and 1K Bytes and 0K bytes per second received averaged as 0 K bytes per
second.
350 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
For more information
For further study of this topic, refer to the following resources:
The iSeries Information Center has a starting point for performance-related topics that
include the logging of information with iSeries Collection Services:
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahx/rzahxebushttp.htm
Two Redbooks deal with collection services at V5R1. They do not have specific
information about the HTTP Server (powered by Apache) information that is collected at
V5R2.
– Managing OS/400 with Operations Navigator V5R1 Volume 1: Overview and More,
SG24-6226
– Managing OS/400 with Operations Navigator V5R1 Volume 5: Performance
Management, SG24-6565
4xx Client error. They are sent to your 404 Not Found
browser window when the page The server is unable to find anything matching
you requested cannot be served. the client request. Also used for security
reasons when the requesting user should not
have access to a particular resource.
For more information about HTTP status codes and their meaning, refer to Request for
Comments (RFC) 2616 on the HTTP 1.1 protocol standard.
352 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
13.2.9 Communications trace
A communications trace is also a powerful tool for problem determination. It is useful for
gathering information about the connection status and response time, and if you are
experiencing troubles with the encoding of your files.
Here is a quick example of using a communications trace to all the IP datagrams received and
sent from the iSeries point of view. The 5250 communication trace commands used are:
Start Communications Trace (STRCMNTRC)
End Communications Trace (ENDCMNTRC)
Dump Communications Trace (DMPCMNTRC)
Print Communications Trace (PRTCMNTRC)
Delete Communications Trace (DLTCMNTRC)
This assumes that your configuration line object’s name is ETHLINE. Enter the commands
and perform the following actions in the order shown:
1. Enter the following command:
STRCMNTRC CFGOBJ(ETHLINE) CFGTYPE(*LIN) MAXSTG(256K) USRDTA(*MAX)
2. Start your HTTP Server (powered by Apache) and Web client and test your Web
application. Keep your work at a minimum to lessen the amount of data collected.
3. Enter the following command:
ENDCMNTRC CFGOBJ(ETHLINE) CFGTYPE(*LIN)
4. The next step is to output the trace information. You have two options:
– Print the trace in to a spooled file using the following command:
PRTCMNTRC CFGOBJ(ETHLINE) CFGTYPE(*LIN) CODE(*ASCII) FMTBCD(*NO)
This option prints the trace in MAC layer format. If you want to print, for example, a
trace in IP formatting for server port 80, you could enter the following command:
PRTCMNTRC CFGOBJ(ETHLINE) CFGTYPE(*LIN) CODE(*ASCII) FMTTCP(*YES) SLTPORT(80)
FMTBCD(*NO)
Note: The spooled file of the communications trace output contains on the right side
a so called eye-catcher. This is an area where all text in a trace is formatted in a
readable format. However, when using the PRTCMNTRC command with the options
as previously shown, all text, whether uppercase or lowercase, will be displayed in
the spooled file in uppercase. In certain situations, it is necessary to consider the
case. The following command flow creates a spooled file where case-sensitivity is
considered.
– The following commands create a spooled file where uppercase and lowercase
characters are displayed correctly in the eye-catcher area.
DMPCMNTRC CFGOBJ(ETHLINE) CFGTYPE(*LIN) TOSTMF('/barlen/trace01Oct04')
PRTCMNTRC FROMSTMF('/barlen/trace01Oct04') CODE(*ASCII) SLTPORT(80)
This example also formats the trace for IP and contains only data for port 80.
5. Enter the Work with Job (WRKJOB) command and select option 4 (Work with spooled files).
This is a fast way to find the spool file created by the PRTCMNTRC command.
6. Enter the following command:
DLTCMNTRC CFGOBJ(ETHLINE) CFGTYPE(*LIN)
For more information about how to take a communications trace, refer to IBM iSeries Support
Line Knowledge Base document TCP/IP Communications Trace Instructions, 23825849.
354 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
14
Highly available HTTP servers are not supported on versions prior to V5R1.
© Copyright IBM Corp. 2002, 2003, 2005. All rights reserved. 355
14.1 Highly available Web server cluster on the HTTP server
The Web server cluster solution can provide:
Planned downtime: If a Web server requires planned maintenance, it is possible to transfer
the work to another node without visible service interruptions to the client.
No unplanned downtime: If a machine fails, the work is transferred to another node with no
human involvement and without visible service interruptions to the client.
Scalability: When employing multiple nodes, it is possible to distribute the Web site
workload over the cluster nodes.
Clusters are a collection of complete systems that work together to provide a single, unified
computing capability.
A liveness monitor checks the state of the Web server. It interacts with the Web server and
the clustering resource services in the event that a Web server fails (failover), or a manual
switchover takes place (ensures no interruption of Web server services).
You can use the clustered hash table (part of the state replication mechanism) to replicate
highly available CGI program state data across the cluster nodes. That way the state data is
available to all nodes in the event that a Web server fails (failover) or is switched-over
manually (switchover). To take advantage of this capability, an existing CGI program must be
enabled in a highly available Web server environment. CGI programs write to the CGI
application programming interfaces (APIs) to indicate what data is replicated. See HTTP
Server for iSeries Programming, GC41-5435.
When the primary node fails (failover), or is brought down by the administrator, the
failover/switchover process begins. The following steps are performed during
failover/switchover:
1. One of the backup servers becomes the primary (the first backup in the switchover order).
2. Client requests are redirected to the new primary node. Assuming this client was not in the
process of running a persistent CGI application, the failover is completely transparent.
Tip: You can provide a high availability (HA) environment with two iSeries servers, each
with one instance of the HTTP Server (powered by Apache). Each of these instances
serves the identical (a copy) HTML and images and from identical (a copy) httpd.conf
configuration files. You can do this with a simple configuration. You do not need
third-party software. This is assuming, however, that you are not providing a HA
environment for your CGI application.
356 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
3. If the new primary receives a user request that belongs to a long-running-session (a CGI
program that is updated to be a highly available CGI program), the server restores the
request's state. The new primary retrieves that highly available CGI program's state
information from the clustered hash table. The clustered hash table is part of the state
replication mechanism.
Most non-HA CGI applications behave in the following manner:
a. The client clicks the Submit button to send a new request to the Web server and your
CGI application.
b. Your persistent CGI application “wakes up”. Its state information is saved in static
variables to determine what happened in the past with this client and what to do now.
Parameters found in the URL are parsed and actions are taken. New state information
is saved in the static variables for the next time this client returns to this iSeries server.
HTML code is generated and sent to standard out for presentation to the remote client.
c. The above “cycle” continues until the entire transaction is complete.
Most HA CGI applications behave in the following manner:
a. The client clicks the Submit button, which sends a new request to the Web server and
your CGI application.
b. Your persistent CGI application “wakes up”. Its state information is saved in the
clustered hash table. It reads from the clustered hash table and updates local variables
to determine what happened in the past with this client and what it must do now.
Parameters found in the URL are parsed and actions are taken. New state information
is written to the clustered hash table for the next time this same client returns to this (or
the backup) iSeries server. HA support ensures that the information written to the
clustered hash table on one iSeries server is replicated to the backup server. HTML
code is generated and sent to standard out for presentation to the remote client.
c. The above “cycle” continues until the entire transaction is complete.
4. After the failed node recovers, you can restart the highly available Web server instance,
which then becomes the backup system. If the system administrator wants the failed node
to become primary again, they must perform a manual switchover. They can accomplish
this with the IBM Simple Cluster Management interface available through iSeries
Navigator (Operations Navigator in V5R1), a 5250 CL interface, or a business partner tool.
Network
Client
iSeries Web
Server Cluster
State Replication
Mechanism
Backup Primary
When the primary node fails (failover), or a switchover takes place, the failover/switchover
process begins. The following steps are performed during failover/switchover:
1. One of the backup servers becomes the primary (the first backup in the switchover order).
2. The client requests are sent to the new primary node by the network dispatcher.
3. If the new primary receives a user request that belongs to a long-running-session, the
server needs to restore the request's state. The new primary searches for the state either
locally or in the clustered hash table. The clustered hash table is part of the state
replication mechanism.
4. After the failed node recovers, the system administrator can restart the Web server
instance and it becomes a backup Web server. If the system administrator wants the failed
node to become primary again, they must perform a manual switchover.
Note: A node can join a recovery domain as a primary only if the Cluster Resource Group
(CRG) is in inactive mode.
Network
Network Client
Dispatcher
State Replication
Mechanism
Backup Primary
Figure 14-2 High availability: Primary or backup with a network dispatcher model
358 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
14.1.3 Peer model
In this model, there is no declared primary node. All nodes are in an active state and serve
client requests. A network dispatcher, such as IBM WebSphere Edge Server, evenly
distributes requests to different cluster nodes. This guarantees distribution of resources in
case of a heavy load. Linear scalability is not guaranteed beyond a small number of nodes.
After some nodes are added, scalability can disappear, and the cluster performance can
deteriorate.
Network
Network Client
Dispatcher
State Replication
Mechanism
Server 1 Server 2
Figure 14-3 High availability: Peer model
In the event that one node fails (failover), the failed Web server traffic is routed to one of the
other operational Web servers according to the configuration of the network dispatcher.
They want the ability to seamlessly move all active clients to the backup server as24. And,
when the primary server as23 is brought back online, they want to move back seamlessly all
the clients.
Client
iSeries Web
Server Cluster
Backup: Primary:
as24.itsoroch.ibm.com as23.itsoroch.ibm.com
Network
Cluster Information:
Cluster: ITSOTEST Client
Nodes: AS23 and AS24 iSeries Web
Cluster Resouce Group: PBABASIC00 Server Cluster
State Replication
Mechanism
Backup: Primary:
iSeries host and domain: as24.itsoroch.ibm.com iSeries host and domain: as23.itsoroch.ibm.com
as24 'primary IP address': 10.5.92.38 as23 'primary IP address': 10.5.92.30
Clustered IP address: 10.5.92.51 Clustered IP address: 10.5.92.51
14.2.3 Assumptions
The software and hardware used in this scenario has the following characteristics:
We are using V5R2 of OS/400. This scenario can also be created for V5R1, but some of
the interfaces to iSeries clustering have changed.
If you plan to use iSeries Navigator and the Simple Cluster Management interface to
configure the cluster, you must install 5722-SS1 OS/400 Option 41 (HA Switchable
Resources). OS/400 Option 41 is not necessary if you plan on using the 5250 commands
to configure your cluster.
360 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
Both iSeries servers must have a routable IP address that is accessible from each other
server. This is shown in Figure 14-5 that as23 can PING 10.5.92.38 and as24 can PING
10.5.92.30.
Tip: Do not confuse these IP addresses on both iSeries servers with the clustered IP
address of 10.5.92.51. This clustered IP address is routable (that is, if a client on the
same subnet wants to communicate to this IP address, it uses ARP to resolve the MAC
address on the iSeries) but cannot be active on both systems at the same time.
14.2.4 How to
To configure the primary and backup servers in this scenario, perform the following tasks as
explained in the sections that follow:
Step 1: Validate system and TCP/IP settings on both iSeries servers
Step 2: Creating the HA cluster for ITSOTEST for nodes AS23 and AS24
Step 3: Adding HA clustering directives to both httpd.conf configurations
Step 4: Testing the primary and backup servers
Note: iSeries Navigator provides a simple graphical user interface (GUI) tool to manage a
cluster of iSeries servers. We chose to use a 5250 command entry in our configuration of
HA clustering on the iSeries at V5R2 because the CL commands that are provided offer
more features and choices not provided by the GUI. Be sure to make your own choice.
Tip: In addition the steps outlined in this section, you must review the Information Center’s
resources for clustering:
http://publib.boulder.ibm.com/html/as400/infocenter.html
On this site, select your version and language, and click GO! Search for “clusters”. The
document that helps you the most in this step is entitled “Cluster configuration checklist”.
Before you start, you need to validate and possibly modify some of the system and TCP/IP
configuration settings on both iSeries servers. These instructions demonstrate what is
needed on both systems by showing you what we did on as23. In your own environment, you
must perform these steps for both the primary and backup servers.
1. Ensure that clustering is enabled for both iSeries servers:
a. Enter the Display Network Attributes (DSPNETA) command. On this Display Network
Attributes display, page down until you see the value set for the Allow add to cluster as
highlighted in Figure 14-6. This value should be set to *ANY on both iSeries servers.
F3=Exit F12=Cancel
Figure 14-6 Primary or backup with IP takeover: Allow add to cluster should be *ANY
Tip: It may feel strange to create the same routable IP address on both iSeries. But, as
long as both are not active at the same time this is OK. It is the IP address takeover
feature of OS/400’s HA clustering that automatically allows only one of the iSeries
servers to have 10.5.92.51 active at one time. To be clear, you never manually make
10.5.92.51 active on either iSeries server. HA clustering’s IP takeover does this for you.
Available with V5R2 of OS/400 is a new feature called Virtual IP Address with proxy ARP
(VIPA with proxy Apache Portable Runtime (ARP)). This VIPA is routable in the same
subnet as the other IP addresses associated with the physical Network Interface Cards
(NIC) on your iSeries servers. VIPAs can provide extremely valuable fault tolerance for
situations where you have two or more NICs configured to all be in the same subnet on the
same iSeries. This scenario proceeds to create a clustered IP address on both iSeries as
VIPA with proxy ARP.
The added feature of fault tolerance (for a failure in a NIC) using the VIPA addresses is
detailed in iSeries IP Networks: Dynamic!, SG24-6718.
This scenario works equally well with new local area network (LAN) interfaces (rather than
the virtual IP addresses that we use) of 10.5.92.51 on both iSeries. These can be created
using 5250 commands such as Add TCP/IP Interface (ADDTCPIFC).
But, if you want HA for your Web server, you should follow up and implement VIPA with
proxy ARP as part of a total solution that includes fault tolerance for a failure in one of your
NICs.
a. Using iSeries Navigator create a VIPA with proxy ARP that will be the clustered IP
address on both iSeries servers. Start iSeries Navigator and connect to as23. Expand
Network →TCP/IP Configuration →IPv4.
Note: 5250 command entry cannot be used to create VIPA with proxy ARP in V5R2.
You must use iSeries Navigator.
362 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
Figure 14-7 Primary or backup with IP takeover: Changing the VIPA address to enable proxy ARP
3. Make sure that the loopback IP address 127.0.0.1 is configured and started on both
iSeries servers.
4. Make sure that the Internet Daemon (INETD) server is started on both iSeries servers:
a. Using iSeries Navigator, expand Network →Servers and then click TCP/IP. In the
panel on the right, a list of TCP/IP servers and their status (started or stopped) is
updated. Make sure the INETD server has the status of started.
b. If the INETD server has the status of stopped, right-click INETD and select Start.
Tip: Because INETD is needed for the proper operation of HA clustering on your
iSeries servers, we recommend that you change the properties of the INETD to
Start when TCP/IP is started.
5. Make sure that Liveness Monitor can run unimpeded in the QBATCH subsystem on both
iSeries servers. OS/400’s HA clustering uses a batch job to slow poll the primary server to
determine if this system is still available to the network. By default, this batch job is started
in QBATCH. You must ensure that the job queue for QBATCH is large enough to always
allow this job to run.
a. To check the QBATCH subsystem, use the 5250 command Display Subsystem
Description (DSPSBSD):
DSPSBSD SBSD(QBATCH)
Select option 6 (Job queue entries). As highlighted in Figure 14-8 on iSeries as23, the
maximum active jobs allowed in QBATCH is 4.
Figure 14-8 Primary or backup with IP takeover: Max Active for QBATCH showing 4
Step 2: Creating the HA cluster for ITSOTEST for nodes AS23 and AS24
You can perform the following steps on either iSeries server as23 or as24. For the purposes
of demonstration, we create the HA cluster ITSOTEST from as23.
Tip: The 5250 command GO CMDCLU provides a list of HA clustering commands that are
available.
1. On iSeries server as23, use the Create Cluster (CRTCLU) command to create the cluster
ITSOTEST and node AS23.
CRTCLU CLUSTER(ITSOTEST) NODE((AS23 ('10.5.92.30')))
The CRTCLU command should complete without errors.
2. To see the status of your newly created cluster ITSOTEST, enter the Display Cluster
Information (DSPCLUINF) command:
DSPCLUINF CLUSTER(ITSOTEST)
As shown in Figure 14-9, your cluster is created. Currently the cluster has one node. In our
case, this node is named AS23 and it has the active interface of 10.5.92.30.
Cluster . . . . . . . . . . . . . : ITSOTEST
Consistent information in cluster : *YES
Current cluster version . . . . . : 3
Current cluster modification level : 0
Configuration tuning level . . . . : *NORMAL
Number of cluster nodes . . . . . : 1
Detail . . . . . . . . . . . . . . : *BASIC
Potential
Node Mod Device
Node Status Vers Level Domain ------Interface Addresses
AS23 Active 3 0 *NONE 10.5.92.30
Figure 14-9 Primary or backup with IP takeover: Display cluster information showing one node AS23
364 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
3. Create the second cluster node AS24 by entering the Add Cluster Node Entry
(ADDCLUNODE) command (on iSeries server as23):
ADDCLUNODE CLUSTER(ITSOTEST) NODE(AS24 ('10.5.92.38'))
The ADDCLUNODE command should complete without errors.
4. To see the status of your newly created node AS24 in cluster ITSOTEST, enter the
DSPCLUINF command:
DSPCLUINF CLUSTER(ITSOTEST)
As shown in Figure 14-10, node AS24 is added to your cluster ITSOTEST.
Cluster . . . . . . . . . . . . . : ITSOTEST
Consistent information in cluster : *YES
Current cluster version . . . . . : 3
Current cluster modification level : 0
Configuration tuning level . . . . : *NORMAL
Number of cluster nodes . . . . . : 2
Detail . . . . . . . . . . . . . . : *BASIC
Potential
Node Mod Device
Node Status Vers Level Domain ------Interface Addresses
AS23 Active 3 0 *NONE 10.5.92.30
AS24 Active 3 0 *NONE 10.5.92.38
Figure 14-10 Primary or backup with IP takeover: Display cluster information two nodes: AS23, AS24
366 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
Figure 14-11 Primary or backup with IP takeover: Enabling HA for the PBABASIC00 server on as23
3. Display the httpd.conf configuration file to view three new directives that are added as
shown in Figure 14-12.
Figure 14-12 Primary or backup with IP takeover: Three new directives to support HA in PBABASIC00
4. Create an identical HTTP Server (powered by Apache) configuration and Web application
on your backup iSeries server as24. There are many ways to accomplish this. As a
high-level overview, we recommend this method:
a. Copy and paste the entire Web application’s HTML, GIFs, and other collateral from the
IFS on as23 to as24. Place these files in a similar directory structure.
b. Use the administrative GUI to create another PBABASIC00 HTTP Server (powered by
Apache) configuration on as24 using the same information found in Table 14-1.
c. Copy and paste the new HA directives from the PBABASIC00 httpd.conf configuration
file on as23 to as24.
5. Since this is a test, we took the liberty to make some minor modifications to the index.html
(home page) on both the primary as23 and backup as24 iSeries servers. We added the
text “Welcome to Primary” on server as23 and “Welcome to Backup” on server as24. We
did this so the client Web browser could see the difference when it is automatically and
seamlessly switched from the primary to the backup iSeries server. Otherwise, it is difficult
to tell. You can see the differences in the index.html file on both servers in Figure 14-13
and Figure 14-16 on page 370.
Tip: The CRG is not started because the backup server is still inactive. However, your
Web site is up and running on the primary, you see in the next step.
2. Verify that your primary server is up and running. From a Web browser, enter the URL:
http://10.5.92.51:8000
You should see your home page as shown in Figure 14-13. The modification we made to
the index.html file to say, “Welcome to Primary” to distinguish this page from the similar
one on the backup server.
Figure 14-13 Primary or backup with IP takeover: Primary server on as23 up and running
368 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
3. Start the backup HTTP server PBABASIC00 on as24. Using the administrative GUI, make
sure you select server PBABASIC00 on iSeries server as24 and then click Start. This
starts the HTTP Server (powered by Apache) PBABASIC00.
Tip: This does not start the IP address 10.5.92.51 on iSeries server as24. Only during
a failure of the primary iSeries server as23 does as24 take over and make active this IP
address.
4. Now that the backup server is started, this automatically creates and starts the CRG
PBABASIC00. To list all the CRGs in cluster ITSOTEST, enter the Display CRG
Information (DSPCRGINF) command:
DSPCRGINF CLUSTER(ITSOTEST) CRG(*LIST)
As highlighted in Figure 14-14, our CRG PBABASIC00 is active on primary node AS23.
Tip: Use the following 5250 command for even greater detail about the CRG:
DSPCRGINF CLUSTER(ITSOTEST) CRG(PBABASIC00)
Cluster . . . . . . . . . . . . : ITSOTEST
Cluster Resource Group . . . . . : *LIST
Consistent Information in Cluster: *YES
Number of Cluster Resource Groups: 2
Figure 14-14 Primary or backup with IP takeover: CRG PBABASIC00 is active on primary node AS23
5. Use the Change CRG Primary (CHGCRGPRI) command to switch the clustered
application PBABASIC00 from the primary node AS23 to the backup node AS24:
CHGCRGPRI CLUSTER(ITSOTEST) CRG(PBABASIC00)
The CHGCRGPRI command should complete without errors.
Tip: One of the major effects of this command is that iSeries server as24 does an IP
takeover of the IP address 10.5.92.51. That is, after the CHGCRGPRI command has
completed, the IP address 10.5.92.51 is inactive on server as23 and active on server
as24.
Cluster . . . . . . . . . . . . : ITSOTEST
Cluster Resource Group . . . . . : *LIST
Consistent Information in Cluster: *YES
Number of Cluster Resource Groups: 2
Figure 14-15 Primary or backup with IP takeover: CRG PBABASIC00 is active on primary node AS24
7. As a final confirmation, simply refresh the Web browser which still has
http://10.5.92.51:8000 for the URL. As shown in Figure 14-16, the Web client was
seamlessly moved to the backup HTTP server on iSeries as24. The only way you can
really tell from the client’s point of view is from the “Welcome to Backup” text we modified
in the index.html home page.
Figure 14-16 Primary or backup with IP takeover: Backup server on as24 ‘up and running’
The ability of the HTTP Server (powered by Apache) to take advantage of the iSeries HA
APIs is a powerful enhancement to the Apache server. This is another demonstration of the
integration that the Rochester lab has done to bring the Apache server to the iSeries server.
370 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
14.3 For more information
Highly available HTTP servers and iSeries clustering resources include:
HTTP Server: What’s new, which includes information about the 17 December 2001
Highly Available HTTP Server announcement
http://www.ibm.com/servers/eserver/iseries/software/http/news/sitenews.html
Documentation Center information about highly available Web servers
http://www-1.ibm.com/servers/eserver/iseries/software/http/docs/doc.htm
On this site, search for “high availability”.
High Availability and Clusters home page
http://www.ibm.com/servers/eserver/iseries/ha/
Clustering documentation in the iSeries Information Center
http://publib.boulder.ibm.com/html/as400/infocenter.html
On this site, select your version and language, and click GO! Then search for “clusters”.
The IBM Redbook Clustering and IASPs for Higher Availability on the IBM Eserver
iSeries Server, SG24-5194
Tip: It is interesting to note that some of the applications found on the iSeries Tasks page
have their graphical user interface (GUI) driven by Net.Data (for example the DCM). Others
have their GUI driven by servlet (for example the administration GUI for HTTP Server
(powered by Apache)). Because of this underlying difference, each handles national
language support (NLS) in a different manner!
© Copyright IBM Corp. 2002, 2003, 2005. All rights reserved. 373
15.1 Installing secondary languages
The GUI used to configure the HTTP Server (powered by Apache) can be installed in many
different languages. To use different languages, you must install the licensed product:
5722-DG1: If you need different languages for the administration GUI
5722-SS1, option *BASE and 3: For the initial iSeries TASK page
5722-SS1, option 34: For the Digital Certificate Manager (DCM)
5722-AC3: For the Cryptographic Service Provider
5722-JV1 Developer Kit for Java
Before we can work with different languages, we have to check if the licensed program is
installed and if it is installed in the needed language. To check this, follow these steps:
1. Enter the OS/400 command GO LICPGM and press Page Down.
2. You should now see the Work with Licensed Programs display (Figure 15-1). From here
choose option 20 (Display installed secondary languages) to check if any secondary
languages are installed.
Secondary Languages
20. Display installed secondary languages
21. Install secondary languages
22. Delete secondary languages
Redistribution
40. Create distribution media
41. Work with installation profiles
Completion Status
50. Display log for messages
More...
Selection or command
===>
374 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers
3. You now see the Display Installed Secondary Languages display (Figure 15-2). In our
case, 2924 (English) is the primary, and 2929 (German) is the secondary language. Enter
5 (Display installed Licensed Program) to see the installed licensed programs associated
with that secondary language.
Tip: You can find a national language feature code matching table on the Web at:
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm?info/rzahc/rza
hcnlvfeaturecodes.htm
4. In the Display Installed Secondary Language Licensed Programs display (Figure 15-3),
verify the Installed Status of the products. If any of these is in status *ERROR, try to
re-install the product or contact your local service representative.
Licensed Installed
Program Status Description
5722SS1 *COMPATIBLE OS/400 - Digital Certificate Manager
5722DG1 *COMPATIBLE IBM HTTP-Server
5722DG1 *COMPATIBLE Triggered Cache Manager
If the language ID is set to *SYSVAL (which is the default), the OS/400 system value
QLANGID is used to identify the desired language. To display the system value, use the
OS/400 command Display System Value (DSPSYSVAL SYSVAL(QLANGID)). You should
see the Display System Value display as shown in Figure 15-5.
In our case, this display shows ENU which means US - English. If you have some users that
need to work with other languages (for example German), you can change the Language
identifier parameter to DEU. The next time the user connects to any site pages served by
Net.Data on this iSeries server, they see them in German.
Tip: It is important to learn that if the Web pages are served by Net.Data, the iSeries
server examines the language settings of your browser. It only uses the information found
in either your OS/400 user profile or the default system value. For more information about
using the browser’s language settings to influence the national language chosen by the
iSeries, see the following section.
Tip: You have to restart the Admin instance after installing the secondary languages to
take advantage of the change.
376 IBM HTTP Server (powered by Apache): An Integrated Solution for IBM Eserver iSeries Servers