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

Andy LoPresto commented on NIFI-6201:
-------------------------------------

With the message added back, the output looks like: 

{code}
2019-04-09 23:36:47,906 INFO [main] org.apache.nifi.NiFi Controller 
initialization took 20908993106 nanoseconds (20 seconds).
2019-04-09 23:36:49,461 ERROR [Timer-Driven Process Thread-4] 
o.a.nifi.groups.StandardProcessGroup Failed to synchronize 
StandardProcessGroup[identifier=cc0f2d21-0169-1000-858f-1e4106731707] with Flow 
Registry because could not retrieve version 1 of flow with identifier 
8bb7dcc8-5be1-4451-bf42-2d9c3e08081c in bucket 
aa2f984d-fca4-4b0b-a5a2-c21b3910d1b6 due to: Connection refused (Connection 
refused)
2019-04-09 23:36:49,462 ERROR [Timer-Driven Process Thread-4] 
o.a.nifi.groups.StandardProcessGroup Failed to synchronize 
StandardProcessGroup[identifier=9b4d4f85-0169-1000-8bfd-c8c29fc71447] with Flow 
Registry because could not retrieve version 2 of flow with identifier 
ac66d0ae-2568-489e-aee7-176d0be74606 in bucket 
aa2f984d-fca4-4b0b-a5a2-c21b3910d1b6 due to: Connection refused (Connection 
refused)
2019-04-09 23:36:49,463 ERROR [Timer-Driven Process Thread-4] 
o.a.nifi.groups.StandardProcessGroup Failed to synchronize 
StandardProcessGroup[identifier=9b3b1bba-0169-1000-5910-3a1883ce6f36] with Flow 
Registry because could not retrieve version 2 of flow with identifier 
932bb11a-cfcc-4b0f-927b-8dd2e5010ced in bucket 
aa2f984d-fca4-4b0b-a5a2-c21b3910d1b6 due to: Connection refused (Connection 
refused)
2019-04-09 23:36:49,464 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 due to: Connection refused (Connection 
refused)
{code}

> 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