Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-36801

Some Email Notifications fail to send, if one of the users in the list of users receiving them has an invalid email address

      Symptoms:

      Some users fail to receive some page, or blog post notifications. It seems to happen sporadically, but consistently for a specific space.

      Potential cause:

      The notifications plugin queues up emails with a retry mechanism. This retry attempts to re-send to a recipient when failure happens for whatever reason. This includes failure to verify the email address validity (e.g., a user has a blank, or empty email address).

      The retry does not remove the currently failing recipient, and re-queues the notification, causing it to fail next time (for the same reason). After a set number of failures, the entire batch of recipients is discarded, and thus some recipients (who does have valid email address) fail to receive any email.

      Workaround:
      Find the offending user (user with no/invalid email address) by going to the Manage watcher dialog on the page, and remove them, or add a valid email address.

            [CONFSERVER-36801] Some Email Notifications fail to send, if one of the users in the list of users receiving them has an invalid email address

            To damian.egli1 and anyone else who might be interested:

            I ran into this same problem last week. I managed to list the spaces, pages and blogposts who are being Watched by a user who does not have a valid email address – and the user who is watching them – with this SQL query:

            select
             u.user_name,
             u.display_name,
             s.spacekey,
             s.spacename,
             c.contentid,
             c.title,
             c.contenttype
            from
             notifications n
             inner join
             user_mapping um on n.username = um.user_key
             inner join
             cwd_user u on um.username = u.user_name
             left join
             spaces s on n.spaceid = s.spaceid
             left join
             content c on n.contentid = c.contentid
            where
             u.email_address is null
             or u.email_address not like '%@%'
            order by
             u.user_name,
             s.spacename,
             c.title;
            
            

            Tested in Confluence 5.6.6 and PostgreSQL. You might need some small changes you're using some other DB.

            Joni Nousjärvi added a comment - To  damian.egli1 and anyone else who might be interested: I ran into this same problem last week. I managed to list the spaces, pages and blogposts who are being Watched by a user who does not have a valid email address – and the user who is watching them – with this SQL query: select u.user_name, u.display_name, s.spacekey, s.spacename, c.contentid, c.title, c.contenttype from notifications n inner join user_mapping um on n.username = um.user_key inner join cwd_user u on um.username = u.user_name left join spaces s on n.spaceid = s.spaceid left join content c on n.contentid = c.contentid where u.email_address is null or u.email_address not like '%@%' order by u.user_name, s.spacename, c.title; Tested in Confluence 5.6.6 and PostgreSQL. You might need some small changes you're using some other DB.

            how to find that page on which the offending user shall be notified?

            Damian Egli added a comment - how to find that page on which the offending user shall be notified?

            This is the exception that is thrown when Confluence attempts to send a notification to a recipient without an email address:

            2015-03-07 02:30:12,932 DEBUG [NotificationSender:thread-3] [plugin.notifications.dispatcher.NotificationErrorRegistryImpl] addError Error sending notification to server '<Unknown>'(-1) for INDIVIDUAL task (resent 0 times): Unknown error ''To' is a required field' sending a notification.
            IllegalArgumentException: 'To' is a required field
            java.lang.IllegalArgumentException: 'To' is a required field
                    at com.atlassian.mail.Email.<init>(Email.java:51)
                    at com.atlassian.confluence.plugins.email.medium.ConfluenceSystemMailServer.sendIndividualNotification(ConfluenceSystemMailServer.java:135)
                    at com.atlassian.plugin.notifications.dispatcher.task.IndividualNotificationTask$UserKeySender.send(IndividualNotificationTask.java:197)
                    at com.atlassian.plugin.notifications.dispatcher.task.IndividualNotificationTask.execute(IndividualNotificationTask.java:64)
                    at com.atlassian.plugin.notifications.dispatcher.AbstractNotificationTask.run(AbstractNotificationTask.java:111)
                    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
                    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
                    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                    at java.lang.Thread.run(Thread.java:744)
            

            dave (Inactive) added a comment - This is the exception that is thrown when Confluence attempts to send a notification to a recipient without an email address: 2015-03-07 02:30:12,932 DEBUG [NotificationSender:thread-3] [plugin.notifications.dispatcher.NotificationErrorRegistryImpl] addError Error sending notification to server '<Unknown>'(-1) for INDIVIDUAL task (resent 0 times): Unknown error ''To' is a required field' sending a notification. IllegalArgumentException: 'To' is a required field java.lang.IllegalArgumentException: 'To' is a required field at com.atlassian.mail.Email.<init>(Email.java:51) at com.atlassian.confluence.plugins.email.medium.ConfluenceSystemMailServer.sendIndividualNotification(ConfluenceSystemMailServer.java:135) at com.atlassian.plugin.notifications.dispatcher.task.IndividualNotificationTask$UserKeySender.send(IndividualNotificationTask.java:197) at com.atlassian.plugin.notifications.dispatcher.task.IndividualNotificationTask.execute(IndividualNotificationTask.java:64) at com.atlassian.plugin.notifications.dispatcher.AbstractNotificationTask.run(AbstractNotificationTask.java:111) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

              jxie Chii (Inactive)
              jxie Chii (Inactive)
              Affected customers:
              4 This affects my team
              Watchers:
              20 Start watching this issue

                Created:
                Updated:
                Resolved: