Tuesday 18 July 2017

Adop(Ad online patching utility) explained R12.2

Adop(Ad online patching utility)  is used in R12.2 to apply the patches online with out any downtime.it is the new utility which to apply patches in online patching mode .It is perl script and call adpatch  internally to apply the patch. It is not recommended to apply the patches directly using adpatch in R12.2
For online patching to work Oracle Apps make use of 11g database feature called as “Edition Based Redefinition”, under this feature. On the Applications side, there will be two file systems, one called as patch and other called as run file system. Both are identical to each other and services will be running out of run file system. During patching process, patches are applied to patch file system, which does not require any downtime. For the patch changes to come to effect, patch file system is switched as run file system and vice versa, and services are restarted. In essence, Downtime will be only for the time duration during which services are restarted.
A complete patching cycle is following while applying the patches with adop. It consists of many phases

1.Prepare: This syncs the current patch file system with run file system, to make sure patch file system is up to date compared to run file system and ready for the patches to get applied. This also created a new patch edition in the database. This syncing process is incremental process to be efficient.

$ adop phase=prepare
Detailed Description can be found at below link

2.Apply   : Patches are applied to patch file system during this phase, we can apply as many patches we want during this phase. Changed code objects are from patch edition of database. Changes to tables are stored in new columns which are only visible from patch edition of the database.

$ adop phase=apply patches=<patch no>
  • Multiple patches can be applied, including customizations
  • Patches are applied to the copy (Patch Edition)
  • The production application is unaffected by the changes
  • Users are connected to the Application and can perform their work unaffected by the patch
  • Changes are made in the isolation of an Edition
  • The running application is unaffected by these changes
3.Finalize: This phase involves compiling of invalid objects etc.

$ adop phase=finalize

4.Cutover: This phase configures the patch file system as new run file system and patch edition of the database as new run edition. Restart application services from new run file system of Apps. This is where downtime is required.

$ adop phase=cutover
5.Cleanup: Deletes obsolete code objects and columns from earlier patch edition are removed at database.

$ adop phase=cleanup

Some more things about adop

1)Online Help
To obtain help about the basics of adop operation, enter the command:
adop -help
2)   Enabling maintenance mode is not required in R12.2; it’s not applicable for online patching.
3) There are also three special phases, for use when needed.
Special phases:
abort – Abort the current patching cycle.
actualize_all – Create new copies of all code objects in the patch
edition.
fs_clone – Copy the run file system to the patch file system.

4)
The adop logfiles are located on the non-editioned file system (fs_ne), under:
s_ne_base/EBSapps/log/adop//__/ext_name>/log
For example, if s_ne_base was /u01/apps/R122_EBS/fs_ne, the session ID was 20, and the
was sunxx_test, the path to the adop log files from 1th
July 2013 would resemble this:
/u01/apps/R122_EBS/fs_ne/EBSapps/log/adop/20/apply_20130701_112226/sunxx_te
stsys/log


5)
You can obtain a brief report for the current patching session by running the command:
$adop -status
This will display information that includes phases completed and the time taken


Key Technology changes in E-Business Suite 12.2

Key Technology changes in E-Business Suite 12.2
There are lots of updates coming in 12.1 release, but from a technology stack perspective, EBS 12.2 will be notable for two things:

A) Replacing Oracle Containers for Java (OC4J) 10g with WebLogic Server 11g
EBS 12.2 will use WebLogic Server from Fusion Middleware 11g in place of
OC4J 10g as part of the release’s internal technology stack.  Other
additional new Fusion Middleware 11g components used will include
WebLogic JSP and UIX 11g.

B) Online Patching support via 11gR2 Edition-Based Redefinition
EBS 12.2 will use the 11gR2 Database’s Edition-Based Redefinition features to provide support for Online Patching.  Edition-Based Redefinition is exciting new technology. From the 11gR2 Application Developer’s Guide:
“Edition-based redefinition enables you to upgrade the database component of an application while it is in use, thereby minimizing or eliminating down time.
“To upgrade an application while it is in use, you copy the database objects that comprise the application and redefine the copied objects in isolation. Your changes do not affect users of the application—they continue to run the unchanged application. When you are sure that your changes are correct, you make the upgraded application available to all users.”
Online Patching means that patches that change EBS database objects can be applied while the E-Business Suite production instance is fully operational.  Only a short downtime will be required to complete the patching process.  This will take your patching downtimes more predictable.

Oracle R12.2 login flow and basic troubleshooting



R12.2 is the latest Release of Oracle E-business Suite Products. Here we would be discussing the Login flow in R12.2
Login flow in R12.2
1.                    When a HTTP request is made for EBS, the request is received by the Oracle HTTP Server (OHS).
2.                   When the configuration of OHS is for a resource that needs to be processed by Java, such as logging into EBS, the OHS configuration will redirect the request to the Web Logic Server (WLS) Java process (OACore in this case).
3.                   WLS determines the J2EE application that should deal with the request, which is called “oacore”.
4.                   This J2EE application needs to be deployed and available for processing requests in order for the request to succeed.   The J2EE application needs to access a database and does this via a datasource which is configured within WLS.
Here is the processing in terms of URL(Login HTTP headers)

When the EBS login works OK, the browser will be redirected to various different URLs in order for the login page to be displayed.  The page flow below shows the URLs that will be called to display the login page:
/OA_HTML/AppsLogin
EBS Login URL/OA_HTML/AppsLocalLogin.jsp
Redirects to local login page
/OA_HTML/RF.jsp?function_id=1032925&resp_id=-1&resp_appl_id=-1&security_group_id=0&lang_code=
US&oas=3TQG_dtTW1oYy7P5_6r9ag..&params=5LEnOA6Dde-bxji7iwlQUg
Renders the login page
The URLs after the user enters username and password, then clicks the “login” button are shown below/OA_HTML/OA.jsp?page=/oracle/apps/fnd/sso/login/webui/MainLoginPG&_ri=0&_ti=640290175&language_code=
US&requestUrl=&oapc=2&oas=4hoZpUbqVSrv9IE0iJdY1g..
/OA_HTML/OA.jsp?OAFunc=OANEWHOMEPAGE
/OA_HTML/RF.jsp?function_id=MAINMENUREST&security_group_id=0
Renders user home page
Once the users home page is displayed, the logout flow also redirects to several different URL before
returning to the login page:/OA_HTML/OALogout.jsp?menu=Y
Logout icon has been clicked/OA_HTML/AppsLogout
/OA_HTML/AppsLocalLogin.jsp?langCode=US&_logoutRedirect=y
Redirects to the login page
/OA_HTML/RF.jsp?function_id=1032925&resp_id=-1&resp_appl_id=-1&security_group_id=0&lang_code=
US&oas=r6JPtR7-a4n5U2H3–ytEg..&params=1JU-PCsoyAO7NMAeJQ.9N6auZoBnO8UYYXjUgSPLHdpzU
3015KGHA668whNgEIQ4
Renders login page again

Troubleshooting EBS login page issue

1. If the login page doesn't comes up then we have to focus on the varios logs present under $LOG_HOME directory. In case of EBS 12.2(as it is the latest release),

1)  OHS (apache) failure
If OHS is not running or not responding, one would see a message as below. If OHS is not running then there will not be any messages in any EBS log file for this request.

Firefox: “The connection was reset”
Steps to take
Check OHS has started OK

adapcctl.sh status
adapcctl.sh stop

adapcctl.sh start

2  OACore JVM process not available

If the OACore JVM is not running or not reachable, then one will likely see the following message in the browser:

Failure of server APACHE bridge:
No backend server available for connection: timed out after 10 seconds or idempotent set to OFF or method not idempotent.
There could be two reason
Steps to take

a)Make sure the OACore JVM has started correctly

admanagedsrvctl.sh start oacore
b) Check mod_wl_ohs.conf file is configured correctly

3) oacore J2EE application not available

There may be cases where the OACore JVM is running and reachable but the oacore application is not available.

