-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
6.3.14, 6.3.15, 7.2.1, 7.3.1, 7.3.2, 7.9.0, 8.17.0
-
6.03
-
126
-
Severity 1 - Critical
-
13
-
NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.
Summary
As part of JIRA Service Desk now, JIRA is storing the incoming mails in the database (done by the JEPP). Those are stored inside the AO_2C4E5C_MAILITEMCHUNK table.
JIRA is, sometimes, silently failing to import or export the active objects part of the backup.
Steps to Reproduce
- Install JIRA;
- Import the backup linked on the private comments.
- JIRA will stop importing once it reaches 90%. Restart JIRA.
- Navigate to Administration » System » Plugin Data Storage and verify what has been imported.
Expected Results
All entries in the active objects table would have been imported/exported.
Actual Results
- Exporting: JIRA creates the backup normally, but upon inspecting the activeobjects.xml file (using the grep below) not all entries are in the file.
- Importing: JIRA fails to import the data once it reaches 90%, but after restarting JIRA it seems to have imported correctly. Inspecting the Plugin Data Storage shows most tables as empty, and inspecting the activeobjects file shows all data.
The following errors might be found in the Jira logs:
The following errors might be seen in the logs:
2020-11-06 19:19:32,337-0500 JiraImportTaskExecutionThread-1 ERROR anonymous 528x1190x1 409hrc XX.XX.XX.XXX /secure/SetupImport.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.OutOfMemoryError java.lang.OutOfMemoryError at java.lang.AbstractStringBuilder.hugeCapacity(AbstractStringBuilder.java:161) at java.lang.AbstractStringBuilder.newCapacity(AbstractStringBuilder.java:155) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:125) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448) at java.lang.StringBuilder.append(StringBuilder.java:136) at java.lang.StringBuilder.append(StringBuilder.java:76)
[2020-08-20 01:00:16,045-0400 JiraImportTaskExecutionThread-1 ERROR test 1002x937x1 1fztp06 XXXXXXXXX /secure/admin/XmlRestore.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.OutOfMemoryError020-08-20 01:00:16,045-0400 JiraImportTaskExecutionThread-1 ERROR test 1002x937x1 test XXXXXX /secure/admin/XmlRestore.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.OutOfMemoryErrorjava.lang.OutOfMemoryError)
2019-03-18 07:36:01,857 JiraImportTaskExecutionThread-1 ERROR test 381x754x1 1py7sdr XXXXXXXX /secure/admin/XmlRestore.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space
This seems to be happening because JIRA runs out of memory due to import, but fails to log any errors or warnings.
Notes
To verify the data inside the activeobjects.xml backup, run:
grep -E "data tableName=|<row>" activeobjects.xml | uniq -c
This will show how many rows were exported for each table. For example, when JIRA failed to export correctly, this was shown:
1 <data tableName="AO_21D670_WHITELIST_RULES"> 3 <row> 1 <data tableName="AO_2C4E5C_MAILCHANNEL"> 1 <row> 1 <data tableName="AO_2C4E5C_MAILCONNECTION"> 1 <row> 1 <data tableName="AO_2C4E5C_MAILGLOBALHANDLER"> 1 <data tableName="AO_2C4E5C_MAILHANDLER"> 5 <row> 1 <data tableName="AO_2C4E5C_MAILITEM"> 3625 <row> 1 <data tableName="AO_2C4E5C_MAILITEMAUDIT"> 3625 <row> 1 <data tableName="AO_2C4E5C_MAILITEMCHUNK"> 691 <row>
It is possible to see what tables were (supposed to be) exported to the backup with:
grep "table name=" activeobjects.xml
Workaround
Follow our Increasing JIRA Memory guide to increase the memory available to JIRA, restart JIRA and try to import/export the backup again. If this doesn't work, please follow the instructions below:
For importing:
It is possible to remove the affected lines from the backup with:
- Run:
grep -En "data tableName=" activeobjects.xml | grep -A1 "MAILITEMCHUNK" | cut -d":" -f1
This will return two numbers.
- use vim to open the activeobjects.xml and run:
:num1,num2s;<string>.*</string>;<string></string>;g
Where num1 and num2 are the numbers returned in the first step. e.g.:
:45635,58649s;<string>.*</string>;<string></string>;g
- save and exit vim;
- zip the backup again and import.
This will return the body of the emails that are stored.
To export:
- Turn off the Email Puller so that no new mail will be added to the database
- JIRA Administration > System > Global Mail Settings
- Wait at least 5 minutes so that the mail processor is able to process mail that is already in the database
- Stop JIRA;
- Run the following update in the database to delete the mail items:
- Optional: backup this table using your database's native tools before running the update
UPDATE "AO_2C4E5C_MAILITEMCHUNK" SET "MIME_MSG_CHUNK" = NULL;
- Optional: backup this table using your database's native tools before running the update
- Restart JIRA;
- Export the data again.
- Turn the Email Puller back on
- is related to
-
JRASERVER-70147 XML Restore stucks at 90%
- Closed
- relates to
-
JRACLOUD-45917 JIRA fails to complete XML backup or restore of AO tables
- Closed
-
JRASERVER-45918 JIRA XML restore or backup fails silently
- Gathering Impact
-
JSDSERVER-1987 Reduce the email age threshold for the JEPP cleaner job.
- Closed
-
DESK-4320 Loading...
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
- was cloned as
-
DESK-4120 Loading...