mail queue must be flushed manually otherwise email queue stopping sending email

fabby March 28, 2012

my jira version is 4.4.1.

the jira mail queue suddenly stop sending these days

i shall flush the queue manually ,then it will send the mail queue .

i search for the problem on the internet,and it says the instance has hit an OutOfMemoryException.

i restart the jira,and it is ok now,but i do not know wether it will fail too at some time in the future

3 answers

0 votes
Ilya Leonov June 4, 2019

u can force mail queue with java api. for example:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.mail.queue.MailQueue
import com.atlassian.jira.web.action.admin.MailQueueAdmin
import com.atlassian.jira.notification.NotificationSchemeManager

MailQueue mockMailQueue = ComponentAccessor.getComponent(MailQueue.class)
MailQueueAdmin mailQueueAdmin = new MailQueueAdmin(mockMailQueue, ComponentAccessor.getComponent(NotificationSchemeManager.class))

Thread.start{
mailQueueAdmin.setUnstick(true)
mailQueueAdmin.doExecute()
mailQueueAdmin.setFlush(true)
mailQueueAdmin.doExecute()
}

0 votes
Rahul Aich [Nagra]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2012

This happen mostly due to Out of memory errors. Search for outofmemory on stdout log file.

You may treat the symptom by increasing the java heap space memory. But that would be a temporary solution.

You need to investigate on the root cause. The most common possibilities are:

1. 3rd party plugins

2. Custom services

3. XML back-up sucks a lot of memory if the production instance is huge

If these still does not resolve consider upgrading your jira instance as 4.4 is quite an old version and there were a lot of memory related fixes done by atlassian in the newer versions.

Also consider visiting this URL for more information.

https://confluence.atlassian.com/pages/viewpage.action?pageId=191069

fabby December 20, 2012

1 in Atlassian/Application Data/JIRA/log/atlassian-jira.log file,i don't find any description about java heap space.but find the flowing error:

com.atlassian.mail.MailException: com.sun.mail.smtp.SMTPSendFailedException: 554 5.1.0 Sender denied

2 on 'Mail Queue' page,find some mail items with red background,almost all these red background mail item are of the same reporter.


3 and i tried to send a Test Email to this user in 'System->Mail Servers->Send a Test Email'

An error has occurred with sending the test email:
com.atlassian.mail.MailException: com.sun.mail.smtp.SMTPSendFailedException: 554 5.1.0 Sender denied
    at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:179)
    at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:93)
    at webwork.action.ActionSupport.execute(ActionSupport.java:165)
    at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:76)
    at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39)
    at An error has occurred with sending the test email:
com.atlassian.mail.MailException: com.sun.mail.smtp.SMTPSendFailedException: 554 5.1.0 Sender denied
    at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:179)
    at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:93)
    at webwork.action.ActionSupport.execute(ActionSupport.java:165)
    at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:76)
    at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39)
    at

can i guess it's the user's error count that cause JIRA's not send mail automatically?



Naren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2012

This is what I found while looking for the error com.sun.mail.SMTPFailedException: 554. Try searching site:confluence.atlassian.com com.sun.mail.smtp.SMTPSendFailedException.

fabby December 23, 2012

i disable the user account and restart jira. and now jira mail server is working .

0 votes
Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 28, 2012

So, did you have OOM ? If yes, this is your problem, therefore you should increase your heap.

fabby December 19, 2012

i don't know if jira has problem out of memory .on the mail queue page,many mails are in red color

Guido Grune December 19, 2012

Please take a look at you log-File (Where are the JIRA logs?) you should find something like this

java.lang.OutOfMemoryError: Java heap space

Suggest an answer

Log in or Sign up to answer