Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-69188

Unable to install additional applications after migrating from Atlassian Cloud

XMLWordPrintable

      Summary

      Unable to install additional applications after migrating from Atlassian Cloud.

      Environment

      • Jira 8.1.0
      • Not reproduced Jira 7.13.0

      Steps to Reproduce

      1. Migrate Jira Server from Cloud to Server
      2. Install Jira Service Desk through the Versions & licenses page

      Expected Results

      Jira Service Desk can be installed without any problem

      Actual Results

      Display error "An unexpected error occurred. Refer to the logs for more information." but the application is actually installed.

      Following error in atlassian-jira.log

      2019-04-18 06:10:02,842 UpmAsynchronousTaskManager:thread-1 WARN sysadmin 369x2419x1 vuqkwc 172.18.0.1 /rest/plugins/1.0/ [c.a.u.c.r.resources.install.InstallTask] Unexpected error in install task
      java.lang.RuntimeException: Failed to parse AuditLogEntry from JSON string: {"userKey":"Unknown user","accountId":"Unknown user","date":1553006411475,"i18nKey":"upm.auditLog.install.plugin.success","entryType":"PLUGIN_INSTALL","params":["Slack","jira-slack-integration","1010.0.0-AC"]}
      	at com.atlassian.upm.core.log.PluginSettingsAuditLogService$3.apply(PluginSettingsAuditLogService.java:235)
      	at com.atlassian.upm.core.log.PluginSettingsAuditLogService$3.apply(PluginSettingsAuditLogService.java:226)
      	at com.google.common.collect.Iterators$6.transform(Iterators.java:785)
      ...
      Caused by: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "accountId" (Class com.atlassian.upm.core.log.AuditLogEntryImpl), not marked as ignorable
       at [Source: java.io.StringReader@b702d30; line: 1, column: 210] (through reference chain: com.atlassian.upm.core.log.AuditLogEntryImpl["accountId"])
      	at org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
      ...
      

      Notes

      Install app also return same error.

      This problem is caused by the data which is imported from Cloud.

      SELECT propertyvalue FROM propertytext where id = (SELECT id
      FROM propertyentry WHERE property_key = 'com.atlassian.upm.log.PluginSettingsAuditLogService:log:upm_audit_log_v3');
      
      #java.util.List
      {"userKey":"Unknown user","accountId":"Unknown user","date":1553006411475,"i18nKey":"upm.auditLog.install.plugin.success","entryType":"PLUGIN_INSTALL","params":["Slack","jira-slack-integration","1010.0.0-AC"]}
      {"userKey":"Unknown user","accountId":"Unknown user","date":1553006410074,"i18nKey":"upm.auditLog.auto.update.plugin","entryType":"AUTO_PLUGIN_UPDATE","params":["Slack for Jira","1010.0.0-AC"]}
      ....
      

      A key "accountId" is only used in Jira Cloud and it shouldn't exist in Jira Server.

      Workaround

      Please remove the key "accountId" from the problematic record with SQL below. (This SQL is tested on PostgreSQL.)

      UPDATE propertytext SET propertyvalue = REPLACE(propertyvalue, ',"accountId":"anonymous"', '')
              WHERE id = (
      		SELECT id FROM propertyentry 
      		WHERE property_key = 'com.atlassian.upm.log.PluginSettingsAuditLogService:log:upm_audit_log_v3');
      

      If you've installed some apps on Jira Cloud, you also need to execute the following SQL.

      UPDATE propertytext SET propertyvalue = REPLACE(propertyvalue, ',"accountId":"Unknown user"', '')
              WHERE id = (
      		SELECT id FROM propertyentry 
      		WHERE property_key = 'com.atlassian.upm.log.PluginSettingsAuditLogService:log:upm_audit_log_v3');
      

      Please make sure to take a backup before modifying the DB record.

        1. Screen Shot 2019-04-18 at 16.59.38.png
          134 kB
          Tomoko Suzuki
        2. Screen Shot 2019-04-18 at 17.02.14.png
          121 kB
          Tomoko Suzuki

              mrydzewski Mikolaj Rydzewski (Inactive)
              tsuzuki@atlassian.com Tomoko Suzuki
              Votes:
              13 Vote for this issue
              Watchers:
              27 Start watching this issue

                Created:
                Updated:
                Resolved: