Monday, October 08, 2012

Workflow Mailer Torubleshooting - Part-3

When the workflow mailer is either disabled or the mail server restricts its access to the workflow mailer, all the workflow notifications will retry and upto the limit set at the workflow mailer configuration and later all the notifications will be failed. This will result in 2 things at Application level

i) MAIL_STATUS column of the WF_NOTIFICATIONS set to FAILED. 

ii) After a series of failure notifications the Notification Style for the respected User will be set as Disabled and a corresponding user details are sent to SYSADMIN.

A similar issue araised in one of the client and the many of the users notification style has been set to Disabled.

Solution:

To overcome the above issue, initially fix the workflow mailer issue and later need to change the Notification Preference at Workflow Administrator to "HTML with Attachments" (or any other as per the client's requirement).

But sometime this setting won't be affected to all the users whose Preference is set to Disabled. To overcome this situation:

i) Backup the following tables:

CREATE FND_USER_PREFERENCES_BAK as select * from FND_USER_PREFERENCES;
CREATE WF_LOCAL_ROLES_BAK as select * from WF_LOCAL_ROLES;

ii) To set the mail preference for all the users execute the following:

update wf_local_roles
set notification_preference='<wished_preference>'
where orig_system in ('FND_USR','PER');

update fnd_user_preferences
set preference_value='<wished_preference>'
where preference_name='MAILTYPE'
and module_name='WF'
and user_name <> '-WF_DEFAULT-'; 

iii) To update the mail preference of the users only whose preference is set to "FAILED", execute the below steps:

 update wf_local_roles
set notification_preference='<wished_preference>'
where orig_system in ('FND_USR','PER')
and name in
(select user_name
from fnd_user_preferences
where preference_name='MAILTYPE'
and module_name='WF'
and preference_value='DISABLED');

update fnd_user_preferences
set preference_value='<wished_preference>'
where preference_name='MAILTYPE'
and module_name='WF'
and preference_value='DISABLED';

Possible values for <wished_preference> are:
QUERY (corresponds to preference value "Do not send me mail")
MAILTEXT (corresponds to preference value "Plain text mail")
MAILATTH (corresponds to preference value "Plain text mail with HTML attachments")
MAILHTML (corresponds to preference value "HTML mail with attachments")
MAILHTM2 (corresponds to preference value "HTML mail")
SUMMARY (corresponds to preference value "Plain text summary mail")
SUMHTML (corresponds to preference value "HTML summary mail")
DISABLED (corresponds to preference value "Disabled")

iii) To Resend all the failed notifications again to the respected users run the following concurrent program as SYSADMIN, with the relevant parameters.

Retry Errored Workflow Activities 

   

 




Sunday, October 07, 2012

Workflow Mailer Troubleshooting - Part-2



Workflow Mailer Debugging Script for Debugging Emails issues
This article contains various Workflow and Business Event debugging scripts.

--Checking workflow Components status whether are they running or stopped.

select component_type, component_name, Component_status,COMPONENT_STATUS_INFO Error
from fnd_svc_components
where component_type like 'WF%'
order by 1 desc,2,3;


Query to get the log file of active workflow mailer and workflow agent listener Container
--Note All Workflow Agent Components logs will stored in single file i.e. container log file.

select fl.meaning,fcp.process_status_code, decode(fcq.concurrent_queue_name,'WFMLRSVC', 'mailer container',
'WFALSNRSVC','listener container',fcq.concurrent_queue_name),
fcp.concurrent_process_id,os_process_id, fcp.logfile_name
from fnd_concurrent_queues fcq, fnd_concurrent_processes fcp , fnd_lookups fl
where fcq.concurrent_queue_id=fcp.concurrent_queue_id and fcp.process_status_code='A'
and fl.lookup_type='CP_PROCESS_STATUS_CODE' and fl.lookup_code=fcp.process_status_code
and concurrent_queue_name in('WFMLRSVC','WFALSNRSVC')
order by fcp.logfile_name;


Linux Shell script Command to get outbound error in Mailer
grep -i '^\[[A-Za-z].*\(in\|out\).*boundThreadGroup.*\(UNEXPECTED\|ERROR\).*exception.*' <logfilename> | tail -10 ;
--Note: All Mailer log files starts with name FNDCPGSC prefix

Linux Shell script Command to get inbound processing error in Mailer
grep -i '^\[[A-Za-z].*.*inboundThreadGroup.*\(UNEXPECTED\|ERROR\).*exception.*' <logfilename> | tail -10 ;




Query to Check Workflow Mailer Backlog
--State=Ready implies that emails are not being sent & Waiting mailer to send emails

select tab.msg_state, count(*) from applsys.aq$wf_notification_out tab group by tab.msg_state ;


Check any particular Alert Message email has be pending by Mailer

select decode(wno.state,
0, '0 = Pending in mailer queue',
1, '1 = Pending in mailer queue',
2, '2 = Sent by mailer on '||to_char(DEQ_TIME),
3, '3 = Exception', 4,'4 = Wait', to_char(state)) State,
to_char(DEQ_TIME),
wno.user_data.TEXT_VC
from wf_notification_out wno
where corrid='APPS:ALR'
and upper(wno.user_data.TEXT_VC) like '%<Subject of Alert Email>%';


Check The Workflow notification has been sent or not

select mail_status, status from wf_notifications where notification_id=<notification_id>
--If mail_status is MAIL , it means the email delivery is pending for workflow mailer to send the notification
--If mail_status is SENT, its means mailer has sent email
--If mail_status is Null & status is OPEN, its means that no need to send email as notification preference of user is "Don't send email"
--Notification preference of user can be set by user by logging in application + click on preference + the notification preference


Check Whether workflow background Engine is working for given workflow or not in last 2 days
-- Note: Workflow Deferred activities are run by workflow background engine.
select a.argument1,a.phase_code, a.status_code ,a.actual_start_date,a.* from fnd_concurrent_requests a
where CONCURRENT_PROGRAM_ID =
(select concurrent_program_id from fnd_concurrent_programs where
CONCURRENT_PROGRAM_NAME='FNDWFBG')
and last_update_Date>sysdate-2 and argument1='<Workflow Item Type>'
order by last_update_date desc

 Check whether any business event is pending to process
i.e. Query to get event status & parameters value of particular event in wf_deferred table.

select wd.user_Data.event_name,wd.user_Data.event_key,
rank() over ( partition by wd.user_Data.event_name, wd.user_Data.event_key order by n.name) as serial_no,
n.NAME Parameter_name, N.value Parameter_value ,
decode(state, 0, '0 = Ready', 1, '1 = Delayed', 2, '2 = Retained',
3, '3 = Exception', 4,'4 = Wait', to_char(state)) state,
wd.user_Data.SEND_DATE,
wd.user_Data.ERROR_MESSAGE,
wd.user_Data.ERROR_STACK,
wd.msgid,wd.delay
from WF_DEFERRED wd , TABLE(wd.user_Data.PARAMETER_LIST) n
where lower(wd.user_data.event_name)='<event Name >'
order by wd.user_Data.event_name, wd.user_Data.event_key, n.name

Workflow Mailer Troubleshooting -- Part1

Check workflow mailer service current status

  sqlplus apps/<apps password>
  select running_processes
    from apps.fnd_concurrent_queues
   where concurrent_queue_name = 'WFMLRSVC';

  Number of running processes should be greater than 0


 Find current mailer status

  sqlplus apps/<apps password>
  select component_status
    from apps.fnd_svc_components
   where component_id =
        (select component_id
           from apps.fnd_svc_components
          where component_name = 'Workflow Notification Mailer');

  Possible values:
  RUNNING
  STARTING
  STOPPED_ERROR
  DEACTIVATED_USER
  DEACTIVATED_SYSTEM

 Stop notification mailer

  sqlplus apps/<apps password>
  declare
       p_retcode number;
       p_errbuf varchar2(100);
       m_mailerid fnd_svc_components.component_id%TYPE;
  begin
       -- Find mailer Id
       -----------------
       select component_id
         into m_mailerid
         from fnd_svc_components
        where component_name = 'Workflow Notification Mailer';
       --------------
       -- Stop Mailer
       --------------
       fnd_svc_component.stop_component(m_mailerid, p_retcode, p_errbuf);
       commit;
  end;
  /

Start notification mailer

  sqlplus apps/<apps password>
  declare
       p_retcode number;
       p_errbuf varchar2(100);
       m_mailerid fnd_svc_components.component_id%TYPE;
  begin
       -- Find mailer Id
       -----------------
       select component_id
         into m_mailerid
         from fnd_svc_components
        where component_name = 'Workflow Notification Mailer';
       --------------
       -- Start Mailer
       --------------
       fnd_svc_component.start_component(m_mailerid, p_retcode, p_errbuf);
       commit;
  end;
  /


A workflow notification send event (notification email) can fail at several different points, so monitoring it using one method usually is not going to give you a complete picture.Additionally, you have to keep in mind that the process is dynamic, meaning that as transactions are created into the queues they are also mailed out; so a
count of data is at best only a snapshot of a particular moment in time.
 

  Here is a more robust script for monitoring the wf_notifications table:
select message_type, mail_status, count(*) from wf_notifications
where status = 'OPEN'
GROUP BY MESSAGE_TYPE, MAIL_STATUS
messages in 'FAILED' status can be resent using the concurrent request 'resend failed workflow notificaitons'
messages which are OPEN but where mail_status is null have a missing email address for the recipient, but the notification preference is 'send me mail'
 

 Some messages like alerts don't get a record in wf_notifications table so you have to watch the WF_NOTIFICATION_OUT queue.

select corr_id, retry_count, msg_state, count(*)
from applsys.aq$wf_notification_out
group by corr_id, msg_state, retry_count
order by count(*) desc;
Messages with a high retry count have been cycling through the queue and are not passed to smtp service.Messages which are 'expired' can be rebuilt using the wfntfqup.sql

The following SQL to collect all the info except IMAP account password.

select p.parameter_id,
p.parameter_name,
v.parameter_value value
from fnd_svc_comp_param_vals_v v,
fnd_svc_comp_params_b p,
fnd_svc_components c
where c.component_type = ‘WF_MAILER’
and v.component_id = c.component_id
and v.parameter_id = p.parameter_id
and p.parameter_name in (‘OUTBOUND_SERVER’, ‘INBOUND_SERVER’,
‘ACCOUNT’, ‘FROM’, ‘NODENAME’, ‘REPLYTO’,'DISCARD’ ,’PROCESS’,'INBOX’)


How to Enable the Workflow Logging:

From Self Service > Select “Workflow Manager” under “Oracle Applications Manager” > Click “Notification Mailers” > Service Components (Service Components: <SID>) >
b. Click “Workflow Mailer Service” under “Container” Column.
e. From “Service Instances for Generic Service Component Container:<SID>”page, click “Pull Down” button from the Start All/ Stop All.
f . Select Stop All > Go.
g. We conformed that for the Services to read Actual 0 Target 0 and Deactivated.
h. Restart the mailer services using the “Start All” button.
I. We run the following SQL to make sure service are stopped.

SELECT component_name, component_status, component_status_info
FROM fnd_svc_components_v
WHERE component_name like ‘Workflow%’;

Enable the Statement logging in Workflow Mailer.
Log files are created  $APPLCSF/$APPLLOG/FNDCPGSC*.txt i.e. the log file for the Active process for Workflow Mailer Service and Agent Listener services.
To retrieve the last 2 log files for Workflow Mailer and Agent Listener services, run the following command:
ls -lt $APPLCSF/$APPLLOG/FNDCPGSC*.txt

How does workflow Notification Mailer IMAP (Inbound Processing) Works:

This is the inbound flow:

1. Approver sends email response which is directed to the value defined in Replyto address.
a. This address has been setup by the customer’s mail administrator to route incoming mail to the IMAP Inbox folder.
2. The Workflow Inbound Agent Listener picks up the message. Only messages which are in ‘unread’ state are evaluated; the rest of the messages in the inbox are ignored.

3. The message is scanned to see if it matches entries in the TAG file . Mail tags are defined in the OAM mailer configuration pages and these list strings of text and actions to take if those strings are encountered. An example of this are ‘Out of Office’ replies. If the string of the message matches a mail tag and the action is ‘Ignore’ then nothing else will happen.

4. The message is then scanned for the presence of a Notification Id (NID). This NID is matched against valid NID for the mailer node.

5. If valid NID is not detected, (and there is no matching TAG file entry) then the message is placed into the DISCARD folder.

6. If a valid NID is detected the listener raises a subscription to the WF_NOTIFICATION_IN queue and places the mail message in the Processed folder.

7. From this point on the message is handled by the product workflow (like PO APPROVAL) . An event created by that group will monitor the WF_NOTIFICATION_IN queue and will trigger the rest of the approval workflow.


Here are steps/events for Oracle Workflow Notification Outbound Processing(eMail from Oracle Applications Workflow to Users)

1.When workflow Engine determines that a notification message must be sent, it raises an event in BES (Business Event System) oracle.apps.wf.notifications.send
Event is raised with Notification ID (NID) as event key

2. There is seeded subscription to this Event

3. Event is placed on WF_DEFERRED agent

4.Event is dequeued from WF_DEFERRED and subscription is processed

5. Subscription places event message to WF_NOTIFICATION_OUT agent.

6.Notification Mailer dequeues message from WF_NOTIFICATION_OUT agent and
6.1convert XML representation of notification into MIME encoded message (Multi-purpose Internet Mail Extensions) and
6.2 Send message by SMTP (Simple Mail Transfer Protocol) to intended user (IfTest Address/Override Address is set then email is sent to Test Address


E-Mail Notification is sent if all below conditions are true
a) Notification status is OPEN or CANCELED   and
b) Notification mail_status is MAIL or INVALID  and
c) Recipient Role has a valid e-mail address and Notification Preference is in the format MAIL%
d) Workflow Deferred Agent Listener is running
e) Workflow Notification Mailer is running

To check a) & b) run below query
SELECT status, mail_status  FROM wf_notifications WHERE notification_id = ‘&NID’;

mail_status >> SENT means mail has gone out of mailer to user

To check c) run below query
SELECT email_address, nvl(WF_PREF.get_pref(name, ‘MAILTYPE’),notification_preference)
FROM wf_roles
WHERE name = upper(‘&recipient_role’);

To check d) & e) Use OAM (Oracle Application Manager)


How to purge e-mail notifications from the Workflow queue

Sometimes Due to large number of e-mail notifications to accumulated in the queue Workflow mailer will not start,To fix this issue we need purge the notifications from the Workflow queue.


The below outlines the steps, Please take proper backup before performing the below.

1) You need to update the notifications you do not want sent, in the WF_NOTIFICATIONS table.

2) Check the WF_NOTIFICATIONS table as below. Records where status = ‘OPEN’ and mail_status = ‘MAIL’ are notifications that will have an e-mail notification sent.

SQL> select notification_id,status,mail_status,begin_date from WF_NOTIFICATIONS where status = ‘OPEN’ and mail_status = ‘MAIL’;

3) This should show you which notifications are waiting to be e-mailed.

4) To update a notification so that it will not get e-mailed. Set the MAIL_STATUS = ‘SENT’. The mailer will think the e-mail has already been sent and it will not send it again.

SQL> update WF_NOTIFICATIONS set mail_status = ‘SENT’ where mail_status = ‘MAIL’;

-> This will update all notifications waiting to be sent by the mailer.

5) Then run the script wfntfqup.sql to purge the WF_NOTIFICATION_OUT queue and rebuild it with data currently in the WF_NOTIFICATIONS table. This is what purges all notifications waiting in the queue to be sent.Only the ones where mail_status = ‘MAIL’ and status = ‘OPEN’ will be placed in the WF_NOTIFICATION_OUT queue and sent by the mailer.

SQL>sqlplus apps/apps_pwd @$FND_TOP/patch/115/sql/wfntfqup APPS APPS_PWD APPLSYS

6) Now you can start your WF Containers and then Mailer




External WebTier for iRecruitment with Reverse Proxy Alone in DMZ

A complex terminology to listen or read the topic.But practically, this is the best and practical approach for hosting the iRecruitment Portal on internet using the external web tier.

a) iRecruitment Module is fully configured and it is working with the internal Tier

b) All the required patches are successfully applied.

c) Hostname of the server is successfully registered over intetrnet

d) Company has got pre-configured Firewall and Reverse Proxy Setup to handle the External Tier.

This example covers the topology of having a separate Webtier and the Reverse Proxy alone in the DMZ.

i) Run the adpreclone.pl on Appstier and copy the Apps Tier into the External WebTier.

                             Internal AppsTier - internal.xxxx.com

                              External AppsTier - external.xxxx.com

ii) Run the Adcfgclone.pl AppsTier and configure the AppsTier.

Target System Hostname (virtual or normal) [mscorisup1] :external

Target System Database SID :PROD

Target System Database Server Node [mscorisup1] :internal

Target System Base Directory : /d03/erp/appl/PROD

Target System Tools ORACLE_HOME Directory [/d03/erp/appl/PROD/apps/tech_st/10.1.2] :

Target System Web ORACLE_HOME Directory [/d03/erp/appl/PROD/apps/tech_st/10.1.3] :

Target System APPL_TOP Directory [/d03/erp/appl/PROD/apps/apps_st/appl] :

Target System COMMON_TOP Directory [/d03/erp/appl/PROD/apps/apps_st/comn] :

Target System Instance Home Directory [/d03/erp/appl/PROD/inst] :

Target System Root Service [enabled] :

Target System Web Entry Point Services [enabled] :

Target System Web Application Services [enabled] :

Target System Batch Processing Services [enabled] :

Target System Other Services [enabled] :

Do you want to preserve the Display [external:0.0] (y/n) ? : n

Target System Display [external:0.0] : external:7

Do you want the the target system to have the same port values as the source system (y/n) [y] ? : n

Target System Port Pool [0-99] : 7

Checking the port pool 7

done: Port Pool 7 is free

UTL_FILE_DIR on database tier consists of the following directories.

    /usr/tmp

Choose a value which will be set as APPLPTMP value on the target node [1] : 1

Creating the new APPL_TOP Context file from :

The new APPL_TOP context file has been created :

/d03/erp/appl/PROD/inst/apps/PROD_external/appl/admin/PROD_external.xml                     



iii) Stop all the services, and make the changes in the context file to configure the external tier to run only the Web Services.:

            <oa_service_status oa_var="s_concstatus">disabled</oa_service_status>

<oa_system_config>

         <TIER_DB oa_var="s_isDB">NO</TIER_DB>

         <TIER_ADMIN oa_var="s_isAdmin">NO</TIER_ADMIN>

         <TIER_WEB oa_var="s_isWeb">YES</TIER_WEB>

         <TIER_FORMS oa_var="s_isForms">NO</TIER_FORMS>

         <TIER_NODE oa_var="s_isConc">NO</TIER_NODE>

         <TIER_FORMSDEV oa_var="s_isFormsDev">NO</TIER_FORMSDEV>

         <TIER_NODEDEV oa_var="s_isConcDev">NO</TIER_NODEDEV>

         <TIER_ADADMIN oa_var="s_isAdAdmin">NO</TIER_ADADMIN>

         <TIER_ADNODE oa_var="s_isAdConc">NO</TIER_ADNODE>

         <TIER_ADNODEDEV oa_var="s_isAdConcDev">NO</TIER_ADNODEDEV>



iv)Update the Hierarchy Type for the following profile options to Responsibility+Server:

      User Profile Name
   

Internal Name

1. Applications Web Agent
   

APPS_WEB_AGENT

2. Applications Servlet Agent
   

APPS_SERVLET_AGENT

3. Applications JSP Agent
   

APPS_JSP_AGENT

4. Applications Framework Agent
   

APPS_FRAMEWORK_AGENT

5. ICX:Forms Launcher
   

ICX_FORMS_LAUNCHER

6. ICX: Oracle Discoverer Launcher
   

ICX_DISCOVERER_LAUNCHER

7. ICX: Oracle Discoverer Viewer Launcher
   

ICX_DISCOVERER_VIEWER_LAUNCHER

8. Applications Help Web Agent
   

HELP_WEB_AGENT

9. Applications Portal
   

APPS_PORTAL

10. BOM:Configurator URL of UI Manager
   

CZ_UIMGR_URL

11. QP: Pricing Engine URL
   

QP_PRICING_ENGINE_URL

This can be updated using the script :

sqlplus apps/<apps_pwd> @$FND_TOP/patch/115/sql/txkChangeProfH.sql SERVRESP

Copyright (c) 1982, 2005, Oracle.  All rights reserved

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

Changing the hierarchy type for the  Profile APPS_WEB_AGENT

Profile APPS_WEB_AGENT hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile APPS_SERVLET_AGENT

Profile APPS_SERVLET_AGENT hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile APPS_JSP_AGENT

Profile APPS_JSP_AGENT hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile APPS_FRAMEWORK_AGENT

Profile APPS_FRAMEWORK_AGENT hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile ICX_FORMS_LAUNCHER

Profile ICX_FORMS_LAUNCHER hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile ICX_DISCOVERER_LAUNCHER

Profile ICX_DISCOVERER_LAUNCHER hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile ICX_DISCOVERER_VIEWER_LAUNCHER

