Created 11-03-2017 08:34 PM
Thanks to this awesome community.
I have a listenTCP processor which is listening on some IP and port number, everything is running fine however it keeps giving warning such as "warning listenTCP rejecting connection from xx.xx.xx.xx:12345 because max connections has been met" how do I avoid it? should I change the Max COnnections from 2 to 1?
Created 11-03-2017 10:55 PM
I tried increasing the value to 6 or 8, then it started giving error such as "java.net.SocketException: Connection reset by peer" and if l decreased it till default 2 it gave me the same warning. I have a 5 node cluster.
Created 11-06-2017 03:24 PM
Created 11-06-2017 03:53 PM
If you are seeing "max connections has been met" then it means that a given instance of ListenTCP has received more incoming connections than the Max Connections. The default value for max connections is 2, so this means whatever is connecting to ListenTCP is opening more than 2 connections at the same time. You need to adjust the value to meet your needs, and also keep in mind that if you have a 5 node cluster, then each node has its own ListenTCP with its own max connections, so it is up to you to ensure your clients are utilizing each instance of ListenTCP.
The message about "Connection reset by peer" means whatever is sending data to ListenTCP has closed the connection while ListenTCP expected to keep reading from it.
Created 11-06-2017 04:02 PM
@Bryan Bende Thanks for the reply. Appreciate it. I read this answer from your previous post at stackoverflow https://stackoverflow.com/questions/44054707/understand-of-max-number-of-tcp-connections-in-nifi
and tried adjusting the value, after adjsuting the max connections value to say something like 5, it starts giving error message instead of warning.
Error "Connection reset by peer" . Any suggestions to fix this
If I deccrease the max connections value value to 3, it starts giving warning again
Created 11-06-2017 04:15 PM
So it sounds like you need Max Connections to be more than 3 based on what you described...
The "Connection Reset by peer" is really not a problem with ListenTCP, its with the client closing connections.
What is sending the data to ListenTCP?
Created 11-06-2017 05:14 PM
@Bryan Bende Thanks again, Yes I need to set the max cnnections to be more than 3. there is a firewall pfsense (actually there are multiple pfsense firewall pushing data to nifi load balancer) should I not be worried about "Connection Reset by peer" ?
Created 11-06-2017 05:28 PM
Well it is normal behavior for the server (ListenTCP) to encounter that error when the client unexpectedly closes a connection that the server was attempting to read from or write to.
So the question is whether there should be connections being unexpectedly closed by your pfsense devices or possibly by your load balancer, which I really can't answer.
You may want to find a repeatable way to produce the error and then use a network capture tool to see what is being sent back and forth when this occurs.