JIRA Stops Creating Issues from Emails at certain times due to XML backup
Symptoms
JIRA stops creating issue from emails. When restarting JIRA it works fine.
The following appears in the atlassian-jira.log
:
2012-07-31 09:13:06,404 ERROR [jira@yoursite.com] QuartzWorker-0 ServiceRunner Automatic creation of tickets [10050]: Exception:
javax.mail.MessagingException: Exception reading response;
nested exception is:
java.net.SocketTimeoutException: Read timed out
com.atlassian.mail.MailException: javax.mail.MessagingException: Exception reading response;
nested exception is:
java.net.SocketTimeoutException: Read timed out
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:193)
at com.atlassian.jira.service.services.mail.MailFetcherService$ErrorEmailForwarderImpl.sendMail(MailFetcherService.java:540)
at com.atlassian.jira.service.services.mail.MailFetcherService$ErrorEmailForwarderImpl.forwardEmail(MailFetcherService.java:502)
at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:363)
at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:259)
at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:344)
at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:250)
at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61)
at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47)
at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: javax.mail.MessagingException: Exception reading response;
nested exception is:
java.net.SocketTimeoutException: Read timed out
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2210)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2093)
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1900)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1122)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:166)
... 11 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:89)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2188)
... 15 more
Diagnosis
There is a specific time when this happens. For example, JIRA stops picking up emails from the mail account on a specific time. This might be the time when your XML backup starts.
Cause
Your XML backup causes read timeouts.
Workaround
Try configuring your XML backup at night. Then script a JIRA restart to see if that does the trick. This solution, albeit a dirty one, should get you far.
Resolution
- Check this page about automating JIRA Backups.
- Switch to a database dump using your native DB tools:
For production use or large JIRA installations, it is strongly recommended that you use native database-specific tools instead of the XML backup service. XML backups are not guaranteed to be consistent, as the database may be updated during the backup process. Inconsistent backups are created successfully without any warnings or error messages, but fail during the restore process. Database-native tools offer a much more consistent and reliable means of storing data.