Profile ICX_DISCOVERER_VIEWER_LAUNCHER hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile HELP_WEB_AGENT

Profile HELP_WEB_AGENT hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile APPS_PORTAL

Profile APPS_PORTAL hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile CZ_UIMGR_URL

Profile CZ_UIMGR_URL hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile QP_PRICING_ENGINE_URL

Profile QP_PRICING_ENGINE_URL hierarchy type has been

successfully changed to SERVRESP

Changing the hierarchy type for the  Profile TCF:HOST

Profile TCF:HOST hierarchy type has been

successfully changed to SERVRESP

v)Update the node trust level:

-          Login to Oracle E-Business Suite as sysadmin user using the internal URL

-          Select the System Administrator Responsibility

-          Select Profile / System

-          From the 'Find system profile option Values' window, select the server that you want to designate as the external web tier – find and select server erpapps4

-          Query for %NODE%TRUST%. You will see a profile option named 'Node Trust Level'. The value for this profile option at the site level will be Normal. Leave this setting unchanged.

-          Set the value of this profile option to External at the server level. The site level value should remain set to Normal

-          Save.

vi) Update the list of responsibilities :

-       Query for %RESP%TRUST%. You will see a profile option named 'Responsibility trust level'. The value for this profile option at site level will be Normal.  Leave this setting unchanged.

-       Set the value of this profile option for the chosen responsibility to External at the responsibility level. The site-level value should remain Normal.

-       Repeat for all responsibilities that you want to make available from the external web tier.

-       Save

-       Add the responsibilities to the Guest User.

-       The above setting should be enabled for the following Responsibilities:

i)                    iRecruitment External Site Visitor

ii)                  iRecruitment External Candidate.

vii) Run the auoconfig on all nodes and check the accessibility of the iRecruitement Portal internally.

viii)Configuring the Reverse Proxy:

                     The Following entry needs to be added inside the Reverse Proxy Server to translate the external url to internal and visa-versa i.e.  irec.groovy.com <--> external.xxxxx.com




<VirtualHost *:80>

        ServerName irec.groovy.com

        ProxyPreserveHost on

        ProxyPass / http://external.xxxxx.com:8007

        ProxyPassReverse / http://external.xxxxx.com:8007

</VirtualHost>



ix) Configure the External webTier to be accessible on the registered URL:

Backup the External Tier context file and edit the following parameters as :

i)              s_webentryhost, to the reverse proxy server hostname – irec

ii)             s_webentrydomain, to the domain name of the reverse proxy server – groovy.com:80

iii)            s_active_webport, to the reverse proxy listener port – 80

iv)            s_webentryurlprotocol, to the webentry point protocol – http

v)             s_login_page, to <webentry protocol>://<webentry point>.<webentry domain>:<active webport> -http://irec.groovy.com:/OA_HTML/IrcVisitor.jsp

Before:

<webentryhost oa_var="s_webentryhost">external</webentryost>
<webentrydomain oa_var="s_webentrydomain">xxxxx.com</webentrydomain>
<activewebport oa_var="s_active_webport" oa_type="DUP_PORT" base="8000" step="1" range="-1" label="Active Web Port">8007</activewebport>
<externURL oa_var="s_external_url">http://external.xxxxx.com:8007/OA_HTML/IrcVisitor.jsp</externURL>
<login_page oa_var="s_login_page">http://external.xxxxx.com:8007/OA_HTML/IrcVisitor.jsp</login_page>



After:

<webentryhost oa_var="s_webentryhost">irec</webentryhost>
<webentrydomain oa_var="s_webentrydomain">groovy.com</webentrydomain>
<activewebport oa_var="s_active_webport" oa_type="DUP_PORT" base="8000" step="1" range="-1" label="Active Web Port">80</activewebport>
<externURL oa_var="s_external_url">http://irec.grrovy.com:80</externURL>
<login_page oa_var="s_login_page">http://irec.groovy.com:80/OA_HTML/IrcVisitor.jsp</login_page>


x)Run Autoconfig on External tier to effect the changes made in the context file and start the web Services using the command adopmnctl.sh startall.


xi) Access the URL over internet i.e. http://irec.xxxxx.com


xii) After successful access, enable the firewall for external tier:

 

An inbuilt URL based firewall is enabled by default, once the node is set as EXTERNAL. This can be enabled or disabled based on the context value :

