Member since
10-18-2021
10
Posts
0
Kudos Received
0
Solutions
08-16-2022
04:47 PM
Thanks @araujo I am using server side calls to get the information and then pass it on through to the client side. With this approach, all API calls are made from the server side component.
... View more
08-07-2022
11:47 PM
@MattWho @ckumar thanks for your inputs! I was able to resolve the issue following the steps you mentioned. Much appreciated!
... View more
08-07-2022
11:43 PM
and this is the error I get when I call using XMLHttpRequest - Access to XMLHttpRequest at '.../nifi-api/flow/cluster/summary' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
... View more
08-07-2022
11:40 PM
Thanks for the prompt response @araujo I am trying to call /nifi-api/flow/cluster/summary from Javascript using XMLHttpRequest. The intent is to be able to display output from the query in the page. My code is as below: <script> // javascript, jquery calls for calling APIs let xhrPostNifi = new XMLHttpRequest(); xhrPostNifi.withCredentials = true; xhrPostNifi.open("GET", "https://<<server url>>/nifi-api/flow/cluster/summary"); xhrPostNifi.setRequestHeader("Authorization", "Basic xxxxxxxxxxxxxxxxx"); xhrPostNifi.setRequestHeader('Authorization', 'Bearer <<bearer token>>'); xhrPostNifi.setRequestHeader( "Content-type", "application/json;charset=UTF-8" ); xhrPostNifi.onreadystatechange = function () { if (this.readyState == 2) { console.log("Recieved response - nifi"); } if (this.readyState == 4 && this.status == 200) { // Process recieved data strJSONBuffer = this.responseText; console.log(strJSONBuffer); //populateFilterData(); console.debug("Response received.... "+strJSONBuffer); } }; xhrPostNifi.send(); </script>
... View more
08-07-2022
10:10 PM
Hi all, I want to access Nifi REST API from a different client machine which is in a different domain. The REST API is up and running but gives me a CORS error when I try accessing the API from a client in a different domain. Please see below - Access to XMLHttpRequest at '...' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. I understand that I need to change Jetty's web.xml to allow cross origin requests. I can't seem to find web.xml in my nifi install. This is a nifi docker container. Any help I can get in this is much appreciated. Please also let me know if there's a better solution than changing web.xml. I tried CORS browser plugins but haven't been able to get them to work. Thanks in advance.
... View more
Labels:
- Labels:
-
Apache NiFi
05-30-2022
01:41 AM
@MattWhothank you for providing this response. I am in the same situation. I tried the steps you mentioned above. My apologies if I am asking a basic question, where can I get help on how I can resolve TLS handshake errors? I am getting the below error - Error Unable to obtain listing of buckets: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target After setting up Nifi and Nifi Registry should I be setting up certs to enable ssl connections between nifi and registry? Thanks in advance.
... View more
05-20-2022
01:20 PM
Thanks for taking the time to respond @ckumar Merge strategy is set to Defragment and yes it seems to be waiting for the remaining 2 files which never arrive. I have noticed that if a record isn't found in the Elastic index, QueryElasticSearchHTTP processor does not return a failure and so there is nothing returned through any relationship for the missing 2 records.
... View more
05-18-2022
12:06 AM
Hi all, I am hoping I can get some help with this. I have a process that's sending a set of JSON records to a NiFi flow. Each JSON record in the array is a set of criteria/conditions for which I run QueryElasticSearchHTTP to get matching records from ElasticSearch. I am using a Merge Content processor at the end to merge all of this data and send back the JSON array as response. It works fine when for example I send 10 JSON criteria records in the array and QueryElasticSearchHTTP is able to find a document in the index for each criteria it receives. It bundles up the 10 resultant records from Elastic and sends the response through. However, if QueryElasticSearchHTTP finds only 8 records matching the criteria, it then waits forever at the Merge Content processor. I realise this is because it has received 10 records initially and split them into 10 flow files. When it looks to merge, it finds only 8 flow files and is waiting for the remaining 2 which never come through. This blocks up the entire flow and nothing works from here on. Please see picture above. Can anyone help me with a solution to this, please? Thanks in advance.
... View more
Labels:
- Labels:
-
Apache NiFi
10-18-2021
10:33 PM
I am a newbie to NiFi and I am trying to pass a JSON object to NiFi. Having failed at multiple attempts, I am trying a very simple flow as below. I have checked the JSON in online validators and have confirmed that it's a valid JSON file. Yet, I am not getting the output I want i.e. Country and Capital in flow file attributes. Please advise where I am going wrong. Thanks in advance.
... View more
Labels:
- Labels:
-
Apache NiFi