Email generated from Workflows stuck in queue
Hi,
I have an AEM system which we've recently upgraded from 6.0 to 6.2. While testing the environment post upgrade we've noticed that email notifications that are triggered as part of workflows are not being sent out. To simplify testing I created a workflow with just one step, to send an email to one user. I also confirmed that this user has a valid email address. When I execute this workflow it is stuck in RUNNING state and no email is sent out. I added logging around workflows and email and see the following.
01.02.2017 14:25:05.657 *DEBUG* [CQWorkflowStatisticsService-Processor] com.day.cq.workflow.impl.statistics.CQWorkflowStatisticsService Workflow Statistics processor. Processing com/day/cq/workflow/event type: WorkflowStarted
01.02.2017 14:25:05.657 *INFO* [Thread-12] com.day.cq.workflow.impl.statistics.CQWorkflowStatisticsService handleEvent: put event [WorkflowStarted] in queue, size now [0]
01.02.2017 14:25:05.657 *DEBUG* [Thread-12] com.day.cq.workflow.impl.email.EMailNotificationService handleEvent: put event [WorkflowStarted] in queue, size now [46]
01.02.2017 14:25:05.657 *DEBUG* [CQWorkflowStatisticsService-Processor] com.day.cq.workflow.impl.CQWorkflowService Creating GRANITE workflow session wrapper for user: workflow-service
01.02.2017 14:25:05.657 *DEBUG* [sling-threadpool-99082294-dc9c-498c-af22-0ccbd56c7bf1-(com.day.cq.wcm.workflow.impl.wcmworkflowserviceimpl)-88] com.day.cq.workflow.impl.CQWorkflowService Creating GRANITE workflow session wrapper for user: wcm-workflow-service
01.02.2017 14:25:05.688 *INFO* [Thread-16] com.day.cq.workflow.impl.statistics.CQWorkflowStatisticsService handleEvent: put event [NodeTransition] in queue, size now [1]
01.02.2017 14:25:05.688 *DEBUG* [Thread-16] com.day.cq.workflow.impl.email.EMailNotificationService handleEvent: put event [NodeTransition] in queue, size now [47]
01.02.2017 14:25:05.688 *DEBUG* [CQWorkflowStatisticsService-Processor] com.day.cq.workflow.impl.statistics.CQWorkflowStatisticsService Workflow Statistics processor. Processing com/day/cq/workflow/event type: NodeTransition
01.02.2017 14:25:05.688 *DEBUG* [sling-threadpool-99082294-dc9c-498c-af22-0ccbd56c7bf1-(com.day.cq.wcm.workflow.impl.wcmworkflowserviceimpl)-89] com.day.cq.workflow.impl.CQWorkflowService Creating GRANITE workflow session wrapper for user: wcm-workflow-service
01.02.2017 14:25:05.688 *DEBUG* [CQWorkflowStatisticsService-Processor] com.day.cq.workflow.impl.CQWorkflowService Creating GRANITE workflow session wrapper for user: workflow-service
01.02.2017 14:25:05.751 *DEBUG* [10.11.19.14 [1485977105751] GET /libs/cq/workflow/content/console/instances.json HTTP/1.1] com.day.cq.workflow.impl.CQWorkflowService Creating GRANITE workflow session wrapper for user: admin
01.02.2017 14:25:05.860 *DEBUG* [10.11.19.14 [1485977105751] GET /libs/cq/workflow/content/console/instances.json HTTP/1.1] com.day.cq.workflow.util.WorkflowUtil WORKFLOW JOBS: 0
So I can see that it is getting added to some queue, but I have no idea where this queue is or what is in it.
It should also be noted that the SMTP server being used is setup and working. This worked before the AEM upgrade and no changes were made to it. Also, emails generated by other parts of the application (like feedback forms on the publish site) generate an email as expected.
One theroy is that there may be something wrong with the workflow service accounts. But since these are all auto-generated I'm not sure how to check this. Has anyone run into similar issues and resolved it? Any advice would be appreciated.
Thanks