Load Balancing error

2024-03-06 Thread Joe Obernberger
Hi all - I'm running a NiFi cluster in kubernetes - version 1.25.0, and 
when it's under load, I get these errors:



2024-03-06 22:22:58,081 ERROR [Load-Balanced Client Thread-4] 
o.a.n.c.q.c.c.a.n.NioAsyncLoadBalanceClient Unable to connect to 
nifi-0.nifi-headless.nifi-jos.svc.cluster.local:8443 for load balancing

java.net.UnknownHostException: null
    at java.base/sun.nio.ch.Net.translateException(Unknown Source)
    at java.base/sun.nio.ch.SocketAdaptor.connect(Unknown Source)
    at java.base/sun.nio.ch.SocketAdaptor.connect(Unknown Source)
    at 
org.apache.nifi.controller.queue.clustered.client.async.nio.NioAsyncLoadBalanceClient.createChannel(NioAsyncLoadBalanceClient.java:497)
    at 
org.apache.nifi.controller.queue.clustered.client.async.nio.NioAsyncLoadBalanceClient.establishConnection(NioAsyncLoadBalanceClient.java:440)
    at 
org.apache.nifi.controller.queue.clustered.client.async.nio.NioAsyncLoadBalanceClient.communicate(NioAsyncLoadBalanceClient.java:234)
    at 
org.apache.nifi.controller.queue.clustered.client.async.nio.NioAsyncLoadBalanceClientTask.run(NioAsyncLoadBalanceClientTask.java:81)

    at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
    at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown 
Source)

    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown 
Source)
    at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

    at java.base/java.lang.Thread.run(Unknown Source)

The pod then exits, and Nifi restarts, and resumes, but this can happen 
many times per day.

Any ideas?

I also see:
2024-03-06 22:22:42,022 ERROR [Load-Balanced Client Thread-1] 
o.a.n.c.q.c.c.a.n.NioAsyncLoadBalanceClient Unable to connect to 
nifi-0.nifi-headless.nifi-jos.svc.cluster.local:8443 for load balancing

java.net.ConnectException: Connection refused
    at java.base/sun.nio.ch.Net.connect0(Native Method)
    at java.base/sun.nio.ch.Net.connect(Unknown Source)
    at java.base/sun.nio.ch.Net.connect(Unknown Source)
    at java.base/sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
    at java.base/sun.nio.ch.SocketAdaptor.connect(Unknown Source)
    at java.base/sun.nio.ch.SocketAdaptor.connect(Unknown Source)
    at 
org.apache.nifi.controller.queue.clustered.client.async.nio.NioAsyncLoadBalanceClient.createChannel(NioAsyncLoadBalanceClient.java:497)
    at 
org.apache.nifi.controller.queue.clustered.client.async.nio.NioAsyncLoadBalanceClient.establishConnection(NioAsyncLoadBalanceClient.java:440)
    at 
org.apache.nifi.controller.queue.clustered.client.async.nio.NioAsyncLoadBalanceClient.communicate(NioAsyncLoadBalanceClient.java:234)
    at 
org.apache.nifi.controller.queue.clustered.client.async.nio.NioAsyncLoadBalanceClientTask.run(NioAsyncLoadBalanceClientTask.java:81)

    at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
    at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown 
Source)

    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown 
Source)
    at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)


It various from node to node - sometimes it's nifi0, sometimes nifi1, 
and sometimes nifi2.  Having a hard time tracking down the cause.  When 
the system is lightly loaded, it's no problem, but when queue size gets 
large, I start getting these restarts.


-Joe


--
This email has been checked for viruses by AVG antivirus software.
www.avg.com


Re: Error on first launch (probable newbie misconfiguration)

2024-03-06 Thread Mark Payne
Hey there Franck,

Can you provide the full error message with stack trace that gets printed?

Thanks
-Mark


On Mar 6, 2024, at 1:26 PM, Franck Routier via users  
wrote:

Hi,

I'm a first time wanabe user of Nifi, and I followed the installation guide, 
until the point when I try to launch Nifi:

- install ubuntu 22.04 (in an incus container)
- install java (21.0.2)
- download and install nifi
- set mandatory properties in conf/nifi.properties
- and run:

../bin/nifi.sh run
but it returns quickly, and the logs tells me that...:

Error creating bean with name 
'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration':
 Unsatisfied dependency expressed through method 'setFilterChains' parameter 0: 
Error creating bean with name
'securityFilterChain' defined in 
org.apache.nifi.web.security.configuration.WebSecurityConfiguration: 
Unsatisfied dependency expressed through method 'securityFilterChain' parameter 
2: Error creating bean with name 
'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration':
 Unsatisfied dependency expressed thr
ough constructor parameter 2: Error creating bean with name 'flowController' 
defined in class path resource [nifi-context.xml]: Cannot resolve reference to 
bean 'propertyEncryptor' while setting bean property 'encryptor'

So, I guess a configuration is missing somewhere, but I have no clue where.
(I checked that nifi.sensitive.props.key is set, it, is, and now I'm lost).

Thanks
Franck



Error on first launch (probable newbie misconfiguration)

2024-03-06 Thread Franck Routier via users
Hi,

I'm a first time wanabe user of Nifi, and I followed the installation guide, 
until the point when I try to launch Nifi:

- install ubuntu 22.04 (in an incus container)
- install java (21.0.2)
- download and install nifi
- set mandatory properties in conf/nifi.properties
- and run:

../bin/nifi.sh run

but it returns quickly, and the logs tells me that...:

Error creating bean with name 
'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration':
 Unsatisfied dependency expressed through method 'setFilterChains' parameter 0: 
Error creating bean with name 
'securityFilterChain' defined in 
org.apache.nifi.web.security.configuration.WebSecurityConfiguration: 
Unsatisfied dependency expressed through method 'securityFilterChain' parameter 
2: Error creating bean with name 
'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration':
 Unsatisfied dependency expressed thr
ough constructor parameter 2: Error creating bean with name 'flowController' 
defined in class path resource [nifi-context.xml]: Cannot resolve reference to 
bean 'propertyEncryptor' while setting bean property 'encryptor'


So, I guess a configuration is missing somewhere, but I have no clue where.
(I checked that nifi.sensitive.props.key is set, it, is, and now I'm lost).

Thanks
Franck