pvillard31 commented on issue #3945: NIFI-6960: Add Provenance Table to MetricsSqlQueryService URL: https://github.com/apache/nifi/pull/3945#issuecomment-571743884 Thanks for the changes @mattyb149 - while giving it another try I faced the below exception when the RT had actually no data to send (no provenance event generated yet - fresh NiFi start), but it works well when there is data to send. I used QueryNiFiReportingTask (Include Zero Record Results set to false) with SiteToSiteReportingRecordSink. It might be unrelated to this particular PR though. Let me know what you think. ```` 2020-01-08 02:30:23,022 INFO [Timer-Driven Process Thread-3] o.apache.nifi.remote.client.PeerSelector New Weighted Distribution of Nodes: PeerStatus[hostname=localhost,port=8080,secure=false,flowFileCount=1] will receive 100.0% of data 2020-01-08 02:30:23,610 ERROR [pool-43-thread-1] o.a.n.r.util.SiteToSiteRestApiClient Failed to send data to http://127.0.0.1:8080/nifi-api/data-transfer/input-ports/81775e5c-016f-1000-093b-b91f6926a6e0/transactions/2e81a13b-0945-49a0-bd23-c1231011fdad/flow-files due to org.apache.http.ConnectionClosedException: Connection closed unexpectedly org.apache.http.ConnectionClosedException: Connection closed unexpectedly at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.closed(HttpAsyncRequestExecutor.java:140) at org.apache.http.impl.nio.client.InternalIODispatch.onClosed(InternalIODispatch.java:71) at org.apache.http.impl.nio.client.InternalIODispatch.onClosed(InternalIODispatch.java:39) at org.apache.http.impl.nio.reactor.AbstractIODispatch.disconnected(AbstractIODispatch.java:100) at org.apache.http.impl.nio.reactor.BaseIOReactor.sessionClosed(BaseIOReactor.java:279) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processClosedSessions(AbstractIOReactor.java:440) at org.apache.http.impl.nio.reactor.AbstractIOReactor.hardShutdown(AbstractIOReactor.java:576) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.doShutdown(AbstractMultiworkerIOReactor.java:446) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:374) at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) at java.lang.Thread.run(Thread.java:748) 2020-01-08 02:30:23,610 WARN [pool-43-thread-1] o.a.n.r.s.SiteToSiteReportingRecordSink SiteToSiteReportingRecordSink[id=41f3a256-016f-1000-a580-3b08af83c979] Failed to send data to http://127.0.0.1:8080/nifi-api/data-transfer/input-ports/81775e5c-016f-1000-093b-b91f6926a6e0/transactions/2e81a13b-0945-49a0-bd23-c1231011fdad/flow-files due to org.apache.http.ConnectionClosedException: Connection closed unexpectedly 2020-01-08 02:30:23,611 ERROR [Timer-Driven Process Thread-3] o.a.n.r.sql.QueryNiFiReportingTask QueryNiFiReportingTask[id=41f34d34-016f-1000-5c0c-c0cbfc88e8f8] Error during transmission of query results due to Failed to write metrics using record writer: Cannot confirm Transaction because state is TRANSACTION_STARTED; Transaction can only be confirmed when state is DATA_EXCHANGED: java.io.IOException: Failed to write metrics using record writer: Cannot confirm Transaction because state is TRANSACTION_STARTED; Transaction can only be confirmed when state is DATA_EXCHANGED java.io.IOException: Failed to write metrics using record writer: Cannot confirm Transaction because state is TRANSACTION_STARTED; Transaction can only be confirmed when state is DATA_EXCHANGED at org.apache.nifi.reporting.sink.SiteToSiteReportingRecordSink.sendData(SiteToSiteReportingRecordSink.java:172) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:87) at com.sun.proxy.$Proxy240.sendData(Unknown Source) at org.apache.nifi.reporting.sql.QueryNiFiReportingTask.onTrigger(QueryNiFiReportingTask.java:99) at org.apache.nifi.controller.tasks.ReportingTaskWrapper.run(ReportingTaskWrapper.java:44) at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: Cannot confirm Transaction because state is TRANSACTION_STARTED; Transaction can only be confirmed when state is DATA_EXCHANGED at org.apache.nifi.remote.AbstractTransaction.confirm(AbstractTransaction.java:187) at org.apache.nifi.reporting.sink.SiteToSiteReportingRecordSink.sendData(SiteToSiteReportingRecordSink.java:165) ... 16 common frames omitted ````
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