The browser will report the error:

Error 404–Not Found
From RFC 2068 Hypertext Transfer Protocol — HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
Access_log will show 404 error:

GET /OA_HTML/AppsLogin HTTP/1.1″ 404
Steps to take

In the FMW Console check the “deployments” to confirm the “oacore” application is at status “Active” and Health is “OK”.

4) Datasource failure

The oacore logs will show this type of error

<Error> <ServletContext-/OA_HTML> <BEA-000000> <Logging call failed exception::
java.lang.NullPointerException
at oracle.apps.fnd.sso.AppsLoginRedirect.logSafe(AppsLoginRedirect.java:639)
at oracle.apps.fnd.sso.AppsLoginRedirect.doGet(AppsLoginRedirect.java:1314)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
The explorer will show

The system has encountered an error while processing your request.Please contact your system administrator
Steps to Take

Review the EBS Datasource and make sure it is targeted to the oacore_cluster1 managed server.   Also use the “Test Datasource” option to confirm database connection can be made
If one makes any changes, one will need to restart the managed server.

Once we get the ebs login page and upon passing the credentials, if we are not getting the home page then we should focus on

1. Check the OHS files and see if they are correct or not
2. APPL_SERVER_ID in dbc file matches with server ID in FND_NODES table against respective Server
3. GUEST/ORACLE password is correct & user is not end dated
4. APPS and APPlSYS password should be same

*********************************************************************************
 Check Value in DBC File
[test appl]$ grep -i GUEST_USER_PWD $FND_SECURE/visr12.dbc
GUEST_USER_PWD=GUEST/ORACLE

 Check profile option value in DB
[test appl]$ sqlplus apps/
SQL> select fnd_profile.value('GUEST_USER_PWD') from dual;
FND_PROFILE.VALUE(’GUEST_USER_PWD’)
——————————————————————————–
GUEST/ORACLE

Value for step 1 and 2 must be sync
Guest user connectivity check
SQL> select FND_WEB_SEC.VALIDATE_LOGIN('GUEST','ORACLE') from dual;
FND_WEB_SEC.VALIDATE_LOGIN('GUEST','ORACLE')
——————————————————————————–-----
Y
proper configuration should return it as Y

4. Compile JSP
[test appl]$ cd $FND_TOP/patch/115/bin
[test bin]$  ojspCompile.pl --compile --flush
**************************************************************************************************

5. There is JSP tool test to find most of issues via
http://host.domain:port/OA_HTML/jsp/fnd/aoljtest.jsp

Reference: 12.2 E-Business Suite Technology Stack Summary Of The iAS / HTTP Server Login Process And What To Expect When One Of The Login Components Fails (Doc ID 1984710.1)


Important Changes in Autoconfig R12.2


With Oracle E-Business Suite Release 12.2, OC4J has been replaced with Oracle WebLogic Server. This has resulted in a reduced role for AutoConfig in the configuration of the Oracle HTTP Server and the oacore, oafm, forms and forms-c4ws services.This article talks about changes in Autoconfig R12.2
Up to and including Oracle E-Business Suite Release 12.1.3, AutoConfig was used to manage the entire Oracle HTTP Server configuration and OC4J instance configuration.
In Oracle E-Business Suite Release 12.2, it manages only a part of the Oracle HTTP Server configuration. It also only partially manages the configuration of the oacore, oafm, forms and forms-c4ws services. The remaining scope of AutoConfig remains the same as prior to Oracle E-Business Suite Release 12.2.

About Oracle E-Business Suite Release 12.2 Application Technology Stack
Oracle E-Business Suite Release 12.2 introduced Oracle WebLogic Server (WLS) as part of the application tier technology stack, deploying a dedicated WLS domain with associated clusters of managed servers that include:
  • oacore – provides core functionality in EBS application tier Java code, including OAF based functionality for EBS products
  • oafm – supports web services, Secure Search and Oracle Transport Agent
  • forms – provides Oracle forms functionality