BEFORE:
<urlfirewall oa_var="s_enable_urlfirewall"/>

AFTER:
<urlfirewall oa_var="s_enable_urlfirewall">#</urlfirewall>

Edit the /d03/erp/appl/PROD/inst/apps/PROD_external/ora/10.1.3/Apache/Apache/conf/url_fw.conf and uncomment all the IRC related links and comment all the other links.so, that this server can be used only for iRecruitment purpose:





#==============================================================

#Include the initial default start page

# INITIAL PAGE

#==============================================================



#RewriteRule ^/$ /OA_HTML/AppsLocalLogin.jsp [R,L]

#RewriteRule ^/$ /OA_HTML/AppsLogin.jsp [R,L]

#RewriteRule ^/$ /OA_HTML/AppsLogin [R,L]



#Re-direct to the iRecruitment home page

RewriteRule ^/$ /OA_HTML/IrcVisitor.jsp [R,L]

#Re-direct to the iStore home page

#RewriteRule ^/$ /OA_HTML/ibeCZzpHome.jsp [R,L]





#==============================================================

#Include all static files (wildcarded)

# STATIC Patterns

#==============================================================



RewriteRule ^/OA_MEDIA/.*\.(gif|jpg|jpeg|bmp)$ - [L]

RewriteRule  ^/OA_HTML/.*\.(gif|jpg|jpeg|bmp)$ - [L]

RewriteRule  ^/OA_HTML/.*\.(js|css|xss)$ - [L]

RewriteRule  ^/OA_HTML/.*\.(xls|avi)$ - [L]

RewriteRule  ^/OA_HTML/.*\.(htm|html)$ - [L]

#RewriteRule  ^/OA_HTML/.*\.(HTM|HTML)$ - [L]   # Only if needed

RewriteRule  ^/robots.txt$ - [L]

RewriteRule  ^/favicon.ico$ - [L]

#================================================================

#Include URLs for product IRC (iRecruitment)

# IRC Product Pages

# jsp - external only

#================================================================

RewriteRule  ^/OA_HTML/IrcVisitor\.jsp$  - [L]

RewriteRule  ^/OA_HTML/xdo_doc_display\.jsp$  - [L]

RewriteRule ^/OA_HTML/JobPositionSeeker\.xsl$ - [L]

RewriteRule ^/OA_HTML/IRCRESUMEUK1\.xsl$ - [L]

RewriteRule ^/OA_HTML/IRCRESUMEUK2\.xsl$ - [L]

RewriteRule ^/OA_HTML/IRCRESUMEUS1\.xsl$ - [L]

RewriteRule ^/OA_HTML/IRCRESUMEUS2\.xsl$ - [L]

RewriteRule ^/OA_HTML/IRCRESUMEUS3\.xsl$ - [L]

xiii) Restart the Services and try to access the page other than the iRecruitment portal.It should be denied by the firewall.

cd $ADMIN_SCRIPTS_HOME



sh adopmnctl.sh stopall

sh adopmnctl.sh startall



Troubleshooting the External Tier:



i) Unable to access the external URL

                           check the status of opmn services using the command: adopmnctl.sh status.

If the services are down, restart the services using the adopmnctl.sh stopall - adopmnctl.sh startall


ii) Gone:Access to the requested URI has been blocked by URL firewall

              

When a user tries to access other than iRecuitment pages over the internet gets this error. As all these URI’s and different page accesses are controlled from the file url_fw.conf which is in /d03/erp/appl/PROD/inst/apps/PROD_external/ora/10.1.3/Apache/Apache/conf

Whenever the autoconfig is run on EXTERNAL is ran, the custom settings inside this file are overwritten, hence need to reconfigure the firewall.Need to reconfigure this after running the Autoconfig.

Redirection of URL to Login Page

i)                    Either the Login Page value in the external tier context file changed to default value(default value is http://external.xxxxx.com:8007/OA_HTML/AppsLogin). Which should be manually changed from the default value to

<login_page oa_var="s_login_page">http://irec.groovy.com.ng:80/OA_

HTML/IrcVisitor.jsp</login_page>

ii)                  Or the Default Login Page IrcVisitor.jsp is blocked by the Firewall Configuration file, which happens when you run the Autoconfig on external Tier.After running the autoconfig on external WebTier it is mandatory to copy the url_fw.conf.irc to url_fw.conf and restart the opmn services.