nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patricia Quill <>
Subject Re: ConsumeMQTT processor causing resource issues when deployed in MiNiFi
Date Mon, 01 Oct 2018 14:51:24 GMT
Thanks for the response. Am using version 1.7.0 NiFi & version 0.5.0 MiNiFi. Have NiFi
running as a Docker image.The workflow is basically the sample that is on the "Getting Started
with NiFi" web site but have substituted the "TailFile" processor on the remote MiNiFi with
The change I made to JVM settings was to increase the initial & max heap size in file
bootstrap.conf on the MiNiFi server. The VM is configured with 16GB RAM.

# JVM memory settings#java.arg.2=-Xms256m#java.arg.3=-Xmx256mjava.arg.2=-Xms2048mjava.arg.3=-Xmx2048m
Was unable to obtain the thread dump as the OS refuses to do anything after the OutOfMemory
error is received.Think I have narrowed down the problem. Have setup a mosquitto broker on
the MiNiFi server. If I configure ConsumeMQTT with a URI of tcp://localhost:1883 there are
no issues. The problem seems to be happening if I replace localhost with the IP address of
the MiNiFi server. Repeat messages like the below are generated until eventually the OutOfMemory
error occurs. 
2018-10-01 10:25:07,421 ERROR [Timer-Driven Process Thread-3] o.a.nifi.processors.mqtt.ConsumeMQTT
ConsumeMQTT[id=3f3ecc40-41ca-319d-0000-000000000000] Connection to tcp://xxxxxxxxxx:1883 lost
(or was never connected) and ontrigger connect failed. Yielding processor: Connection lost
(32109) - Connection lost
at at java.util.concurrent.Executors$
at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(
at java.util.concurrent.ScheduledThreadPoolExecutor$
at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$
at by: null at
at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(
at ... 7
common frames omitted
The firewall on the VM is disabled and the ConsumeMQTTProcessor works on the NiFi server when
configured with an IP address.Wondering if I am missing a dependency? I copied the following
to the lib directory on the MiNiFi server-nifi-mqtt-nar-1.7.0.nar-nifi-standard-services-api-nar-1.7.0.nar
The other possibility is there is some security setting in the lab that I am using that is
causing this but then am curious why it works in NiFi.


    On Friday, 28 September 2018, 14:38, Joe Witt <> wrote:

 Certainly could be that memory space on the machine is constrained
enough that creation of a new thread isn't possible.  Could be a
resource leak.  To Aldrin's point though I'd say the thread dump would
be really helpful.  In fact, I'd recommend grabbing a few at different
time intervals such as shortly after launch, after a 'while' when
things are working well, and 'when it hits this point'.

How much memory is on the system and how much is configured for the JVM?

On Fri, Sep 28, 2018 at 9:30 AM Aldrin Piri <> wrote:
> Hello Patricia,
> Could you provide more details about JVM properties that you tried configuring?  Please
also let us know the relevant versions of MiNiFi and NiFi you are using.  If possible, providing
the flow you are attempting to run would be helpful.  Otherwise, if you could get into specifics
about how the consume processor is configured would give a few more datapoints.
> Additionally, I would like to request that you grab us a thread dump from MiNiFi when
this issue is exhibited.  This can be accomplished by running bin/ dump <dump
file name>.
> At its core, and beyond the initial configuration startup, MiNiFi is running primarily
the same core libraries as NiFi and would expect similar JVM configurations to have similar
success in operating.  The inability to create new threads is a bit of a curious one that
I have not seen especially when the same flow is not at issue in NiFi.
> Thanks!
> --aldrin
> On Fri, Sep 28, 2018 at 5:04 AM Patricia Quill <> wrote:
>> Have deployed a ConsumeMQTT processor to a remote server using MiNiFi (Java agent) 
and configured it to subscribe to a mosquitto broker. Problem I am seeing is that it is causing
the OS to run out of resources.
>> 2018-09-27 09:06:37,060 WARN [Timer-Driven Process Thread-9] o.a.n.controller.tasks.ConnectableTask
Administratively Yielding ConsumeMQTT[id=b3271a8d-cc15-3f10-0000-000000000000] due to uncaught
Exception: java.lang.OutOfMemoryError: unable to create new native thread
>> java.lang.OutOfMemoryError: unable to create new native thread
>> at java.lang.Thread.start0(Native Method)
>> at java.lang.Thread.start(
>> at java.util.concurrent.ThreadPoolExecutor.addWorker(
>> at java.util.concurrent.ThreadPoolExecutor.ensurePrestart(
>> at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(
>> at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(
>> at java.util.concurrent.ScheduledThreadPoolExecutor.execute(
>> at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.start(
>> at org.eclipse.paho.client.mqttv3.internal.ClientComms.connect(
>> at org.eclipse.paho.client.mqttv3.internal.ConnectActionListener.connect(
>> at org.eclipse.paho.client.mqttv3.MqttAsyncClient.connect(
>> at org.eclipse.paho.client.mqttv3.MqttClient.connect(
>> at org.apache.nifi.processors.mqtt.common.AbstractMQTTProcessor.setAndConnectClient(
>> at org.apache.nifi.processors.mqtt.ConsumeMQTT.reconnect(
>> at org.apache.nifi.processors.mqtt.ConsumeMQTT.onTrigger(
>> at org.apache.nifi.processors.mqtt.common.AbstractMQTTProcessor.onTrigger(
>> at org.apache.nifi.controller.StandardProcessorNode.onTrigger(
>> at org.apache.nifi.controller.tasks.ConnectableTask.invoke(
>> at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$
>> at java.util.concurrent.Executors$
>> at java.util.concurrent.FutureTask.runAndReset(
>> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(
>> at java.util.concurrent.ScheduledThreadPoolExecutor$
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(
>> at java.util.concurrent.ThreadPoolExecutor$
>> at
>> I've tried it on a number of different OS types  - Ubuntu 14_04, Ubuntu 16_04 and
CentOS 7. I have tried tweaking the JVM properties but to no avail. Am using NiFi 1.7.0.
>> The MiNiFi setup seems to be OK as I tried a test with the TailFile processor and
had no issues.  The ConsumeMQTT processor works without any issues if it's deployed on the
NiFi server.
>> Has anyone else come across this or have any suggestions?

View raw message