Mails not leaving mail queue

Hello,

I have a problem with jira, I'm using Version of JIRA (v6.0.7#6106-sha1:76d7c58) everything seams to be working fine on my server the test email works but

Mail Messages seems to be getting stuck in the Mail Queue if flush it all the emails are sent but dose not by it self

please help....

:)

Vatsal


6 answers

1 accepted

This widget could not be displayed.

Hey vastal,

This problem is quite common, and the root cause of the problme may vary a lot from instance to another instance. Before trying any hands-on solutions, can you try to perform the following and check whether the problem still persists:

# Shut down JIRA

# Delete the content of {{$JIRA_INSTALL/work}} directory

# Delete the content of {{$JIRA_HOME/caches/indexes}} directory

# Delete the content of {{$JIRA_HOME/plugins/.bundled-plugins}} directory

# Delete the content of {{JIRA_HOME/plugins/.osgi-plugins}} directory

# Start-up JIRA

# Perform indexing (System > Advanced > Indexing)

Hope that helps.

Thanks Ala. This resolved our mail queue blocking issue and really needs to be added as a first step to try in this knowledge base page -https://confluence.atlassian.com/display/JIRAKB/Mail+Queue+Never+Flushed+Automatically

nice, this solution solve my issue too

solved my issue! excellent post my friend :).

solved my issue too! Thank you!

The third step of this advice rendered my JIRA instance in a state where I was unable to re-build the indexes.  Fortunately I had made a back-up of the indexes directory and so was able to restore them to their previous state.

After restart the notification queue keeps growing. This procedure did not solve the issue for me and i am running JIRA version 7.1.9.

It works for me, But I was only havng  {{$JIRA_INSTALL/work}} directory

This widget could not be displayed.

As Timothy says logging protocol details will likely show up the problem.

In the outbound mail server, if you can send a test mail you can validate your outbound smtp settings. If that doesnt work you have a user auth / server connectivity configuration problem.

If that works, a common reason for this is that you have defined a per-project custom from: address that is not the same as your smtp outbound server. Check projects involved, clear the default from: address to rule it out; Mail servers usually restrict what address you can send 'from' as its possibly a spamming vector. If you have a mailserver that does bad things like reject mail outright (Exchange does this) then you get your symptoms. Servers like Gmail rewrite the from: address to the outbound smtp address.

Past that, info from the logs will inform better answers

This widget could not be displayed.

Hi all,

I have the same issue. However I am currently using the Jira OnDemand solution and don't know what to do now.

I saw that Jiro got updated yesterday to the 6.3 Version.

Can anyone help please??

Thank in advance,
Georgios Dimoulis

Hello Georgios,

If you hit into thi problem in your OnDemand instance, there is, I'm afraid, a little you can do from your side. The best way is to create a support ticket in our OnDemand support Project, and our engineers will look into the issue.

Regards,

Ala

This widget could not be displayed.

We are having the same exact issue in our onDemand instance - this problem started very recently

our version of jira is listed as

JIRA v6.3-OD-01-067

Is there an open support ticket that we can add our vote and voice to?

Thank you

Bruno,

There was a bug with the latest deployment of OnDemand instances. However, the fix for the outgoing mail problem has already been rolled out, so it should be fixed by now on your instance. However, if you are still facing the problem, please do not hesitate to let us know on our Support system.

-Ala

This widget could not be displayed.

I just spent way too much time fixing this on our JSD instance, so I'm publishing this answer on every article that seems related in case it saves others time.

This answer does involve some database manipulation (the email queue is stored in AO_4E8AE6_NOTIF_BATCH_QUEUE), which I know is frowned upon, but it was the only thing that worked after trying every other solution I found (clearing caches, changing ntp, trying safe mode, etc).

  1. Take note of the emails that are failing to send. This will be obvious in the Mail Queue (Admin Cog → System → Mail Queue).

    1. -- AO_4E8AE6_NOTIF_BATCH_QUEUE is where the mail queue is stored in the database
      -- This will return the matching emails in the database
      select
      -- Join the project key on the issue number to get something the issueKey <PROJ-325>
      distinct p.pkey + '-' + cast(i.issuenum as varchar) as issueKey
      -- AO_4E8AE6_NOTIF_BATCH_QUEUE is the table that stores the pending notifications. This is the email queue!
      from JIRAServiceDesk.jiraschema.AO_4E8AE6_NOTIF_BATCH_QUEUE as q
      left join jiraschema.jiraissue i on i.id = q.ISSUE_ID
      left join jiraschema.project p on p.id = i.PROJECT
  2. Stop the JIRA website
  3. Delete all indexes
    1. rm {JIRA-HOME}/caches/indexes/* -f -R
  4. Backup the records that are failing to send for safe-keeping in SQL server
    1. select q.*
      into JIRAServiceDesk.jiraschema.[AO_4E8AE6_NOTIF_BATCH_QUEUE-BACKUP_BEFORE_CLEARING_QUEUE]
      from JIRAServiceDesk.jiraschema.AO_4E8AE6_NOTIF_BATCH_QUEUE as q
      where q.SENT_TIME is null
  5. Set the SENT_TIME on the stuck notifications so they don't try to send again.
    1. update JIRAServiceDesk.jiraschema.AO_4E8AE6_NOTIF_BATCH_QUEUE
      set SENT_TIME = 1526297477500 -- UNIX time that wasn't used on any other issues
      where sent_time is null
  6. Start the Service Desk.
  7. Confirm that the Mail Queue is empty in the  (Admin Cog → System → Mail Queue).
  8. Run a Locked index to rebuild the ones we deleted (Admin Cog → System → Indexing → Lock JIRA and rebuild index)
  9. Continue to monitor the Mail Queue as Customer Notifications should be sent out.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

281 views 5 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you