Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-7311

Object schema zip import failed with Import file not found error if the Insight import directory is a symlink or in a symlink directory

      Issue Summary

      Object schema zip import failed with Import file not found error if the Insight import directory is a symlink or in a symlink directory

      Steps to Reproduce

      1. On a Jira Data center instance, set up symlink for the shared home directory and use it. Example:
        $ ln -s /Users/support/jiradc/sharedhome /Users/jira/directory/sharedhome
        $ pwd
        /Users/jira/directory/
        $ ls -al
        rwxr-xr-x   1 support  staff     37 Apr 21 11:25 sharedhome -> /Users/support/jiradc/sharedhome
        

        In the cluster.properties file, make sure the jira.shared.home is pointing to the symlink correctly.

      2. Create an object schema and export it as a zip file as per Object Schema Export. Make sure the zip file is exported to the export/insight folder in the symlink directory.
      3. Copy the zip file from the <symlink>/export/insight folder into <symlink>/import/insight folder.
      4. Import the zip file as per Object Schema Import.

      Expected Results

      The object schema is imported successfully

      Actual Results

      • The import failed with error "NotFoundInsightException: Import file not found" on the screen.
      • If you check the <Jira_installation>/temp directory, you will find empty folder with name like "insight_import<a string of numbers>" for every failed attempt of object schema zip import.
      • The below exception is thrown in the insight_objectschema_import.log file:
        2021-04-21 11:48:40,787 [http-nio-1121-exec-3] | Initial error, when unzipping file: , Error: NotFoundInsightException: Import file not found
        com.riadalabs.jira.plugins.insight.common.exception.NotFoundInsightException: NotFoundInsightException: Import file not found
        	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.validateFilePath(ObjectSchemaImportServiceImpl.java:928)
        	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.unzipImportFile(ObjectSchemaImportServiceImpl.java:917)
        	at com.riadalabs.jira.plugins.insight.services.imports.schema.ObjectSchemaImportServiceImpl.shouldWarnBeforeImport(ObjectSchemaImportServiceImpl.java:865)
        	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.ObjectSchemaImportResource.noWarnings(ObjectSchemaImportResource.java:120)
        ...
        2021-04-21 11:48:40,821 [http-nio-1121-exec-1] | Resource: Import object schema to server, in data:com.riadalabs.jira.plugins.insight.channel.web.api.rest.model.imports.schema.ImportObjectSchemaInEntry@53ebc5e6[fileName=testexport.zip,objectSchemaName=IXHG,objectSchemaKey=IXHG,objectSchemaDescription=<null>,password=<null>,includeObjects=true,importAttachments=true,importObjectAvatars=true]
        

      Workaround

      Do not use symlink for the Insight import folder

          Form Name

            [JSDSERVER-7311] Object schema zip import failed with Import file not found error if the Insight import directory is a symlink or in a symlink directory

            Workaround

            Do not use symlink for the Insight import folder

            ==> Where can we find this procedure? Is this separate for Assets?

            Matt Van Kuyk (OWN-IT) added a comment - Workaround Do not use symlink for the Insight import folder ==> Where can we find this procedure? Is this separate for Assets?

              jxu2@atlassian.com Sam Xu
              michin Michelle Chin
              Affected customers:
              12 This affects my team
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: