Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Can the NiFi bootstrap process be configured to restart the core NiFi process if it hits a critical failure such as OOM?

Solved Go to solution

Can the NiFi bootstrap process be configured to restart the core NiFi process if it hits a critical failure such as OOM?

I am aware that the NiFi bootstrap process can be configured to provide notifications in the event of a NiFi failure but I am wondering if we can configure the bootstrap process to not only detect and notify users of a failure but to also attempt to bring the NiFi process back to life? Am I missing an obvious config parameter in the guide?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Can the NiFi bootstrap process be configured to restart the core NiFi process if it hits a critical failure such as OOM?

The boostrap process restarts NiFi when the main NiFi process dies. An easy test is to start a new NiFi and then kill -9 the main process and you'll immediately see it come back with a new pid.

OOM would probably be tricky because a lot of times the Java process does not die when encountering an OOM and sticks around in some bad state.

2 REPLIES 2
Highlighted

Re: Can the NiFi bootstrap process be configured to restart the core NiFi process if it hits a critical failure such as OOM?

Guru

@Brandon Wilson I believe the best way to do this would be to install NiFi on your system using

$NIFI_HOME/bin/nifi.sh install

and then using an OS level processing management tool (supervisord on Ubuntu for example) to monitor that process and then restart it based on configurations that you provide to the process management tool.

Re: Can the NiFi bootstrap process be configured to restart the core NiFi process if it hits a critical failure such as OOM?

The boostrap process restarts NiFi when the main NiFi process dies. An easy test is to start a new NiFi and then kill -9 the main process and you'll immediately see it come back with a new pid.

OOM would probably be tricky because a lot of times the Java process does not die when encountering an OOM and sticks around in some bad state.