Thanks a lot for the quick response.

So u r suggesting we should not use proxy  in jvm argument(nifi
bootstrap.conf file) lable also as it will impact other component.like in
my case its impacting nifi-api.

Regards,
Sanjeet

On Fri, 14 Jan 2022, 12:19 am David Handermann, <exceptionfact...@apache.org>
wrote:

> Hi Sanjeet,
>
> Thank you for providing the stack trace and details of your configuration.
> Setting Java System properties in custom code is not a safe or supported
> operation in NiFi.  As you have observed, setting system properties alters
> the behavior of other components, leading to unexpected results.
>
> If you need to support access through a proxy server, the
> ProxyConfigurationService interface and StandardProxyConfigurationService
> implementation provide a way to specify proxy server properties:
>
>
> https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-proxy-configuration-nar/1.15.2/org.apache.nifi.proxy.StandardProxyConfigurationService/index.html
>
> Regards,
> David Handermann
>
> On Thu, Jan 13, 2022 at 12:39 PM sanjeet rath <rath.sanj...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I encounter one   "java.net.NoRouteToHostException: No route to host
> (Host
> > unreachable)" in *Nifi UI login page  *.
> > The after debugging i realised when i am setting the proxy & port  in
> > *System.setProperty("proxy address") & System.setProperty("port address")
> > *in
> > my custom processor. then this issue is appearing .
> >
> > The other way i also replicated   when i am setting at the* jvm lable(in
> > bootstrap.conf file -Dhttp.proxyHost=address) *for nifi application this
> > exception is coming in nifi ui login page:, After removal of this
> argument
> > it works fine.
> >
> > Could someone help me to understand what could be the issue.
> >
> > Nifi version: 1.12.1
> > cluster : 3 node (amazon EC2 linux cluster)
> >
> > *Detail exception from nifi-app.log:*
> >
> > o.a.n.c.c.h.r.ThreadPoolRequestReplicator Failed to replicate request GET
> > /nifi-api/flow/current-user to "exampledumyserveraddress" due to
> > java.net.NoRouteToHostException: No route to host (Host unreachable)
> >
> > 2022-01-13 12:57:23,722 WARN [Replicate Request Thread-5]
> > o.a.n.c.c.h.r.ThreadPoolRequestReplicator
> >
> > java.net.NoRouteToHostException: No route to host (Host unreachable)
> >
> >         at java.base/java.net.PlainSocketImpl.socketConnect(Native
> Method)
> >
> >         at
> > java.base/java.net
> > .AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
> >
> >         at
> > java.base/java.net
> >
> .AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
> >
> >         at
> > java.base/java.net
> > .AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
> >
> >         at
> > java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
> >
> >         at java.base/java.net.Socket.connect(Socket.java:609)
> >
> >         at
> > okhttp3.internal.platform.Platform.connectSocket(Platform.java:130)
> >
> >         at
> >
> >
> okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:263)
> >
> >         at
> >
> >
> okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.java:235)
> >
> >         at
> >
> okhttp3.internal.connection.RealConnection.connect(RealConnection.java:177)
> >
> >         at
> >
> >
> okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
> >
> >         at
> >
> >
> okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
> >
> >         at
> > okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
> >
> >         at
> > okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
> >
> >         at
> >
> >
> okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
> >
> >         at
> >
> >
> okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
> >
> >         at
> >
> >
> okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
> >
> >         at
> >
> okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
> >
> >         at
> >
> >
> okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
> >
> >         at
> >
> >
> okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
> >
> >         at
> >
> >
> okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
> >
> >         at
> >
> >
> okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
> >
> >         at
> >
> >
> okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
> >
> >         at
> >
> >
> okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
> >
> >         at
> >
> >
> okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
> >
> >         at
> > okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
> >
> >         at okhttp3.RealCall.execute(RealCall.java:81)
> >
> >         at
> >
> >
> org.apache.nifi.cluster.coordination.http.replication.okhttp.OkHttpReplicationClient.replicate(OkHttpReplicationClient.java:132)
> >
> >         at
> >
> >
> org.apache.nifi.cluster.coordination.http.replication.okhttp.OkHttpReplicationClient.replicate(OkHttpReplicationClient.java:126)
> >
> >         at
> >
> >
> org.apache.nifi.cluster.coordination.http.replication.ThreadPoolRequestReplicator.replicateRequest(ThreadPoolRequestReplicator.java:647)
> >
> >         at
> >
> >
> org.apache.nifi.cluster.coordination.http.replication.ThreadPoolRequestReplicator$NodeHttpRequest.run(ThreadPoolRequestReplicator.java:839)
> >
> >         at
> >
> >
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> >
> >         at
> > java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> >
> >         at
> >
> >
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> >
> >         at
> >
> >
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> >
> >         at java.base/java.lang.Thread.run(Thread.java:834)
> >
> >
> >
> >
> >
> > Thanks & Regards
> > --
> > Sanjeet Kumar Rath,
> > mob- +91 8777577470
> >
>

Reply via email to