Created 02-01-2017 09:43 PM
Hi All,
I am trying to configure a ListS3 processor. However I get the below error and not sure what went wrong.
failed to process session due to com.amazonaws.AmazonClientException: Failed to parse XML document with handler class com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser$ListBucketHandler: com.amazonaws.AmazonClientException: Failed to parse XML document with handler class com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser$ListBucketHandle
My bucket name takes the form source/customername
And I have configured the following fields,
Is there something that I am missing?
EDITThe full Stack Trace is as below
2017-02-01 21:25:12,772 INFO [Write-Ahead Local State Provider Maintenance] org.wali.MinimalLockingWriteAheadLog org.wali.MinimalLockingWriteAheadLog@56017274 checkpointed with 2 Records and 0 Swap Files in 14 milliseconds (Stop-the-world time = 0 milliseconds, Clear Edit Logs time = 0 millis), max Transaction ID 5 2017-02-01 21:25:33,057 INFO [pool-8-thread-1] o.a.n.c.r.WriteAheadFlowFileRepository Initiating checkpoint of FlowFile Repository 2017-02-01 21:25:33,129 INFO [pool-8-thread-1] org.wali.MinimalLockingWriteAheadLog org.wali.MinimalLockingWriteAheadLog@6ae5e1cf checkpointed with 103 Records and 0 Swap Files in 71 milliseconds (Stop-the-world time = 13 milliseconds, Clear Edit Logs time = 13 millis), max Transaction ID 40 2017-02-01 21:25:33,129 INFO [pool-8-thread-1] o.a.n.c.r.WriteAheadFlowFileRepository Successfully checkpointed FlowFile Repository with 103 records in 71 milliseconds 2017-02-01 21:25:45,904 INFO [Flow Service Tasks Thread-2] o.a.nifi.controller.StandardFlowService Saved flow controller org.apache.nifi.controller.FlowController@4725617a // Another save pending = false 2017-02-01 21:25:49,512 INFO [StandardProcessScheduler Thread-3] o.a.n.c.s.TimerDrivenSchedulingAgent Scheduled ListS3[id=fb75523d-0159-1000-fa7e-9293836c0d73] to run with 1 threads 2017-02-01 21:25:49,911 INFO [Flow Service Tasks Thread-1] o.a.nifi.controller.StandardFlowService Saved flow controller org.apache.nifi.controller.FlowController@4725617a // Another save pending = false 2017-02-01 21:25:49,986 ERROR [Timer-Driven Process Thread-2] org.apache.nifi.processors.aws.s3.ListS3 ListS3[id=fb75523d-0159-1000-fa7e-9293836c0d73] ListS3[id=fb75523d-0159-1000-fa7e-9293836c0d73] failed to process due to com.amazonaws.AmazonClientException: Failed to parse XML document with handler class com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser$ListBucketHandler; rolling back session: com.amazonaws.AmazonClientException: Failed to parse XML document with handler class com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser$ListBucketHandler 2017-02-01 21:25:49,988 ERROR [Timer-Driven Process Thread-2] org.apache.nifi.processors.aws.s3.ListS3 com.amazonaws.AmazonClientException: Failed to parse XML document with handler class com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser$ListBucketHandler at com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser.parseXmlInputStream(XmlResponsesSaxParser.java:127) ~[aws-java-sdk-s3-1.11.8.jar:na] at com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser.parseListBucketObjectsResponse(XmlResponsesSaxParser.java:270) ~[aws-java-sdk-s3-1.11.8.jar:na] at com.amazonaws.services.s3.model.transform.Unmarshallers$ListObjectsUnmarshaller.unmarshall(Unmarshallers.java:67) ~[aws-java-sdk-s3-1.11.8.jar:na] at com.amazonaws.services.s3.model.transform.Unmarshallers$ListObjectsUnmarshaller.unmarshall(Unmarshallers.java:57) ~[aws-java-sdk-s3-1.11.8.jar:na] at com.amazonaws.services.s3.internal.S3XmlResponseHandler.handle(S3XmlResponseHandler.java:62) ~[aws-java-sdk-s3-1.11.8.jar:na] at com.amazonaws.services.s3.internal.S3XmlResponseHandler.handle(S3XmlResponseHandler.java:31) ~[aws-java-sdk-s3-1.11.8.jar:na] at com.amazonaws.http.AmazonHttpClient.handleResponse(AmazonHttpClient.java:1244) ~[aws-java-sdk-core-1.11.8.jar:na] at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:885) ~[aws-java-sdk-core-1.11.8.jar:na] at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:695) ~[aws-java-sdk-core-1.11.8.jar:na] at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:447) ~[aws-java-sdk-core-1.11.8.jar:na] at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:409) ~[aws-java-sdk-core-1.11.8.jar:na] at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:358) ~[aws-java-sdk-core-1.11.8.jar:na] at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3787) ~[aws-java-sdk-s3-1.11.8.jar:na] at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3729) ~[aws-java-sdk-s3-1.11.8.jar:na] at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:606) ~[aws-java-sdk-s3-1.11.8.jar:na] at org.apache.nifi.processors.aws.s3.ListS3.onTrigger(ListS3.java:184) ~[nifi-aws-processors-1.0.0.2.0.1.0-12.jar:1.0.0.2.0.1.0-12] at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) ~[nifi-api-1.0.0.2.0.1.0-12.jar:1.0.0.2.0.1.0-12] at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1064) [nifi-framework-core-1.0.0.2.0.1.0-12.jar:1.0.0.2.0.1.0-12] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.0.0.2.0.1.0-12.jar:1.0.0.2.0.1.0-12] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.0.0.2.0.1.0-12.jar:1.0.0.2.0.1.0-12] at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.0.0.2.0.1.0-12.jar:1.0.0.2.0.1.0-12] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_121] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_121] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] Caused by: org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) ~[na:1.8.0_121] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) ~[na:1.8.0_121] at com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser.parseXmlInputStream(XmlResponsesSaxParser.java:114) ~[aws-java-sdk-s3-1.11.8.jar:na] ... 27 common frames omitted 2017-02-01 21:25:49,988 ERROR [Timer-Driven Process Thread-2] org.apache.nifi.processors.aws.s3.ListS3 ListS3[id=fb75523d-0159-1000-fa7e-9293836c0d73] ListS3[id=fb75523d-0159-1000-fa7e-9293836c0d73] failed to process session
Created 02-01-2017 10:30 PM
Is there a full stack trace that goes along with that in error in the nifi-app.log?
Created 02-02-2017 02:05 PM
@Matt Edited the question, now includes the full stack trace.
Created 02-02-2017 02:41 PM
@Matt
Have been able to get this resolved. Thanks for your time. I figured out that any access issue gets redirected to a HTML page and that is why the XML parse error came up.
Created 10-17-2018 06:36 PM
Created 10-18-2018 01:27 AM
It was an access issue on the Buckets. Right permission settings on the bucket fixed it.