It would be really cool if we offered a "hook" as part of the bootstrap process which would allow for a script to be ran that did things like this once NiFi was "started". Here the script could be user and environment defined and startup the desired processors/controller services.
On Mon, Jan 6, 2020 at 4:29 PM Muazma Zahid <[email protected]> wrote: > You can use Nifi CLI > <https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html#nifi_CLI> > for starting a processor group. We use the Nifi Registry to get the latest > flow and then deploy and start the processor group needed. > > Thanks, > Muazma > > On Mon, Jan 6, 2020 at 11:49 AM Hemambika Pommurapalli > <[email protected]> wrote: > > > Hi Team, > > > > we have installed Nifi-1.9.2, 2-node cluster in our lab and tried to test > > how to start the nifi processor group along with the nifi startup. Here > is > > the following way we tried: > > 1. Configured nifi as a service in our lab and created the python program > > where it contains the curl command to start the nifi process group and > > given that is given in the execstartpost option > > Here is the service configuration file: > > path: /etc/systemd/system/nifi.service > > > > [Unit] > > Description=Apache NiFi > > After=network.target > > > > [Service] > > Type=forking > > User=root > > Group=root > > ExecStart=/opt/nifi-1.9.2/bin/nifi.sh start > > #ExecStartPost=/usr/bin/python /root/samplecurlcode_cluster.py > > ExecStop=/opt/nifi-1.9.2/bin/nifi.sh stop > > ExecRestart=/opt/nifi-1.9.2/bin/nifi.sh restart > > > > [Install] > > WantedBy=multi-user.target > > > > **** > > Can you please suggest to us do we have any other option to start the > nifi > > processor group along with nifi startup. > > > > or if need to proceed with the above way am getting the TimedOut Error > when > > i execute the below command. > > > > Command: systemctl start nifi > > Error: > > — nifi.service - Apache NiFi > > Loaded: loaded (/etc/systemd/system/nifi.service; disabled; vendor > > preset: disabled) > > Active: failed (Result: timeout) since Mon 2020-01-06 21:21:17 IST; 2h > > 5min ago > > Process: 22236 ExecStart=/opt/nifi-1.9.2/bin/nifi_start.sh > (code=killed, > > signal=TERM) > > > > Jan 06 21:19:47 nifi-1 systemd[1]: Starting Apache NiFi... > > Jan 06 21:19:47 nifi-1 nifi_start.sh[22236]: nifi_start.sh: JAVA_HOME not > > set; results may vary > > Jan 06 21:19:47 nifi-1 nifi_start.sh[22236]: Java home: > > Jan 06 21:19:47 nifi-1 nifi_start.sh[22236]: NiFi home: /opt/nifi-1.9.2 > > Jan 06 21:19:47 nifi-1 nifi_start.sh[22236]: Bootstrap Config File: > > /opt/nifi-1.9.2/conf/bootstrap.conf > > Jan 06 21:21:17 nifi-1 systemd[1]: nifi.service start operation timed > out. > > Terminating. > > Jan 06 21:21:17 nifi-1 systemd[1]: Failed to start Apache NiFi. > > Jan 06 21:21:17 nifi-1 systemd[1]: Unit nifi.service entered failed > state. > > Jan 06 21:21:17 nifi-1 systemd[1]: nifi.service failed. > > ***** > > > > Thanks, > > P Hemambika > > >
