Mail fetching stops intermittently_IndexOutOfBoundsException

Mail fetching stops intermittently_IndexOutOfBoundsException

Error trace:

[com.adventnet.servicedesk.helpdesk.mail.task.MailFetchingTask]|[SEVERE]|[129]|: General Exception - Exception when trying to get messages. SO RETURNING...|java.lang.IndexOutOfBoundsException
at com.sun.mail.imap.IMAPFolder.checkRange(IMAPFolder.java:361)
at com.sun.mail.imap.IMAPFolder.getMessage(IMAPFolder.java:1251)
at javax.mail.Folder.getMessages(Folder.java:866)

Cause:

1. Servicedesk is trying to pull the mails from the mailbox as it has detected that there were some pending emails in the mailbox however, there seems to be another application that has fetched the mail before Servicedesk could fetch the mail.
2. Someone might have manually removed/moved such mails from the mailbox.

Solution:

1. Under Admin >> Mail Server Settings, Stop fetching and start again. 
2. eset the mailbox username/password and update the new credentials under Admin--> Mail Server Settings so that only Servicedesk can log in to this mailbox.

Note: Update the password both in incoming and outgoing settings and restart the application to fix this issue.

It is always recommended to use a dedicated mailbox for Servicedesk Plus MSP.

                  New to ADSelfService Plus?

                    • Related Articles

                    • Email fetching stops intermittently

                      Error Trace  [17:36:08:969]|[07-05-2021]|[com.adventnet.servicedesk.kbase.util.AttachmentUtil]|[SEVERE]|[168]: exception occurred while writing to temporary attachment file |  java.io.FileNotFoundException: ...
                    • List of mail fetching issues and solutions

                      Scenario 1 : Mail fetching issue due to Invalid or No PKIX certificate .   Log traces for Mail Fetching  issues Exception when connecting to store.|javax.mail.MessagingException: sun.security.validator.ValidatorException: PKIX path building failed: ...
                    • Fix: Mail fetching stops due to invalid characters in the attachment name

                      Issue: Mail fetching being stopped due to invalid characters "?" , ":" in the filename. In this case, the eml file's subject contains ":" character and so, while uploading the .eml as attachment, error is thrown (Only in windows server) Trace: ...
                    • Mail fetching issue_Remote host closed connection during handshake

                      GUI Error Trace:  FAILURE :E-mail settings saved successfully. But error occurred while trying to check connection with mail server - Problem connecting to mailbox. LOG TRACE: [16:33:06:197]|[11-09-2018]|[SYSERR]|[INFO]|[120]: ...
                    • Monitor Mail Fetching schedule

                       We have a workaround for checking the status of mail fetching (start or stopped). However, we do not have an option to start or stop fetching remotely.  We can integrate "Applications Manager" with SDP MSP and we can do regular monitoring (as per ...