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.

How stopping a PG by using curl in processsor "ExecuteStreamCommand" ?

Highlighted

How stopping a PG by using curl in processsor "ExecuteStreamCommand" ?

New Contributor

Hi,

In command line mode, I use this command

curl -X PUT -H 'Content-Type: application/json' -d '{"id":"<PGId>","state":"STOPPED"}' http://.../nifi-api/flow/process-groups/<PGId>

And it works


Now, I want to use it in an "ExecuteStreamCommand" Nifi processor

Command Agurments = -X PUT ;-H 'Content-Type: application/json'; -d '{"id":"30203190-6964-1510-fcde-5f5574bd6d48","state":"STOPPED"}' ;http://.../nifi-api/flow/process-groups/30203190-6964-1510-fcde-5f5574bd6d48


Result is :

execution.error
[1/2]: -d 'id:30203190-6964-1510-fcde-5f5574bd6d48' --> <stdout> curl: (3) Port number out of range [2/2]: -d 'state:STOPPED' --> <stdout> % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: -d 'state 100 57 100 57 0 0 9802 0 --:--:-- --:--:-- --:--:-- 9802


execution.status
0


And PGId's processors are always in state "RUNNING".


Anybody have an idea ?

Thanks