Tuesday, October 15, 2013

11i-12 Unable to Connect to Mail Store in Workflow Notification Mailer Logs (Doc ID 741352.1)

SYMPTOMS

Following error appears in the log files of Workflow Notification Mailer:

GSM-WFMLRSVC-66669-10006 : oracle.apps.fnd.wf.mailer.IMAPInboundProcessor.open(): Unable to connect to mail store
OR

[May 29, 2008 5:12:35 PM EDT]:1212095555750: Thread[outboundThreadGroup1,5,outboundThreadGroup]:0:-1:myhostname:123.43.67:-1:-1:
ERROR:[SVC-GSM-WFMLRSVC-1630247-10006: oracle.apps.fnd.wf.mailer.SMTPOutboundProcessor.send(Message)]:Problem encountered when sending to {[[xxxxxx@domain.com]]} -> javax.mail.MessagingException: 451 Timeout waiting for client input.
OR

Thread[inboundThreadGroup1,5,inboundThreadGroup]:0:-1:erpdb1:10.100.0.8:-1:-1:ERROR:[SVC-GSM-WFMLRSVC-185502-10006 : oracle.apps.fnd.wf.mailer.IMAPInboundProcessor.read()]:Problem encounted when reading new messages -> javax.mail.FolderClosedException: * BYE Connection down
OR

Notifications remain in the inbox.

CAUSE

Workflow Notification Mailer is not able to connect to the associated account in order to process users responses.

SOLUTION

There is not a single potential root cause when 'Unable to Connect to Mail Store' error is noticed in the log files. Set the Workflow Mailer Log Level to Statement and restart the Workflow Mailer Service container to collect trouble shooting diagnostics to determine the cause as many of the reasons for the failure are due to exception and unexpected events which will not be written to the Workflow Mailer Service log when it is set to Error.

1. Log into E-Business as a user assigned the System Administrator responsibility and navigate:

System Administrator > Oracle Applications Manager > Workflow > Notification Mailers > Edit > Advanced

Click Next to get to page 2 and set Log Level: Statement

2. Shutdown and restart the Workflow Mailer Service container so it will create a new Workflow Mailer Service log:

System Administrator > Oracle Applications Manager > Workflow > Notification Mailers > Workflow Mailer Service

Select Workflow Mailer Service and click Stop then wait for State=Deactivated then click Start

Following should be checked in order to solve this issue:

A. Make sure that associated Workflow Mailer account is not locked:

1. Stop the mailer.

2. Connect to the IMAP administration tool and change the Workflow Mailer account password. Make sure nobody uses this new password to connect to the account using any mail client tool.

3. Go to Oracle Applications Manager and change the Workflow Mailer configuration so that the new password is entered there.

4. Start the mailer.

B. Make sure that there are no emails sitting in the Inbox folder of Workflow Mailer account that are not responses to Workflow Email Notifications (e.g. spam messages, out of office responses, undeliverable messages and/or other non-workflow related messages).

Use the Workflow Mailer configuration screens in OAM and change the TAG section to create entries to ignore junk and spam e-mails:
(In Oracle Applications Manager (OAM) --> Navigate to Workflow Manager --> Notification Mailers --> Edit --> Advanced --> Step 6)

For instance, if one of the e-mails that are bugging the mailer has the abstract "AUTOREPLY MESSAGE: The user JSMITH is on holidays" then the text of the new entry can have 'AUTOREPLY MESSAGE' (no quotes) and the action can be ignored.

This way all the messages coming from users with similar subject will be ignored by the java mailer.
How to clean out the imap account

1. Shut down the mailer using the Oracle Applications Manager / Workflow manager console.

2. Using any desktop imap client such as Outlook, logon to the imap account and review the contents of the inbox. Remove any spam messages from the inbox. Ensure that any valid message responses are set to 'unread' when you're done. Each IMAP message carries a read / unread flag in the message header and the mailer will not pick up any messages marked as ‘read’.

3. Use the IMAP client tools to delete and purge excess messages from Process and Discard Folders. Don’t delete these folders and don’t use Unix command line utilities to truncate folders from the file system. Use the IMAP client tool instead.

4. When the account is cleaned up, log off of the account and remove the account from your desktop mail client so that you don’t accidentally automatically log in while the mailer is ever running.

5. Start the mailer using the OAM Workflow manager console.
C. Make sure that no other instance is using the same Workflow Mailer account as set in the instance where the issue appears. You may check this by running below SQL statement on each instance that exists (development, test, clone, production, etc). The same applies in case you are having multiple Workflow Notification Mailers on same instance. You need to set a different account for each and every Workflow Mailer on same instance or different instances.

set pagesize 100
set linesize 132
set feedback off
set verify off

col value format a35
col component_name format a30

select c.component_id, c.component_name, 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 ( 'INBOUND_SERVER','ACCOUNT', 'REPLYTO')
order by c.component_id, c.component_name,p.parameter_name;


NOTE: Run $FND_TOP/sql/wfmlrdbg.sql for a Test Mailer notification_id <NID> to obtain a complete view of ALL you Workflow Mailer configurations.

sqlplus apps/<apps_pwd> @$FND_TOP/sql/wfmlrdbg.sql <NID>

This is a sample of the output of a Workflow Mailer that has processed an iExpense (APEXP) notification response where multiple Dedicated Mailers are configured: wfmlrdbg891806.html


D. Make sure that Workflow Mailer account is not monitored using an email client while Workflow Notification Mailer is up and running. Folders of this account should be monitored only having the Workflow Notification Mailer stopped to prevent locking it.

E. Make sure that "Processor Close on Read Timeout" and "Expunge Inbox on Close" parameter is checked (In OAM --> Navigate to Workflow Manager --> Notification Mailers --> Edit --> Advanced --> Step 2)

To check current value you may execute below SQL statement and the value field should be 'Y':

set pagesize 100
set linesize 132
set feedback off
set verify off

col value  format a35
col component_name    format a30   
 
select c.component_id, c.component_name, 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 = 'PROCESSOR_READ_TIMEOUT_CLOSE' 
 order by c.component_name,p.parameter_name;

NOTE: Run $FND_TOP/sql/wfmlrdbg.sql for a Test Mailer notification_id <NID> to obtain a complete view of ALL you Workflow Mailer configurations.

sqlplus apps/<apps_pwd> @$FND_TOP/sql/wfmlrdbg.sql <NID>

This is a sample of the output of a Workflow Mailer that has processed an iExpense (APEXP) notification response where multiple Dedicated Mailers are configured: wfmlrdbg891806.html
F. Make sure that concurrent manager node is able to reach IMAP server on port 143 or 993. You may check this by logging in on the concurrent manager node as the concurrent managers owner (usually applmgr user) and executing:

1. telnet <imap_server_name> 143

or

2. $AFJVAPRG -classpath $AF_CLASSPATH -Ddebug=Y -Dprotocol=imap \
-Ddbcfile=$$FND_SECURE/<filename>.dbc \
-Dserver=<imap_server_name> -Dport=143 \
-Daccount=<workflow_account> -Dpassword=<password for this account> -Dconnect_timeout= 120 \
-Dfolder=INBOX oracle.apps.fnd.wf.mailer.Mailer

Before running this command, make sure you enter the correct values for the following parameters:
-Ddbcfile=$FND_SECURE/<filename>.dbc \
-Dpassword=<password for this account>
-Dserver=<IMAP server name as defined in Step 3 of mailer configuration>
-Daccount=<Workflow Mailer account>

G. Make sure that there are no users defined that are having white space(s) in the email address. Mailer is erroring out while trying to process responses from these users and is loosing the connection to IMAP server.

If below SQL statement is returning rows you need to correct the email addresses for associated users:

col name  format a25 
col email_address    format a35   

select name, '['||substr(email_address, 1, 25)||']', orig_system from wf_local_roles where email_address like '% %';

NOTE:  The Originating System (orig_system) of the record indicates the product where the email_address was entered i.e PER_ROLE (HR People - HR),  HZ_PARTY (TCA Parties - AR).

H. Increase the Inbound connection time out parameter to 200 or higher (default value is 120) (In OAM --> Navigate to Workflow Manager --> Notification Mailers --> Edit --> Advanced --> Step 3)

I. Check with your IMAP server administrator that there is no time out parameter set to a low value at IMAP server level. This may prevent Workflow Notification Mailer to keep the connection active in order to process the responses.

J. Unsolicited emails in the INBOX can cause the inbound thread used by the mailer to be orphaned.  This thread locks the account and prevents any new connection from being made. A new exception was discovered in the latest version of the mailer code:

UNEXPECTED:[SVC-GSM-WFMLRSVC-224280-10006 : oracle.apps.fnd.wf.mailer.IMAPResponseHandler.handleUnsolicited(EmailParser)]:Problem encounted when handling an unsolicited email -> java.io.IOException: Error in encoded stream, got 1

OR

UNEXPECTED:[SVC-GSM-WFMLRSVC-224280-10006 : oracle.apps.fnd.wf.mailer.IMAPResponseHandler.handleUnsolicited(EmailParser)]:Problem encounted when handling an unsolicited email -> java.io.IOException: Error in encoded stream, got 3


 Note: The patch that fixes the error is documented in Note 974088.1.

1 comment:

  1. Good stuff! Email isn't going to go away and I work with nonprofits that are always wanting to raise money. It's a fact that email remains THE way to get supporters to give and a strong email list makes a strong fundraising campaign. Thanks for your post! http://www.emailmarketingboost.com

    ReplyDelete