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

Assets Discovery conflicting configuration issue, when setting File copy to ...\Discovery\scans

      Issue Summary

      This is reproducible on Data Center: (yes)

      When setting up the Discovery Tool, one can configure the Scan results file to be transported to another location in the Export Tab.

      By default, Discovery will use the relative path: ...\Discovery\scans to save the scan result before transporting it per the Export Tab's configuration.

      If the Export Type is set to File Copy, and the Export Path is set to the default location (e.g. "C:\Program Files\Atlassian\Discovery\scans" - Discovery will save the Scan results to this location at the end of the scan, then, it will try to transport it into the same location, while removing the source... this will result in the scan results file not to be found (deleted) and the log will show an error.

      Steps to Reproduce

      1. configure Assets Discovery with minimum requirements to successfully execute a scan
      2. set the Export tab with: Export Type: File Copy
                                                 Export Path: C:\Program Files\Atlassian\Discovery\scans
      3. execute a scan

      Expected Results

      Scan is completed, the Scan results zip is saved, and available in the path noted: C:\Program Files\Atlassian\Discovery\scans

      Actual Results

      The Scan results zip file cannot be found. The destination folder is empty.

      The below exception is thrown in the main scan log file:

      2023-02-01 13:23:27 : Finish building package: C:\Program Files\Atlassian\Discovery\scans\E3123_00001_2023-02-01_1323_0030.zip
      2023-02-01 13:23:27 : Deleting file: C:\Program Files\Atlassian\Discovery\scans\E3123_Discovery_Settings_2023-02-01_1323_0942.xml
      2023-02-01 13:23:27 : Deleting file: C:\Program Files\Atlassian\Discovery\scans\E3123_00001_Hosts_2023-02-01_1323_0081.xml
      2023-02-01 13:23:27 : Start transport process.
      2023-02-01 13:23:27 : Transferring file E3123_00001_2023-02-01_1323_0030.zip to export path C:\Program Files\Atlassian\Discovery\scans
      2023-02-01 13:23:27 : Could note move file : E3123_00001_2023-02-01_1323_0030.zip
      2023-02-01 13:23:27 : Exceptions:
      2023-02-01 13:23:27 : Could not find file 'C:\Program Files\Atlassian\Discovery\scans\E3123_00001_2023-02-01_1323_0030.zip'.
      at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
      at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
      at Insight.Discovery.Logic.FileTransfer.TransferFile() in C:\build\DISCOVERY-DISCOVERYCLOUDRELEASE-BUILD\Discovery\Logic\FileTransfer.cs:line 78
      2023-02-01 13:23:28 : Finished transport process.

      Workaround

      In the Discovery Tool's Export Tab - select Export Type: None. the file will be saved to the desired (default) location: ...\discovery\scans

      Or, you may set another folder to transport the file to, like ...\Discovery\Import

            [JSDSERVER-12358] Assets Discovery conflicting configuration issue, when setting File copy to ...\Discovery\scans

            There are no comments yet on this issue.

              11507b174037 Zakhar Listiev
              8cdc82c96fd5 Yinon Negev
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: