[ 
https://issues.apache.org/jira/browse/NIFI-6201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16814080#comment-16814080
 ] 

Charlie Meyer edited comment on NIFI-6201 at 4/10/19 6:06 AM:
--------------------------------------------------------------

Hi [~alopresto] 

I'm looking at the output you posted above and it appears that the Connection 
refused context for why the error is happening is now suppressed. Was that 
intentional?

 

I ask because there have been several times in the past few months where the 
registry being down was noticed via these long stack traces in NiFi and ideally 
the context of the error could be preserved.

 

Thanks!


was (Author: cemeyer2):
Hi [~alopresto] 

I'm looking at the output you posted above and it appears that the Connection 
refused context for why the error is happening is now suppressed. Was that 
intentional?

 

I ask because there have been several times in the past few months were the 
registry being down was noticed via these long stack traces in NiFi and ideally 
the context of the error could be preserved.

 

Thanks!

> Suppress stacktrace on connection refused when NiFi Registry is not running
> ---------------------------------------------------------------------------
>
>                 Key: NIFI-6201
>                 URL: https://issues.apache.org/jira/browse/NIFI-6201
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework, Extensions
>    Affects Versions: 1.9.2
>            Reporter: Andy LoPresto
>            Assignee: Andy LoPresto
>            Priority: Major
>              Labels: beginner, error, log, registry
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When NiFi is running and the flow has a Registry Client configured to connect 
> to the NiFi Registry, but the Registry instance is not running or is not 
> avzailable, long stacktraces are output in the {{nifi-app.log}}. While these 
> events are important, the long stacktraces are unnecessary as the cause is 
> clear -- "Connection refused". These exceptions should be caught and logged 
> properly. 
> Sufficient: 
> {code}
> 2019-04-09 19:51:04,100 ERROR [Timer-Driven Process Thread-4] 
> o.a.nifi.groups.StandardProcessGroup Failed to synchronize 
> StandardProcessGroup[identifier=9b59e11e-0169-1000-cb5a-8291e22101f8] with 
> Flow Registry because could not retrieve version 2 of flow with identifier 
> 39ba9057-eaee-4ded-bc61-ce6d4d47d164 in bucket 
> aa2f984d-fca4-4b0b-a5a2-c21b3910d1b6
> java.net.ConnectException: Connection refused (Connection refused)
> {code}
> Unnecessary (current state): 
> {code}
> 2019-04-09 19:53:04,121 ERROR [Timer-Driven Process Thread-8] 
> o.a.nifi.groups.StandardProcessGroup Failed to synchronize 
> StandardProcessGroup[identifier=9b59e11e-0169-1000-cb5a-8291e22101f8] with 
> Flow Registry because could not retrieve version 2 of flow with identifier 
> 39ba9057-eaee-4ded-bc61-ce6d4d47d164 in bucket 
> aa2f984d-fca4-4b0b-a5a2-c21b3910d1b6
> java.net.ConnectException: Connection refused (Connection refused)
>       at java.net.PlainSocketImpl.socketConnect(Native Method)
>       at 
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>       at 
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>       at 
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
>       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>       at java.net.Socket.connect(Socket.java:589)
>       at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
>       at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
>       at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
>       at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
>       at sun.net.www.http.HttpClient.New(HttpClient.java:339)
>       at sun.net.www.http.HttpClient.New(HttpClient.java:357)
>       at 
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220)
>       at 
> sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
>       at 
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
>       at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984)
>       at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
>       at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
>       at 
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
>       at 
> org.glassfish.jersey.client.internal.HttpUrlConnector._apply(HttpUrlConnector.java:390)
>       at 
> org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:282)
>       at 
> org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:278)
>       at 
> org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:767)
>       at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
>       at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
>       at org.glassfish.jersey.internal.Errors.process(Errors.java:229)
>       at 
> org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:414)
>       at 
> org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:765)
>       at 
> org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:428)
>       at 
> org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:324)
>       at 
> org.apache.nifi.registry.client.impl.JerseyFlowSnapshotClient.lambda$get$1(JerseyFlowSnapshotClient.java:104)
>       at 
> org.apache.nifi.registry.client.impl.AbstractJerseyClient.executeAction(AbstractJerseyClient.java:71)
>       at 
> org.apache.nifi.registry.client.impl.JerseyFlowSnapshotClient.get(JerseyFlowSnapshotClient.java:97)
>       at 
> org.apache.nifi.registry.flow.RestBasedFlowRegistry.getFlowContents(RestBasedFlowRegistry.java:206)
>       at 
> org.apache.nifi.registry.flow.RestBasedFlowRegistry.getFlowContents(RestBasedFlowRegistry.java:220)
>       at 
> org.apache.nifi.groups.StandardProcessGroup.synchronizeWithFlowRegistry(StandardProcessGroup.java:3258)
>       at 
> org.apache.nifi.controller.FlowController$5.run(FlowController.java:820)
>       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)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to