1 Reply Latest reply on Apr 4, 2013 6:06 AM by Jo Corless

    Problem with Amazon S3 today - Using FileWrite() CF9.0.2

    Jo Corless Level 1

      We use Amazon S3 for storing the majority of our products and the code is well established and has been working hundreds of times a day for well over 8 months, so it's very stable however today I've had loads and loads of problems with errors - Is anyone else seeing issues?

       

      The code is very simple:

       

      <cfset fileWrite("#baseS3Url#/#amazonFileName#", "#binFileData#")>

      <cfset storeSetMetadata("#baseS3Url#/#amazonFileName#", { content_type="#setContentType(XML)#" })>

       

      OR

       

      <cfset fileWrite("#baseS3Url#/#amazonFileName##fileExtension#", "#binFileData#")>

      <cfset storeSetMetadata("#baseS3Url#/#amazonFileName##fileExtension#", { content_type="#setContentType(fileExtension)#" })>

       

      but is throwing the following stack trace

       

      StackTrace: coldfusion.vfs.VFileOutputStream$VFSFileSystemException: Request Error. nullCould not close the output stream for file "s3://<cname>/0/0/1/1/3/4/5/1134503_SRBDG7FY8U.pdf"..

          at coldfusion.vfs.VFileOutputStream.close(VFileOutputStream.java:81)

          at coldfusion.tagext.io.FileUtils.writeFile(FileUtils.java:867)

          at coldfusion.runtime.CFPage.FileWrite(CFPage.java:2918)

          at coldfusion.runtime.CFPage.FileWrite(CFPage.java:2909)

          at cfAmazonUtil2ecfc1396299930$funcWRITEFILETOAMAZON.runFunction(F:\CfGlobal\amazonWebServic es\AmazonUtil.cfc:160)

          at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)

          at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)

          at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)

          at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)

          at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)

          at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)

          at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)

          at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)

          at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)

          at cfListenerUtils2ecfc321451058$funcWRITEFILETOAMAZON.runFunction(F:\CfGlobal\util\Listener Utils.cfc:758)

          at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)

          at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)

          at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)

          at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)

          at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)

          at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)

          at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582)

          at cfListenerUtils2ecfc321451058$funcWRITEFILETOLOCALPLUSAMAZON.runFunction(F:\CfGlobal\util \ListenerUtils.cfc:812)

          at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)

          at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)

          at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)

          at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)

          at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)

          at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)

          at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)

          at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)

          at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360).....

        

      Caused by: org.apache.commons.vfs.FileSystemException: Could not close the output stream for file "s3://documents.etsosreports.co.uk/0/0/1/1/3/4/5/1134503_SRBDG7FY8U.pdf".

          at org.apache.commons.vfs.provider.DefaultFileContent$FileContentOutputStream.close(DefaultF ileContent.java:599)

          at coldfusion.vfs.VFileOutputStream.close(VFileOutputStream.java:69)

          ... 52 more

      Caused by: java.io.IOException: Request Error. null

          at coldfusion.vfs.s3.S3OutputStream._close(S3OutputStream.java:145)

          at coldfusion.vfs.s3.S3OutputStream.access$000(S3OutputStream.java:46)

          at coldfusion.vfs.s3.S3OutputStream$1.run(S3OutputStream.java:108)

          at java.security.AccessController.doPrivileged(Native Method)

          at coldfusion.vfs.s3.S3OutputStream.close(S3OutputStream.java:103)

          at java.io.FilterOutputStream.close(Unknown Source)

          at org.apache.commons.vfs.util.MonitorOutputStream.close(MonitorOutputStream.java:53)

          at org.apache.commons.vfs.provider.DefaultFileContent$FileContentOutputStream.close(DefaultF ileContent.java:595)

          ... 53 more

      TagContext: 

          [array]

          1) [struct]

              COLUMN: 0

              ID: CF_CFPAGE

              LINE: 160

              RAW_TRACE: at cfAmazonUtil2ecfc1396299930$funcWRITEFILETOAMAZON.runFunction(F:\CfGlobal\amazonWebServic es\AmazonUtil.cfc:160)

              TEMPLATE: F:\CfGlobal\amazonWebServices\AmazonUtil.cfc

              TYPE: CFML

          2) [struct]

              COLUMN: 0

              ID: CF_TEMPLATEPROXY

              LINE: 758

              RAW_TRACE: at cfListenerUtils2ecfc321451058$funcWRITEFILETOAMAZON.runFunction(F:\CfGlobal\util\Listener Utils.cfc:758)

              TEMPLATE: F:\CfGlobal\util\ListenerUtils.cfc

              TYPE: CFML

          3) [struct]

              COLUMN: 0

              ID: CF_UDFMETHOD

              LINE: 812

              RAW_TRACE: at cfListenerUtils2ecfc321451058$funcWRITEFILETOLOCALPLUSAMAZON.runFunction(F:\CfGlobal\util \ListenerUtils.cfc:812)

              TEMPLATE: F:\CfGlobal\util\ListenerUtils.cfc

              TYPE: CFML

          4) [struct]

              COLUMN: 0

              ID: CF_TEMPLATEPROXY

              LINE: 84

              RAW_TRACE: at cfDeliveryUsersBatch2ecfc1575326645$funcPROCESS.runFunction(F:\web\integration.etsos.co.u k\wwwroot\ScheduledTasks\deliveryUsers\DeliveryUsersBatch.cfc:84)

              TEMPLATE: F:\web\integration.etsos.co.uk\wwwroot\ScheduledTasks\deliveryUsers\DeliveryUsersBatch.cf c

              TYPE: CFML

          5) [struct]

              COLUMN: 0

              ID: CFINVOKE

              LINE: 28

              RAW_TRACE: at cfDeliveryUsers2ecfm1067211157$func_CFFUNCCFTHREAD_CFDELIVERYUSERS2ECFM10672111571.runFun ction(F:\web\integration.etsos.co.uk\wwwroot\ScheduledTasks\deliveryUsers\DeliveryUsers.cf m:28)

              TEMPLATE: F:\web\integration.etsos.co.uk\wwwroot\ScheduledTasks\deliveryUsers\DeliveryUsers.cfm

              TYPE: CFML

      Type: Application

      msg: Request Error. nullCould not close the output stream for file "s3://documents.etsosreports.co.uk/0/0/1/1/3/4/5/1134503_SRBDG7FY8U.pdf".