5

We are specifically getting this error when using Amazon ec2 instance. Configuration on aws instance is Tomcat 7, Ubuntu 16.04 and memory is 8gb. It occurs when the user tries to view pdf file. In our application, we are having one functionality where the user can only view PDF file onto browser, but won't be able to download it. PDF file is on the same server. We are using cors minimal configuration. We have tried it locally with Ubuntu and it is working fine.

enter image description here

Code snippet:

var fileSplitContent = fileName.split(".");
    if ($('#viewImageOnlyForm')[0] != undefined && $('#viewPdfOnlyForm')[0] != undefined) {
        if (fileSplitContent[fileSplitContent.length - 1].toLowerCase() != "pdf") {
            $('#imageSource').val(requestURL + $.param(inputData));
            $('#viewImageOnlyForm').submit();
        } else {
            var requestURL = "rest/file/getCapitalRaiseFile?";
            $('#pdFSource').val(requestURL + $.param(inputData));
            $('#viewPdfOnlyForm').submit();
        }
    } else {
        // pop up download attachment dialog box
        downloadIFrame.attr("src", requestURL + $.param(inputData));
    }

}

Jan 04, 2017 5:07:31 AM org.glassfish.jersey.server.ServerRuntime$Responder writeResponse SEVERE: An I/O error has occurred while writing a response message entity to the container output stream. org.glassfish.jersey.server.internal.process.MappableException: org.apache.catalina.connector.ClientAbortException: java.net.SocketException: Connection reset
Caused by: org.apache.catalina.connector.ClientAbortException: java.net.SocketException: Broken pipe (Write failed)

Shantanu
  • 71
  • 2
  • 6
  • This is issue is not occurring on Firefox Mozilla and some times working in chrome too. We have used PDFJS.version = '1.1.469' , and PDFJS.build = 'f06aa6a'. Is there any specif version of pdf.jd for chrome or else any changes we need to do in our pdf.js. – Shantanu Jan 09 '17 at 07:13
  • 1
    Everything is working fine on older versions of Mozilla Firefox when we use amazons own Linux on their instance. But nothing is working when we use ubuntu on amazon instance. – Shantanu Jan 11 '17 at 09:16

1 Answers1

0

Depending where you access the document this can be because of you have a download manager installed on your browser. This sometimes causes problems - maybe take a look at your extensions. You should try by disabling downloader manager extension in your browser.