Member since
04-27-2021
3
Posts
0
Kudos Received
0
Solutions
05-03-2021
12:13 PM
Issue has been resolved thanks alot.
... View more
04-27-2021
01:26 PM
Hi All, We are using nifi 1.8 and it was on http, we enabled https now on 3 node cluster. We have processers which we had to start and stop based on feeds from upstream systems and other checks. We used api as suggested in post. Below is code tkn=$(curl --tlsv1.2 https://10.10.10.10:8443/nifi-api/access/token --data 'username=USERID&password=PASSWORD' -k) GETFILE='https://'$HOSTNAME':'$PORT'/nifi-api/processors/'$GET_ID'' curl --tlsv1.2 -ik -H 'Content-Type: application/json' -H 'Authorization: Bearer '$tkn'' -X PUT -d '{"id":"'$GET_ID'","state":"RUNNING"}}' $GETFILE When i execute i get below error, but when i try from console for this user i can start and stop the processer 'ddd43f1f-015f-1000-10d9-dfb3420f4d4c' tkn=$(curl --tlsv1.2 https://10.10.10.10:8443/nifi-api/access/token --data 'username=USERID&password=PASSWORD' -k) + curl --tlsv1.2 https://10.10.10.10:8443/nifi-api/access/token --data 'username=USERID&password=PASSWORD' -k % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 307 100 260 100 47 816 147 --:--:-- --:--:-- --:--:-- 833 tkn=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzcnZBUDEyMDE0MkRFViIsImlzcyI6IkxkYXBQcm92aWRlciIsImF1ZCI6IkxkYXBQcm92aWRlciIsInByZWZlcnJlZF91c2VybmFtZSI6InNydkFQMTIwMTQyREVWIiwia2lkIjoxLCJleHAiOjE2MTk1OTc1NjksImlhdCI6MTYxOTU1NDM2OX0.v9rLE9ujUgoKe-zRe-aeW4_6PJn8ozNN6-LT2Sv1Ufo GETFILE=https://10.10.10.10:8443/nifi-api/processors/ddd43f1f-015f-1000-10d9-dfb3420f4d4c curl --tlsv1.2 -ik -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzcnZBUDEyMDE0MkRFViIsImlzcyI6IkxkYXBQcm92aWRlciIsImF1ZCI6IkxkYXBQcm92aWRlciIsInByZWZlcnJlZF91c2VybmFtZSI6InNydkFQMTIwMTQyREVWIiwia2lkIjoxLCJleHAiOjE2MTk1OTc1NjksImlhdCI6MTYxOTU1NDM2OX0.v9rLE9ujUgoKe-zRe-aeW4_6PJn8ozNN6-LT2Sv1Ufo' -X PUT -d '{"id":"ddd43f1f-015f-1000-10d9-dfb3420f4d4c","state":"RUNNING"}}' https://10.10.10.10:8443/nifi-api/processors/ddd43f1f-015f-1000-10d9-dfb3420f4d4c HTTP/1.1 400 Bad Request Date: Tue, 27 Apr 2021 20:12:49 GMT X-Frame-Options: SAMEORIGIN Content-Security-Policy: frame-ancestors 'self' Content-Type: text/plain Vary: Accept-Encoding Content-Length: 498 Server: Jetty(9.4.11.v20180605) Can you please advise what i am missing or doing wrong?
... View more