Email notifications trigger a NoSuchElementException in the logs

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

Email notifications work, but throw exceptions in the logs. The following appears in the atlassian-confluence.log:

2015-05-07 13:41:30,354 ERROR [NotificationSender:thread-2] [plugin.notifications.dispatcher.NotificationErrorRegistryImpl] addError Error sending notification to server '<Unknown>'(-1) for INDIVIDUAL task (resent 4 times): Error generating message for server 'System Mail' on medium 'mail' for user 'ff808181442f17b001442f198675309b'.
NoSuchElementException: 
 -- referer: https://localhost:8090/confluence/pages/editpage.action?pageId=360452 | url: /pages/doeditpage.action | userName: admin | action: doeditpage | page: 360452

診断

環境

  • Users are sourced from Active Directory (or possibly another LDAP system)

Diagnostic Steps

  • Check the status of the user mentioned in the error. Is the user currently active or disabled? 

原因

The error is thrown because the user, which is synchronized from Active Directory (or another external LDAP), is no longer active and has been disabled in LDAP, and by extension in Confluence. However, the user is still subscribed to page or space notifications, and being disabled does not remove those subscriptions. Confluence continues to try to send notifications to that user, and because the user is now disabled, it triggers a NoSuchElement exception.

ソリューション

Remove the space/page watches that the disabled user is subscribed to. You can do this by querying the notifications table in the database:

  • Confirm that the disabled user is subscribed to notifications. Using the user key from the error:

    SELECT * FROM notifications where username = 'ff808181442f17b001442f198675309b';
    
  • Delete that user's notifications:

    DELETE FROM notifications WHERE username = 'ff808181442f17b001442f198675309b';
    

    Always back up your database before performing any modification to the database. If possible, try your modifications on a test server.

  • Clear the Confluence caches at Confluence Administration > Cache Management, or restart Confluence.

最終更新日 2021 年 6 月 10 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.