Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
INTRODUCTION
Following Oracle Corporation's focus on web technologies, companies are opting to web-enable their existing applications as part of the traditional upgrade process. Other companies are purchasing vendor-supplied web applications built with Oracle products. An essential component to Oracle's web-enabled applications is the Oracle Application Server 10g (OracleAS 10g). Support, maintenance, and problem resolution are often falling into the responsibility of the database administrator or other operational support personnel. Frequently, the person responsible for support has little or no web server support experience. This paper will provide an introduction to the architecture of OracleAS 10g, the tools available for administration and basic troubleshooting. Additionally, the paper will cover deployment of simple java, Oracle PL/SQL and HTML applications.
Clients connect through a firewall from the internet to the middle tier application server. The application server, when it needs to read from or write to the database, will connect to the database through another firewall. The area that contains the application servers is called a demilitarized zone (DMZ). The DMZ sits between the corporate intranet and the internet, and therefore can restrict incoming requests to the corporate LAN for added security.
INFRASTRUCTURE COMPONENTS
The OracleAS 10g infrastructure provides a centralized location for management capabilities of your OracleAS 10g environment. The infrastructure includes the following components. Oracle Identity Management, which consolidates management of your application users. Oracle Identity Management leverages the Oracle database, listener, and HTTP server for providing single sign-on capabilities. Oracle Enterprise Manager (OEM) Application Server Control for OracleAS 10g administration A Multi-purpose HTTP Server, which is driven by an Apache web server. A version 9.0.1.5 Oracle database, which contains metadata for many of the OracleAS 10g components. Applications which are configured to utilize single sign-on functionality of OracleAS 10g allow users to log-in once for authentication and authorization to multiple applications. A key component to Oracle Identity Management is Oracles LDAP3 compliant Oracle Internet Directory (OID) server. OID can be configured for SSL and can run on ports compliant within the corporations business requirements. OID can also be configured to replicate between other LDAP3 compliant directory servers to provide simplified enterprise-wide corporate directory services.
INSTALLATION
THE INSTALLATION TEAM
The installation team can involve resources with varying areas of expertise. Oracle Specialist: Responsibilities include both application server and database technologies. This person will be responsible for architecting the target server environment, installing and configuring the OracleAS 10g software, developing backup and recovery strategies, performing administration and troubleshooting. Network Specialist: Responsibilities include configuring the servers on the corporate network, firewall if applicable, and routers if applicable. This person will provide support for any connectivity issues which may arise in the OracleAS 10g environment. Operating System Specialist: Responsibilities include applying patches to the operating system prior to installation as required. Additionally, the Operating System Specialist will make kernel changes, create the software owner accounts, and devise an appropriate file system layout strategy.
PRE-INSTALL NOTES
As with leading-edge technology products, installation of OracleAS 10g can be quite cumbersome, requiring multiple attempts, and causing a few gray or lost hairs until a working product installation is obtained. Following a few recommendations before beginning any installation of OracleAS 10g can save time and reduce stress. Read the Release Notes including any available addendum. Failed installations due to not meeting minimum operating system patch requirements or resource requirements can be costly. Not only will you have wasted time during the installation but you will waste additional time cleaning up your server for the reinstallation. For each installation, files are written to an Oracle Inventory directory, your target software installation directory. Additional files, depending on your environment, will be written to /var/opt/oracle and /usr/local/bin. For example, in the current (OracleAS 10g) Release Notes, there are notes regarding how to appropriately change kernel parameters, known issues, and steps to avoid errors during installation. Read the Installation Guide in advance. The Installation Guide not only walks you through installation, but also includes operating system patch requirements, hardware requirements, database compatibility, and a wealth of information you will need to be aware of before beginning installation. For OracleAS 10g, there are two installation guides the Complete installation guide and a Quick installation and upgrade guide. Each document should be reviewed for a thorough understanding of the installation process.
SERVER REQUIREMENTS
New with OracleAS 10g is the ability to run the installer with a precheck option. Many of the installation requirements can be checked with this option, but not all. Not included in the prechecks are verifying adequate disk space, server exists on a network, and CPU type. A Standalone installation, where the server is not on a network, is supported on Windows and Linux platforms. Note that as of February, 2004, the Windows release of OracleAS 10g is a beta release. Use the following syntax which is documented in the installation guide to run the Oracle Universal Installer in precheck mode:
prompt> mount_point/runInstaller executeSysPrereqs
Actual resource requirements will vary depending on your deployment architecture, number of users, and applications which the users will be accessing. However, the minimum requirements, recommended for infrastructure are 1 GB of available RAM, and 2.5 GB free disk space. The complete installation of the middle tier will require 1GB of RAM and approximately 2 GB of disk space.
DOCUMENTATION CHECKS
If you are new to Oracle application server technology, it is recommended that you not only familiarize yourself with the installation documentation, but also you should review the Concepts Guide and Administrators Guide.
INSTALLATION OPTIONS
Unless you are planning to only install OracleAS 10g J2EE and Webcache version and do not want to use single sign-on capabilities, you will need to build an infrastructure first.
SILENT INSTALLATION
You can elect to install OracleAS 10g software either in the default interactive mode or you can perform a silent installation. A silent installation is useful when you are performing similar installations on multiple servers or are performing those installations remotely and only have access to a command line prompt. There is no output generated to a console in silent installation. Before beginning a silent installation, you will need to create an oraInst.loc file as the root user. Additionally, you must create a response file, which will contain all of the responses you would normally provide during an interactive installation. There are response file templates for each installation option. They are available with the distribution software. Errors in the response file will cause a failed installation. Below is an example of running a silent infrastructure installation with a response file
Paper #13005 Page 3
After the installation completes, you must run the root.sh script as the root user, which can be found in $ORACLE_HOME/bin directory. Both silent and interactive installations create an installActions log file, which should be reviewed after installation. This file, installActions[install_timestamp].log, can be found in the oraInventory directory specified during installation. For silent installations, you will also have a silentInstall[install_timestamp].log file which indicates if the installation was successful.
SPECIFYING PORTS
One new installation feature is the ability to identify which ports you want the multitude of components to use prior to beginning your install. Using a file named staticports.ini, you can predefine on which ports components will run. An example of the entries from this file is below:
# J2EE and Web Cache Oracle HTTP Server port = 7792 Oracle HTTP Server Listen port = 7793 Oracle HTTP Server SSL port = 4443 Oracle HTTP Server Listen (SSL) port = 4444 . . . # Infrastructure Oracle Internet Directory port = port_num Oracle Internet Directory (SSL) port = port_num Oracle Certificate Authority SSL Server Authentication port = port_num Oracle Certificate Authority SSL Mutual Authentication port = port_num
Keep in mind that for any process running on a port lower than 1024 in a UNIX environment, you may need root permissions to start it and therefore the installer, which runs as an oracle specific user, will not be able to start it.
INFRASTRUCTURE INSTALLATION
There are three options for infrastructure installation. If you are planning to build a large scale environment and want to install pieces of the infrastructure on multiple machines, you will want to consider installing the Oracle Identity Management at a separate installation from the Metadata installation type. However, for most installations, you will select the single option for both Oracle Identity Management and Metadata. Be sure to only select those components within the infrastructure that you intend to use or evaluate. For example, if you are not planning to build an SSL-enabled environment, do not install the Oracle AS Certificate Authority. New in this release is the ability to name your infrastructure database any valid Oracle database name. In the previous release, 9iAS release 2, you were forced to use iasdb as your instance name. Because this is a widely known SID, it could make it easier for potential hackers to break in to your database. Another possible reason you would want to change the name of the SID is to fit your cooperate standards.
MIDDLE-TIER INSTALLATION
There are three options when you select OracleAS 10g Application Server at the beginning of installation. These are: J2EE and WebCache Portal and Wireless Business Intelligence As previously indicated, J2EE and WebCache do not require an infrastructure. The installation options are layered. This means that if you elect to install Business Intelligence and Forms, you also will install Portal and Wireless, and J2EE and WebCache. To install all products, you will select Business Intelligence. All products will be configured at the end of the software installation through a series of configuration assistants. However many of the components require post installation configuration. Additionally, note that you can expand your installation at a later date. If you initially performed only a Portal and Wireless installation, you can then expand your install to include the Business Intellegence software by installing into the same $ORACLE_HOME directory.
COMPONENT CONFIGURATION
After a successful installation, you will need to perform post configuration steps for the following components. The post configuration steps are documented in the component-specific documentation. OracleAS Portal OracleAS Wireless Oracle Ultrasearch OracleAS Discoverer OracleAS Reports Services OracleAS Personalization OracleAS Certificate Authority
POST-INSTALLATION NOTES
Following installation, you should review the install.log file to ensure that all products installed without errors. Additionally, you should access a few key URLs from a workstation on your LAN. Ensuring that the workstation can ping the server would be your first step. Below is a list of standard URLs and their purpose. If you have not modified the installation port list, your default HTTP server port will be 7777 for infrastructure and 7778 for the middle tier. Access the infrastructure OracleAS 10g Welcome Page at http://server.domain.com:7777. Access the middle tier OracleAS 10g Welcome Page at http://server.domain.com:7778 Connect to OEM Application Server Control for the infrastructure at http://server.domain.com:1810 Connect to OEM Application Server Control for the middle tier at http://server.domain.com:1810 Both the infrastructure and middle tier each have an HTTP server, running on their own ports. The Welcome Page provides a quick method to accessing product demonstrations, release notes, and logging into OEM Application Server Control. You can verify functionality of the application server components you installed by accessing the demonstrations page. Note the installation level of the application server you selected. For example, if performed a Portal and Wireless installation type and not the Business Intelligence, your Oracle Forms, Oracle Reports and Discoverer demonstrations will not work. When your installation has finished, a summary screen will display a list of URLs. This same information is available to you in the file: $ORACLE_HOME/Apache/Apache/setupinfo.txt
HOME
From the Instance Home page, you can View General information regarding the instance, including host, installation type, and $ORACLE_HOME of the software. Additionally, the host is a link, which will bring you to host management and monitoring pages. From the host page you can view host resource usage by process, file system usage, set thresholds for notification, view paging and view top processes. Start all, stop all, or restart all components in the Instance or individual components View a snapshot of CPU and memory utilization of the instance and components Access component-specific configuration and management interfaces. The component configuration and management interfaces will vary depending on the type of component. For example, within the HTTP Server component area, you can configure Virtual Hosts and modify HTTP server properties. Additionally, you have a quick link to the corresponding log files for that component.
Figure 3 Instance Home Page of Application Server Control
Disable and enable components. Disabled components will not start when you issue a Start
All command.
J2EE APPLICATIONS
In the J2EE Applications page, you will have a list of all OC4J applications registered to that instance. You can click the application name to jump to the OC4J application management page. From this page you can Redeploy or undeploy your application Perform administration tasks
Paper #13005 Page 7
PORTS
The ports page will present the actual ports each of the corresponding processes is using. It also allows a simple interface for changing these ports and suggests a port range for these ports. Once you click the edit icon, you are brought to the component configuration pages where you can modify ports or perform other maintenance.
INFRASTRUCTURE
The infrastructure management pages allow you to perform administration tasks including: Change the Oracle Internet Directory for this instance Change schema passwords in the metadata repository Configure OracleAS 10g to leverage a separately installed Oracle Enterprise Management Server
LOGLOADER
The LogLoader is new with OracleAS 10g. You can configure it to load the many log files that are written by OracleAS 10g to a log repository and view the log files through your Application Server Control interface. On most of the pages in the Application Server Control tool there is a log link. Click this link to access the LogLoader. Items available in LogLoader include: Search capabilities of loaded logs by component and content LogLoader parameter configuration includes load interval, location, and storage settings The log file search features provide a simple interface for OracleAS 10g administrations to keep up to date with the health of the application server environment. For example, you can perform a simple search for all log files for your infrastructure. This can return a large number of log files. You may then want to filter those log files and only view problems that are occurring. With the LogLoader Advanced Search functionality, you can filter your resultset by time range, Message Type and Message Text. You can also query against the LogLoader Repository, which contains log files already loaded through the LogLoader process. You can add many additional attributes to your search, such as host and userid.
For each OC4J instance: $ORACLE_HOME/j2ee/instance_name/log For each OC4J application: $ORACLE_HOME/j2ee/instance_name/applicationdeployments/application_name/application.log Oracle Internet Directory: $ORACLE_HOME/ldap/log Oracle Reports: $ORACLE_HOME/reports/logs Web Cache: $ORACLE_HOME/webcache/logs Wireless: $ORACLE_HOME/wireless/logs
START INFRASTRUCTURE
1. Set the environment to the ORACLE_HOME of the infrastructure and the ORACLE_SID to the infrastructure database. 2. Startup the database listener.
$ lsnrctl start
6. You will next start all components in the infrastructure. Run Oracle Enterprise Manager through your web browser. Click the infrastructure instance. Click Start All
The components started by opmnctl can instead be started by OEM Application Server Control. Simply eliminate running opmnctl startall and start the Application Server Control. Launch the Application Server Control from your web browser. Click your infrastructure instance and start all component. Notes: Always start all of your infrastructure processes before starting your middle tier. Always stop all of your middle tier components before stopping your infrastructure.
TOPOLOGY VIEWER
Topology Viewer is an add-on preview only utility which is installed into the OEM Application Server Control tool. Once downloaded and installed, it provides a graphical, hierarchical web view of the entire OracleAS 10g environment. You can launch the Topology Viewer from the following URL: http://host.domain.com:port/ emd/console/ias/topology/topologyjsp Features of Topology Viewer include: JSP or Applet viewer launched from your browser Authentication to OEM Application Server Control is required Automatic refresh at 30 second or 1 minute intervals. Manual refresh is an option. Multiple zoom levels Component up or down indicators Expand/collapse capabilities to rollup to the Farm or down to details of each process ID and resource utilization including memory and CPU for each component process Easy navigation Search capabilities which will highlight components which match search criteria
Figure 5 - JSP Topology Viewer
IHAT
OracleAS Hi-Av Tool (iHAT) provides a real time view of your OracleAS 10g system from a small java application run from a workstation. The tool requires java runtime version 1.4. You will need to identify on which port your OPMN Figure 6 - iHAT Grid View request processes are listening by viewing the opmn.xml file in $ORACLE_HOME/opmn/conf directory. Launching the tool is simple. Use the following command.
C:\ihat>"C:\Program Files\Java\j2re1.4.0\bin\java" -jar ihat.jar host:port
Paper #13005 Page 11
There are two views in iHAT. The grid view will present a hierarchical view of each instance in your OracleAS 10g farm. If a component is down, the corresponding block will be gray, where the components which are up will be green. Clicking any component will launch the iHAT instance view. The iHAT instance view contains detailed process information for each component process. This is a great tool for data center consoles which may be watched by an operations staff.
The types of information available in the instance view include: Process Set Status, for example Alive Type, for example OC4J, DCMDaemon, Webcache Memory Used in KB Up time in seconds CPU Time in percentage
1 2 3 4
Through the HTTP Server Component configuration in Application Server Control, identify the Document Root of the HTTP Server. You can click on your middle tier instance, HTTP Server, Administration, then Server Properties. Create a subdirectory on the server beneath Document Root directory for example called MyNewApp. Copy all html and image files, such as .jpg or .gif, to the new directory. Verify that the application is accessible through your web browser. For example: http://www.your_domain.com/MyNewApp/start.html
1 2 3 4
Using Application Server Control, access the middle tier instance. Click HTTP Server Click Administration, then PL/SQL Properties Click Create in the DAD Status area of the web page. We need to define the database access descriptor in the middle tier. 5 For traditional pl/sql web applications, Create a DAD of type General. 6 You must enter the DAD name. This will be part of the URL. For example, MyDemo 7 Enter the username, password, and connect string to your target database and pl/sql procedure. 8 Select Basic authentication mode 9 Restart the HTTP Server process. 10 Test your application from your browser. In our example, the URL would be: http://servername:port/MyDemo/hello_oracle
TROUBLESHOOTING
USERS REPORTING "I CAN'T CONNECT"
Typical problems reported by users of application would include: I Cant Connect. Below is a list of questions to analyze during the troubleshooting process. Can you connect from a browser at your workstation? If so, the user could be misconfigured, using the wrong URL, or experiencing LAN issues. Can you run the application from a browser on the server? If so, this could indicate that there are networking issues affecting your users. Can you connect from your browser to the middle tier HTTP server? http://hostname:port/ If so, there may be an application related issue such that a component is not running or misconfigured. Is your infrastructure fully functional? Try logging into single sign-on at http://infrahost.domain.com:port/pls/orasso Does sql*net connectivity exist between the middle tier and infrastructure? Test with tnsping from the middle tier. Is Oracle Internet Directory running? Try connecting on infrastructure to OID DAS: http://infrahost.domain.com:port/oiddas and login as a registered user. Can you connect to the infrastructure database? Attempt a client/server connection to the database verifying the listener is listening for incoming requests. Connect to the database using sql*plus.