Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Quick Start Guide Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A.
Copyright 2005 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers.
Contents 1 Quick Start 5 Variable Names and Default Paths 5 About Application Server Administration 6 Starting the Server 7 Starting the Domain Administration Server 7 ▼ To Start the Domain on Solaris and Linux 7 ▼ To Start the Domain on Windows 8 Logging in to the Admin Console 9 ▼ To Log In to the Admin Console 9 Examining the Log File 11 ▼ To View the Domain Administration Server Log File 11 Creating a Cluster 12 ▼ To Start the Node Agent 12 ▼ To Create a Cluster 12 Deploying an Application 15 ▼ To Depl
Starting Load Balancing 20 Verifying Load Balancing 20 ▼ To Verify Load Balancing Cleaning Up 21 22 ▼ To Uninstall Completely 22 ▼ To Remove the Sample Cluster Only Where to Go Next 2 23 24 Quick Start for Setting Up High Availability Failover About High Availability Clusters and HADB HADB Preinstallation Steps 26 ▼ To Configure Your System for HADB Installing HADB 27 28 ▼ To Install HADB Starting HADB 25 26 28 28 ▼ To Start HADB in a Java Enterprise System Installation on Solaris or
CHAPTER 1 Quick Start Welcome to the Quick Start Guide. This guide is for developers, system administrators, and Application Server administrators who are interested in learning about the capabilities of the Sun Java System Application Server 8.1 2005Q2 software. This guide describes basic and advanced steps for using Application Server. The steps are presented in the order that you should complete them.
Variable Name Description and Path install-dir By default, the Application Server installation directory is located here: ■ Solaris Java Enterprise System installations: /opt/SUNWappserver/appserver ■ Linux Java Enterprise System installations: /opt/sun/appserver/ ■ Windows Java Enterprise System installations: SystemDrive:\Sun\ApplicationServer ■ Solaris and Linux stand-alone Application Server installations, non-root user: user_home_directory/SUNWappserver ■ Solaris and Linux stand-alone Application Se
A domain is a collection of configuration data, deployed applications, and machines with a designated administrator. The domain definition describes and can control the operation of several applications, stand-alone application server instances, and clusters, potentially spread over multiple machines. When the DAS is installed, a default domain called domain1 is always installed. You work with the default domain in this guide.
Set the value of AS_ADMIN_USER to the admin user you specified when you installed the Application Server. For example, setenv AS_ADMIN_USER admin 3. Start the server by entering this command from the install-dir: asadmin start-domain domain1 When you are prompted for the admin password and the master password, enter the passwords that you provided during installation. 4. A message appears telling you that the Domain Administration Server is starting: Starting Domain domain1, please wait.
. When a command prompt window opens to prompt you for the admin password and the master password, enter the passwords that you provided during installation. A window appears with a message telling that you the server is starting: Starting Domain domain1, please wait. Log redirected to domain_dir\domain1\logs\server.log... When the startup process has completed, you see an additional message: Domain domain1 started. Press any key to continue ... 10. Press a key to close the message window.
Note – If a popup window appears with a message such as Website Certified by an Unknown Authority, click OK. This message appears because your browser does not recognize the self-signed certificate that the Domain Administration Server uses to service the Admin Console over the secure transmission protocol. 2. When the log in window appears, enter the admin user name and password. 3. Click Log In.
Examining the Log File Application Server instances and the Domain Administration Server produce annotated logs on the file system. By default, all errors, warnings or useful informative messages are logged. ▼ To View the Domain Administration Server Log File Steps 1. From the Common Tasks list in the right pane, click Search Log Files to launch a new browser window for Log Viewer. 2. In the Log Viewer window, select “server” from the Instance Name drop–down list and click Search.
Next Steps In this section you started the Domain Administration Server and confirmed that it is running. You also logged in to the Admin Console and used the Log Viewer. You can stop the Quick Start trail here if you do not wish to continue, or you can go on to the next section. Creating a Cluster This section, the second of three basic topics, explains how to create a cluster that contains two Application Server instances. For simplicity, the cluster runs completely within one machine.
spanning multiple machines and manage them with the help of the node agent process on each machine. In this guide, for simplicity, our sample cluster will be on one host, the same one where the Domain Administration Server is running. Before You Begin Steps You must have already started the node agent process on each machine, as described in previous section.
7. Click OK. The create process can take a few minutes. Note – This exercise requires automatically assigned port numbers for HTTP, HTTPS, IIOP and IIOPS. You can change them later, if desired. When the create process is completed, the Cluster Created Successfully page appears, and FirstCluster appears in the tree in the left pane. A copy of the configuration template default-config was made for this cluster, and the name FirstCluster-config was assigned to it. 8.
Note – By default, the HTTP ports are 38081 for i1 and 38080 for i2. If these ports were busy on your machine when you created these clusters, or if you had already assigned these ports to other instances and clusters, different port numbers were assigned. Next Steps In this section you have created a simple cluster on a single machine. You can also create clusters spanning multiple machines using the same basic steps (as long as you have the software installed and a node agent running on each machine).
7. Click OK. The clusterjsp application is now deployed to FirstCluster. ▼ Steps To Start the Cluster 1. In the tree on the left pane, click the FirstCluster node under Clusters. 2. In the right pane, click the General tab if it is not already active. 3. Click the Start Instances button to start the cluster. 4. Verify that it has started by checking that the Status field, which indicates what instances are running.
http://localhost:port/clusterjsp Replace the localhost variable with the name of the system that the Domain Admin Server is running on. Replace the port variable with the value of HTTP-LISTENER-PORT for i1. This example uses http://localhost:38081/clusterjsp. 2. Add some session attribute data. 3. Examine the Session and Host information displayed. For example: ■ ■ ■ ■ Executed From Server: localhost Server Port Number: 38081 Executed Server IP Address: 198.19.255.
This topic presents the following steps: ■ ■ ■ ■ ■ “Installing Web Server Software” on page 18 “Installing the Load Balancer Plug-in” on page 19 “Creating a Load Balancer Configuration” on page 19 “Starting Load Balancing” on page 20 “Verifying Load Balancing” on page 20 Installing Web Server Software If you already have Web Server software installed, and if you can identify a Web Server instance to serve as the load balancer, note the location of this instance in the file system and skip to “Installing t
2. Download Web Server 6.1 Service Pack 2 or higher for the locale and platform of your choice. To download, you must log in with username and password registered with MySunSM, Sun StoreSM, SunSolveSM, or the Online Support Center. If you do not have a login account, you can register online. 3. Follow the instructions to install Web Server software. You must: a. Extract the software from the compressed archive. b. Run the setup program.
▼ To Create an HTTP Load Balancer Configuration Steps 1. Create a load balancer configuration called MyLbConfig targeted to the cluster FirstCluster: asadmin create-http-lb-config --target FirstCluster MyLbConfig 2. Enable the FirstCluster cluster and the clusterjsp application deployed in it for HTTP load balancing: asadmin enable-http-lb-server FirstCluster asadmin enable-http-lb-application --name clusterjsp FirstCluster 3.
▼ To Verify Load Balancing Steps 1. To display the first page of the clusterjsp application, type this URL in your browser: http://localhost:web_server_port/clusterjsp Replace the localhost variable with the name of the system that the Web Server is running on. Replace the web_server_port variable with the value of the port attribute of the LS element in web_server_install_dir/https-hostname/config/server.xml. For this example, port 38000 is used.
■ Stand-alone Application Server installations: install-dir/nodeagents/nodeagent_name/i1/logs /access/server_access_log install-dir/nodeagents/nodeagent_name/i2/logs /access/server_access_log 5. Add a name and value pair (Name=Name Value=Duke) for storing in HttpSession. 6. Click the “Add to Session Data” button. 7. Verify that the session data was added Next Steps In this section you created an instance to use as a load balancer and set up a load balancing configuration.
At this point all processes related to Application Server are stopped. 2. Uninstall the Application Server. In a Solaris or Linux Java Enterprise System installation, run var/sadm/prod/entsys/uninstall and follow the steps in the uninstallation wizard. In a Windows Java Enterprise System installation, use the Control Panel’s Add/Remove Programs item. Choose Sun Java Enterprise Systems and click Change/Remove.
Where to Go Next Other resources for learning about and using Application Server are available. They include: ■ Product details at install-dir/docs-ee/about.html. See this document for the latest information on what is new, and pointers to tutorials and other educational services. ■ Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Release Notes See this document for late-breaking information regarding this release. ■ Sun Java System Application Server Enterprise Edition 8.
CHAPTER 2 Quick Start for Setting Up High Availability Failover With the configuration used in the previous chapter, if a server instance goes down, users lose session state. This section, the second of two advanced topics, provides the steps for installing the high-availability database (HADB), creating a highly available cluster, and testing HTTP session persistence. Application Server supports both HTTP session persistence and persistence for Stateful Session Beans.
About High Availability Clusters and HADB A highly availability cluster inSun Java System Application Server Enterprise Edition integrates a state replication service with the clusters and load balancer created earlier, enabling failover of HTTP sessions. HttpSession objects and Stateful Session Bean state is stored in HADB, a high-availability database for storing session state. This horizontally scalable state management service can be managed independently of the application server tier.
▼ Steps To Configure Your System for HADB 1. Get root access. 2. Define variables related to shared memory and semaphores. ■ On Solaris: a.
To restart the Web Server, execute the start program in web_server_install_dir/https-hostname. To restart the node agent, use the command asadmin start-node-agent hostname. Replace the variable hostname with the name of the host where the Application Server is running. Installing HADB This section provides the steps for installing the high-availability database (HADB).
If starting a database with HADB nodes on several hosts, start the management agent on each host. ▼ Steps To Start HADB in a Java Enterprise System Installation on Solaris or Linux 1. Change to the /etc/init.d directory: cd /etc/init.d 2. Run the command to start the agent: ./ma-initd start ▼ To Start HADB in a Java Enterprise System Installation on Windows HADB is started by default when Sun Java System is configured and running.
▼ Steps To Start HADB in a Stand-Alone Installation on Windows 1. In a terminal window, change to the HADB bin directory in the Application Serverinstallation: install-dir\hadb\4.x\bin The x represents the release number of HADB. 2. Run the command to start the agent: ma -i ma.
Note – To reduce the memory footprint of HADB for demonstration purposes, execute the following hadbm command. You are prompted for the administration password. In Java Enterprise System installations: /opt/SUNWhadb/4/bin/hadbm set DataBufferPoolSize=64,LogBufferSize=25 FirstCluster In standalone Application Server installations: install_dir/hadb/4/bin/hadbm set DataBufferPoolSize=64,LogBufferSize=25 FirstCluster 2.
4. Once the instances are stopped, click Start Instances. Verifying HTTP Session Failover The steps for testing session data failover are similar for testing load balancing as described in the topic “Verifying Load Balancing” on page 20. This time Session Data is preserved after failure. Failover is transparent to the user because the sample application is configured for automatic retry after failure. ▼ Steps To Verify HTTP Session Failover 1.
/var/opt/sun/appserver/nodeagents/nodeagent_name/i2/logs/ access/server_access_log ■ Windows Java Enterprise System installation: install-dir\nodeagents\nodeagent_name\i1\logs\access\server_access_log install-dir\nodeagents\nodeagent_name\i2\logs\access\ server_access_log ■ Standalone Application Server installations: install-dir/nodeagents/nodeagent_name/i1/logs/access/server_access_log install-dir/nodeagents/nodeagent_name/i2/logs/access/ server_access_log 4.
▼ Steps To Uninstall Completely 1. Stop the Application Server processes using these commands: asadmin stop-cluster FirstCluster asadmin remove-ha-cluster --hosts hadb_hostname,hadb_hostname FirstCluster Replace the hadb_hostname variable with the host name of the machine where HADB is to run. If you are using just one machine, you must name it twice. asadmin stop-node-agent hostname asadmin stop-domain domain1 2.
3. Uninstall the Application Server. ■ In a Solaris or Linux Java Enterprise System installation, run var/sadm/prod/entsys/uninstall and follow the steps in the uninstallation wizard. ■ In a Windows Java Enterprise System installation, use the Control Panel’s Add/Remove Programs item. Choose Sun Java Enterprise Systems and click Change/Remove. ■ In a Solaris or Linux standalone Application Server installation, run install_dir/uninstall and follow the steps in the uninstallation wizard.
2. Stop the web server instance acting as load balancer by running the stop program in: web_server_install_dir/https-hostname 3. Rename the loadbalancer.xml file in web_server_install_dir/https-hostname/config to loadbalancer.xml.sav 4. Stop the HADB Management Agent by one of the following methods: ■ In a Solaris or Linux Java Enterprise System installation: a. Change to the /etc/init.d directory: cd /etc/init.d b. Run the command to stop the agent: .
Where to Go Next Other resources for learning about and using Application Server are available. They include: ■ Product details at install-dir/docs-ee/about.html. See this document for the latest information on what is new, and pointers to tutorials and other educational services. ■ Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Release Notes See this document for late-breaking information regarding this release. ■ Sun Java System Application Server Enterprise Edition 8.
Sun Java System Application Server Enterprise Edition 8.