Following are the key configuration changes in Autoconfig R12.2
Configuration Activity
Prior to Release 12.2 In
In Release 12.2
Oracle E-Business Suite
Database, Concurrent
Processing, Oracle Developer
10g, profile options, and other
Oracle E-Business Suite
components.
Oracle Applications Manager
Oracle Applications Manager
Changes to HTTP
Configuration
All HTTP configuration was
managed via AutoConfig
templates. Configuration
changes were done by editing
the respective context
variables and subsequently
running AutoConfig.
Most HTTP configuration is
managed via native Oracle
WebLogic Server tools, Fusion
Middleware Control, or
manually editing of the
configuration files. Only a
limited set of HTTP
configuration files are
maintained via AutoConfig.
Changes to configuration of
oacore, oafm, forms and
forms-c4ws services.
All configuration settings for
the oacore, oafm, forms and
forms-c4ws services were
managed via AutoConfig
templates. Configuration
changes were accomplished
by editing context variables
and running AutoConfig
Properties for the oacore,
oafm, forms and forms-c4ws
services, including the
classpath and JVM
arguments, need to be
updated through native
WebLogic tools such as
WebLogic Administration
Console. The context variable
values are used only to set the
initial values during managed
server creation.
Managing JVM instances of
the oacore, oafm, forms and
forms-c4ws services.
The number of instances of a
service was controlled via
Oracle Process Manager
(OPMN). This number could
be modified by editing the
nprocs context variable,
running AutoConfig, then
stopping and restarting the
services.
Each JVM instance of a service
corresponds to a managed
server of that service type.
The number of instances
needs to be controlled by
explicitly creating or deleting
managed servers for the
service. More details are given
later in this chapter.

How the httpd configuration is managed in R12.2
In Oracle E-Business Suite Release 12.2, some Oracle HTTP Server configurations and WebLogic configurations are managed via AutoConfig while some are managed natively via Fusion Middleware Control and WebLogic Server Administration Console. A new mechanism has been introduced to keep the context variables and the OHS configuration parameters (where applicable) in synchronization. This mechanism is called the ‘feedback loop’.



Updating AutoConfig-Managed Oracle HTTP Server Configurations
The table below shows the Oracle HTTP Server configuration templates that are managed by AutoConfig in Oracle E-Business Suite Release 12.2. The configurations defined in these files can be customized by customizing the templates.
Template Name
Configuration File
ssl_terminator_conf_FMW.tmp
ssl_terminator.conf
trusted_conf_FMW.tmp
trusted.conf
oracle_apache_conf_FMW.tmp
oracle_apache.conf
oracle_apache_ssl_conf_FMW.tmp
oracle_apache_ssl.conf
url_fw_conf_FMW.tmp
url_fw.conf
url_fw_ws_conf_FMW.tmp
url_fw_ws.conf
security2_dmz_conf_FMW.tmp
security2_dmz.conf
custom_conf_FMW.tmp
custom.conf
webgate_conf_FMW.tmp
webgate.conf
Updating Seeded Oracle HTTP Server Configurations
During creation of the Oracle HTTP Server instance, AutoConfig performs the first instantiation of configuration files such as httpd.conf and mod_wl_ohs.conf. After the installation or upgrade to Release 12.2 is complete, seeded Oracle HTTP Server configurations are generally managed via Fusion Middleware Control. In certain specific cases, however, manual editing of the configuration files may be needed: this will be advised separately where required.
When modifying Oracle HTTP Server protocols or port numbers, these values must be updated in both the context file as well as in the configuration files. This is to ensure that the new values are updated in the AutoConfig-managed database profile values as well.
To modify HTTP server protocols or port numbers, perform the following steps on the run file system:
  1. Login to Oracle Fusion Middleware Control Console.
  2. Select Web Tier Target under EBS Domain.
  3. Select Administation > Advanced Configuration.
  4. Edit the relevant file to update the respective HTTP configuration parameter value.
  5. Run the following command on all application tier nodes:
$ perl <AD_TOP>/bin/adSyncContext.pl contextfile=<CONTEXT_FILE>
Run AutoConfig on all application tier nodes.