Closed FemiKB closed 2 years ago
A 500 error generally means that you need to look in the NiFi log for an NPE, did you find anything there?
It returns java.lang.NullPointerException ( in the nifi user log)
ERROR [NiFi Web Server-115] o.a.nifi.web.api.config.ThrowableMapper An unexpected error has occurred: java.lang.NullPointerException. Returning Internal Server Error response.
java.lang.NullPointerException: null
at org.apache.nifi.provenance.index.lucene.LuceneEventIndex.retrieveQuerySubmission(LuceneEventIndex.java:781)
at org.apache.nifi.provenance.WriteAheadProvenanceRepository.retrieveQuerySubmission(WriteAheadProvenanceRepository.java:262)
at org.apache.nifi.web.controller.ControllerFacade.getProvenanceQuery(ControllerFacade.java:1092)
at org.apache.nifi.web.controller.ControllerFacade$$FastClassBySpringCGLIB$$5a42ba54.invoke(
Right, your usage is probably incorrect. According to the NiFi docs get_provenance returns the results of a Provenance query via an ID, which is previously requested with submit_provenance_request. If you want to work with the low level APIs I suggest you enable developer mode in Chrome, then capture the request sequence in the UI, then duplicate it in NiPyAPI.
Description
I want to use nipyapi to fetch data provenance from GetFile processor, but when I'm calling get_provenance or get_provenance_event api , It's returning errors
What I Did
I use the following command to call provenance api's
test = ProvenanceApi() thread = test.get_provenance(id='6853aa90-bd63-3bd7-aff8-e3c2639c1471')
I got error message:
reply: 'HTTP/1.1 500 Internal Server Error\r\n' header: Date: Thu, 18 Nov 2021 06:05:41 GMT header: X-Frame-Options: SAMEORIGIN header: Content-Security-Policy: frame-ancestors 'self' header: X-XSS-Protection: 1; mode=block header: X-Content-Type-Options: nosniff header: Strict-Transport-Security: max-age=31540000 header: Vary: Accept-Encoding header: Content-Type: text/plain header: Content-Length: 79 header: Server: Jetty(9.4.42.v20210604) 2021-11-18 11:35:41,685 DEBUG https://localhost:9443 "GET /nifi-api/provenance/6853aa90-bd63-3bd7-aff8-e3c2639c1471 HTTP/1.1" 500 79 2021-11-18 11:35:41,685 DEBUG https://localhost:9443 "GET /nifi-api/provenance/6853aa90-bd63-3bd7-aff8-e3c2639c1471 HTTP/1.1" 500 79 DEBUG:urllib3.connectionpool:https://localhost:9443 "GET /nifi-api/provenance/6853aa90-bd63-3bd7-aff8-e3c2639c1471 HTTP/1.1" 500 79 DEBUG:nipyapi.nifi.rest:response body: An unexpected error has occurred. Please check the logs for additional details. ApiException()
I have no idea about the error. Does anyone know how to resolve the problem? thanks!