Agent Mails Not Being Sent

From DocWiki

Revision as of 21:17, 15 November 2011 by Ginod (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Contents

Scenario Setup

UCCE

  1. Change Wait nodes in UCCE EIM script to be 3600 seconds

Services Server

  1. Enable McAfee Access Protection for mass-mailing worms, blocking port 25.

Agent PC

  1. Send an email from customer@eim.lab to support@eim.lab
  2. Log in as Integrated Agent "goofy" and go ready for other channels
  3. "Send and Complete" a reply to the customer

Problem Statement

Customer does not receive reply sent by agent.

What is the activity_status/activity_sub_status and activity_type/activity_sub_type in the eGActiveDB?

Check the eGActiveDB for anything immediately visible.

select * from egpl_casemgmt_activity order by activity_id desc

OutgoingEmails.png

In the above screenshot we can see a mixture of email activity_sub_type:

  • activity_sub_type 1 = Inbound email (from customer to system)
  • activity_sub_type 6 = Reply email (from agent to customer)
  • activity_sub_type 10 = Auto-response email (from system to customer)


As well as a mixture of activity_status:

  • activity_status 4000 = Assignment
  • activity_status 7000 = Pre-Completion
  • activity_status 9000 = Completed

From this we can conclude that emails were sending up until a certain point in time, but inbound emails are still being retrieved.

What process is responsible for sending emails?

Dispatcher process "dispatches" emails, so this would be a great place to start.

With INFO level logs, we can search by Activity ID. With ERROR level, activity IDs will not show up.

We can see from the below log that our Dispatcher is having trouble connecting to the SMTP server, and that is why the mail has not been sent.

2011-06-22 13:47:49.936 GMT-0400 <@> INFO <@> [77:DxInstance id : 998] <@> ProcessId:4384 <@> PID:1 <@> UID:12 <@> HttpSessionId:  <@> com.egain.platform.module.dispatcher.service.DxProcess <@> runDispatcher() <@> Working on Activity Id Range: 1046 to 1046. Retry emails flag: 1 <@>
2011-06-22 13:47:49.982 GMT-0400 <@> INFO <@> [77:DxInstance id : 998] <@> ProcessId:4384 <@> PID:1 <@> UID:12 <@> HttpSessionId:  <@> com.egain.platform.module.dispatcher.Mailer <@> getDispatcherProperties <@> Dispatcher Config File: g:\eService\config/dispatcher/egpl_dispatcherconfig.properties <@>
2011-06-22 13:47:49.982 GMT-0400 <@> INFO <@> [77:DxInstance id : 998] <@> ProcessId:4384 <@> PID:1 <@> UID:12 <@> HttpSessionId:  <@> com.egain.platform.module.dispatcher.Mailer <@> getDispatcherProperties <@> Socket Timeout: 300 <@>
2011-06-22 13:47:50.123 GMT-0400 <@> ERROR <@> [77:DxInstance id : 998] <@> ProcessId:4384 <@> PID:1 <@> UID:12 <@> HttpSessionId:  <@> com.egain.platform.module.dispatcher.Mailer <@> connectToServer(Session session, int SMTPProtocol, String SMTPUserName, String SMTPPassword, int SMTPFlag) <@> I18N_EGPL_DISPATCHER-FAILED_MESSAGING_EXCEPTION  <@>
javax.mail.MessagingException: Could not connect to SMTP host: 10.77.30.18, port: 25;
  nested exception is:
	java.net.SocketException: Software caused connection abort: connect
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
	at javax.mail.Service.connect(Service.java:288)
	at javax.mail.Service.connect(Service.java:169)
	at com.egain.platform.module.dispatcher.Mailer.connectToServer(Mailer.java:289)
	at com.egain.platform.module.dispatcher.Mailer.connectToServer(Mailer.java:251)
	at com.egain.platform.module.dispatcher.service.DxProcess.dispatchEmail(DxProcess.java:1180)
	at com.egain.platform.module.dispatcher.service.DxProcess.runDispatcher(DxProcess.java:838)
	at com.egain.platform.module.dispatcher.service.DxInstance.startInstance(DxInstance.java:109)
	at com.egain.platform.framework.dsm.common.ThreadPool$PoolThread.run(ThreadPool.java:112)
Caused by: java.net.SocketException: Software caused connection abort: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:367)
	at java.net.Socket.connect(Socket.java:524)
	at java.net.Socket.connect(Socket.java:474)
	at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
	... 9 more
2011-06-22 13:47:50.123 GMT-0400 <@> ERROR <@> [77:DxInstance id : 998] <@> ProcessId:4384 <@> PID:1 <@> UID:12 <@> HttpSessionId:  <@> com.egain.platform.module.dispatcher.service.DxProcess <@> dispatchEmails(int mInstanceId) <@> Failed to connect to SMTP server. <@>
com.egain.platform.module.dispatcher.exception.FailedConnectToServerException: Could not connect to SMTP host: 10.77.30.18, port: 25
	at com.egain.platform.module.dispatcher.Mailer.connectToServer(Mailer.java:303)
	at com.egain.platform.module.dispatcher.Mailer.connectToServer(Mailer.java:251)
	at com.egain.platform.module.dispatcher.service.DxProcess.dispatchEmail(DxProcess.java:1180)
	at com.egain.platform.module.dispatcher.service.DxProcess.runDispatcher(DxProcess.java:838)
	at com.egain.platform.module.dispatcher.service.DxInstance.startInstance(DxInstance.java:109)
	at com.egain.platform.framework.dsm.common.ThreadPool$PoolThread.run(ThreadPool.java:112)
2011-06-22 13:47:50.123 GMT-0400 <@> INFO <@> [77:DxInstance id : 998] <@> ProcessId:4384 <@> PID:1 <@> UID:12 <@> HttpSessionId:  <@> com.egain.platform.module.dispatcher.service.DxProcess <@> actionForRetryEmail(DispatcherEmailData email, String errorMessage) <@> Activity to retry. Reason: Failed to connect to SMTP server.
com.egain.platform.module.dispatcher.exception.FailedConnectToServerException: Could not connect to SMTP host: 10.77.30.18, port: 25 <@>

Why can't Dispatcher connect to the SMTP server?

Ping

Let's first try the obvious: can you ping the SMTP server? Since the Dispatcher process runs on the Services Server, run the ping from there.

PingSMTP.png

Telnet 25

So basic network connectivity is fine. What about port 25? Try to telnet to port 25 of the SMTP server from the Services Server.

Telnet.png

Telnet 80

Something is wrong with port 25. Try another port - in this case, port 80 works.

Port80.png


Why is the port being blocked?

One thing we've all seen at one point or another is TCP ports getting stuck. Try restarting the Dispatcher process. Does it restart successfully or produce an error? If an error occurs, a system reboot would be a wise next step.

But more common with SMTP server errors when network connectivity is fine is the virus scan. McAfee VirusScan is running on our Services Server with Access Protection. Most VirusScan's should have a log, and if we pull ours up we can see:

6/22/2011	1:48:20 PM	Blocked by port blocking rule 	javaw.exe	Prevent mass mailing worms from sending mail	10.77.30.18
6/22/2011	1:49:20 PM	Blocked by port blocking rule 	javaw.exe	Prevent mass mailing worms from sending mail	10.77.30.18
6/22/2011	1:50:20 PM	Blocked by port blocking rule 	javaw.exe	Prevent mass mailing worms from sending mail	10.77.30.18
6/22/2011	1:51:20 PM	Blocked by port blocking rule 	javaw.exe	Prevent mass mailing worms from sending mail	10.77.30.18

Bingo\! Let's disable the port blocking rule "Prevent mass mailing worms from sending mail" on the Services Server so the Dispatcher process can do it's thing.

MassMailRule.png


Resolution

Virus port-blocking protection can actually hinder the functionality of EIM. We learned how to verify port status and diagnose a problem with McAfee VirusScan.

One good takeaway from this scenario is the importance of the Virus Scan settings in the 4.3 Deployments Guide. While you're in the Virus Scan properties, ensure that they are set correctly on all servers.

Virus1.png Virus2.png

Rating: 0.0/5 (0 votes cast)

Personal tools