Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-129271

IOException occurs during site LAR export/import when using S3 Store

    Details

      Description

      Notes:
      When Liferay is configured to use Amazon S3 for storing documents, sites cannot be exported or imported. Upon examination, this issue seems to be caused by LPS-127589.

      Steps to Reproduce:

      1. Start DXP with S3 configured.
      2. Create a new blank site called "Site A".
      3. Within "Site A", upload an image to Documents & Media.
      4. Verify that the S3 bucket is populated.
      5. Export the site as a LAR.
      6. Create a new blank site called "Site B".
      7. Within "Site B", import the site LAR created from step 5.

      Expected behavior:
      The site LAR is exported and imported with no errors.

      Actual behavior:
      An IOException occurs during both export and import. The site LAR import fails. The console logs the following error stack trace:

      Caused by: java.io.IOException: Attempted read on closed stream.
      	at org.apache.http.conn.EofSensorInputStream.isReadAllowed(EofSensorInputStream.java:109)
      	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
      	at com.amazonaws.internal.SdkFilterInputStream.read(SdkFilterInputStream.java:90)
      	at com.amazonaws.event.ProgressInputStream.read(ProgressInputStream.java:180)
      	at com.amazonaws.internal.SdkFilterInputStream.read(SdkFilterInputStream.java:90)
      	at com.amazonaws.internal.SdkFilterInputStream.read(SdkFilterInputStream.java:90)
      	at com.amazonaws.internal.SdkFilterInputStream.read(SdkFilterInputStream.java:90)
      	at com.amazonaws.event.ProgressInputStream.read(ProgressInputStream.java:180)
      	at java.security.DigestInputStream.read(DigestInputStream.java:161)
      	at com.amazonaws.services.s3.internal.DigestValidationInputStream.read(DigestValidationInputStream.java:59)
      	at com.amazonaws.internal.SdkFilterInputStream.read(SdkFilterInputStream.java:90)
      	at com.amazonaws.services.s3.internal.S3AbortableInputStream.read(S3AbortableInputStream.java:125)
      	at com.amazonaws.internal.SdkFilterInputStream.read(SdkFilterInputStream.java:90)
      	at java.io.FilterInputStream.read(FilterInputStream.java:107)
      	at java.nio.file.Files.copy(Files.java:2908)
      	at java.nio.file.Files.copy(Files.java:3027)
      	at com.liferay.portal.zip.ZipWriterImpl.addEntry(ZipWriterImpl.java:133)
      	at com.liferay.exportimport.internal.lar.PortletDataContextImpl.addZipEntry(PortletDataContextImpl.java:491)
      	... 52 more
      

      Reproduced on:

      • master (e058ab5364c4c653)
      • 7.3.x (ff57009dda4a1bd6)
      • 7.2.x (0cb617fe6ead7f34)

      Not reproduced on:

      • master (b501d595d133853a)
        • This is the commit before LPS-127589's changes.

        Attachments

          Activity

            People

            Assignee:
            jeremy.chen Jeremy Chen
            Reporter:
            kevin.lee Kevin Lee
            Participants of an Issue:
            Recent user:
            Yunlin "Steven" Sun
            Engineering Assignee:
            Kevin Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 12 weeks, 4 days ago

                Packages

                Version Package
                7.2.10 DXP FP12
                7.2.X
                7.3.7 CE GA8
                7.3.10 DXP FP2
                7.3.X
                7.4.0 CE GA1 DXP 7,4
                7.4.13 DXP GA1
                Master