Email Notifications Not Being Sent

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

No email notifications from Fisheye/Crucible are being sent to users. No errors appear in the atlassian-fisheye-YYYY-MM-DD.log and there are no log entries for emails being sent. 

Diagnosis

For Fisheye/Crucible 3.x, run the following query to check the status of pending emails:

select cru_recipient.cru_email as status, cru_create_date, cru_note, cru_user_name, cru_user.cru_email, cru_displayname from cru_recipient
join cru_notification on cru_recipient.cru_notification_id = cru_notification.cru_notification_id
join cru_user on cru_recipient.cru_user = cru_user.cru_user_id
order by cru_create_date desc;

For Fisheye/Crucible 4.x, run the following query to check the status of pending emails:

select cru_recipient.cru_email as status, cru_create_date, cru_note, cru_user_name, cwd_user.email_address, cwd_user.display_name from cru_recipient
join cru_notification on cru_recipient.cru_notification_id = cru_notification.cru_notification_id
join cru_user on cru_recipient.cru_user = cru_user.cru_user_id
join cwd_user on cwd_user.lower_user_name = cru_user.cru_user_name
order by cru_create_date desc;

The status column will indicate if recent emails are stuck. Pending emails to be sent will have a status of 1 or 2.

StatusAction
0Do not send notification
1

Send notification immediately

2Send notification as a batch
3Notification has been sent

Cause

This is caused when Fisheye/Crucible loses the connection to the network and then tries to send an email, the default settings allow it to wait indefinitely for a connection to the SMTP server. This connection then sits open and does not allow any new emails to be sent until the application is restarted.

Workaround

Restart the Fisheye/Crucible server to terminate the hung connection and send all pending emails.

Resolution

  1. Set the Connection Timeout and Timeout for the SMTP server so that Fisheye/Crucible will close connections instead of hanging on to them indefinitely. A 20 minutes timeout should suffice: 
    1. Administration >> Global Settings >> Server >> Mail Server >> Edit config set both "Connection timeout" and "Timeout" to 1200 (20 minutes).
  2. If you haven't restarted Fisheye/Crucible since the connection hung, you'll still need to perform a restart of the application as the timeout will not apply retroactively to the pending connection that's holding everything up.


Existing feature request

There is an existing feature request to add the timeouts by default:

CRUC-7327 - Getting issue details... STATUS

Last modified on Jul 31, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.