Websydian v6.1 online documentationOnline documentation - Websydian v6.1

Deploying Web Server Component on WebSphere

Introduction

This document describes how to deploy and troubleshoot the Websydian Web Server Component on the IBM WebSphere Application Server 5.0 (WAS 6.1).

WebSphere is available for several different platforms and this document have been tested with iSeries as well as the Windows platform. The interface for Linux is the same so this document could also be used to deploy to WebSphere on Linux.

WAS 6.1 comes in an Express and an Advanced edition, and both versions are covered by this document.

This document does not describe the steps to be performed in order to install and setup the WebSphere Application Service. WebSphere Application Server is a product supplied and supported by IBM.

The Web Server Component is the component of the Distributed Websydian Architecture that forwards the requests to the Application Services. For further general information on the Web Server Component read this document.

Prerequisites

Before completing this deployment guide a number of issues have to be addressed.

WebSphere Application Server v6.1 or later installed and running

Use this matrix to insert the information required.

WebSphere Hostname or IP address
WebSphere Administrative Console TCP port  
WebSphere Application Server TCP port  
HTTP Server Hostname or IP address  
HTTP Server TCP port  

Package the Websydian Web Server Component

Follow the guide on how to package the servlet based Websydian Web Server Component. This will provide you with the WAR file used for deploying the Websydian Web Server Component.

Websydian Server deployed and running

Make sure that the Websydian Server has been deployed and is running.

For further information on deployment of the Websydian Server go to the main page of the DWA Deployment Guides.

Introduction to deployment of a servlet

When deploying a servlet all information pertaining the particular servlet is required to be packed into a Web Archive (WAR file). The WAR file is a packed file much like the ZIP file with a predefined structure that holds information about the servlet. The information range from information about the servlet name, parameters of the servlet,  URL to be used to the actual jar files containing the code of the servlet.

If you would like to see the contents of a WAR file rename it to a ZIP file and unpack it.

There are a large number of information pertaining the deployment of servlets on the J2EE environment and servlet engines. Often the J2EE server is supplied with a deployment tool for packaging the WAR files. Websydian is providing a small tool to package the Web Server Component with the correct information.

This deployment guide uses a WAR file to deploy the Websydian Web Server Component.

Deploy the Web Server Component WAR file to the WAS 6.1

The following section describes the steps to be performed in order to deploy the WAR file created in the previous section.

Before continuing make sure that the supplied demo servlet called snoop is running, this is a way of verifying that the WebSphere has been setup correctly and is running.

Open your internet browser and enter the following information http://yourwebsphere:port/snoop replacing yourwebsphere with the correct host name and the port with the correct port number of your WebSphere installation, this can be obtained from the person who installed your WebSphere Application Server..

After verifying the snoop servlet is running start the web administration interface of the WebSphere.

Open your internet browser and enter the following URL http://yourwebsphere:adminport/admin, replacing the yourwebsphere with the correct hostname and the adminport with the administration port specified by the person who setup the WebSphere.

Enter your user id, this information is only to identify yourself to the WebSphere administration console. Press the ok button.

In the left hand menu expand the menu item "Applications" and click the "Install New Application"

In the "Local path" input field enter the full path and name of the WAR file to be deployed.

In the "Context Root" input field specify the first part of the URL to be used. In the following example the context root is /websydian which will result in the Web Server Component being deployed will have /websydian as the first part of the URL.

Press the "Next" button to advance to the next display and keep pressing the "Next" button until a "Finish" button is available.

If the WAR file is not accepted please proceed to the section Troubleshooting the Web Server Component.

Press the "Finish" button.

Press the link "Save to Master Configuration"

Press the "Save" button to update the Master Configuration.

Expand the left hand menu item "Environment" and press the link "Update Web Server Plugin".

Press the OK button to update the "Web Server Plugin". The web server plugin is used by the http server to forward the URLs maintained by the WebSphere Application Server.

On the left hand menu select the link "Enterprise Applications" scoped under the Applications menu.

Mark the servlet war file that has just been deployed and press the "Start" button.

The RelayService is now ready to process requests. The RelayService is not initiated at this stage but will be when the first request is received.

Verify that the Web Server Component is working

The Web Server Component is now ready to receive the first request. As the Web Server Component receives the first request it will initiate and perform the following tasks:

  1. Read the property file specified
  2. Contact the Websydian Server information about available tokens and other license related parameters.
  3. Initialize the log file
  4. Start the command interface

 

In order to verify that the Web Server Component is functioning correctly perform the following step:

Troubleshooting the Web Server Component

Deployment of the WAR file

Error messages of the Web Server Component

Troubleshooting the Websydian Web Server Component is primarily based on the log file of the Websydian Web Server Component, a number of errors are also displayed in the browser window upon the first request.

The following is a list of most common errors:

Error message: [IO error]:Party: Error creating socket (java.net.ConnectException: Connection refused: connect)

The Websydian Server is not running or the parameters of the Websydian Web Server Component property file is not correct.

  1. Verify that the Websydian Server is running.
  2. Open the Websydian Web Server Component property file and identify and verify the parameters of websydianserver.ipaddr and websydianserver.tcpport. If localhost is specified for websydianserver.ipaddr change this to the correct IP address or computer name of the computer running the Websydian Server.
Error message: [Internal error]:PkaLog: File log could not be initialized - xxxxxxxxxxxxxxxxxx (The system cannot find the path specified)

Open the Websydian Web Server Component property file and identify the parameters of the setting servlet.log.file and verify that the parameter is correct. Also make sure that the user running the Websydian Web Server Component has the required authorization to create and update files in the specified directory.

Error message: [PkaError(Unclassified)]:Service name 'xxxxxxxxx' not known by Websydian Server

The Websydian Web Server Component has requested for information about an Application Service with a service name that does not exist in the Websydian Server.

Make sure that the Application Service is started, and that the service name stated in the Websydian Web Server Component property file and when starting the Application Service is similar, note that the service name is case sensitive.

Unable to get token

The message unable to get token can occur for a number of reasons:

Error message: [IO error]:ServerFactory(): Error creating stream (java.net.BindException: Cannot assign requested address: JVM_Bind).

This indicates that the parameter servlet.commandipaddr located in the Websydian Web Server Component property file is pointing to an IP address not located on the computer running the servlet engine. Make sure that the correct IP address or hostname is specified for this parameter.

Error message: [IO error]:ServerFactory(): Error creating stream (java.net.BindException: Address already in use: JVM_Bind)

This indicates that the parameter servlet.commandtcpport located in the Websydian Web Server Component property file is pointing to a TCP port that is already in use. Change the parameter to a port that is not in use.

Tuning the Websydian Web Server Component

The following list describes a number of issues that can help to provide better performance of the Websydian Web Server Component.