Support Questions

Find answers, ask questions, and share your expertise

Nifi toolkit pg-list fails with message : Error executing command 'pg-list' : null

avatar
New Contributor

Hello
I'm running Nifi toolkit v1.12.1 with JDK 8

I'm running into a problem when running the following command
cli.sh nifi pg-list -p /nifi.properties --verbose

I can do a
wget --certificate=./my.pem --private-key=./my.key --ca-certificate=./myca.pem https://xxx/nifi-api/flow/process-groups/root
and get a correct output

Can you help me get the corret output with the toolkit ?

Is it possible to log the toolkit requests / responses ?

The stack trace I get with the toolkit is: 
org.apache.nifi.toolkit.cli.api.CommandException: Error executing command 'pg-list' : null
at org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand.doExecute(AbstractNiFiCommand.java:65)
at org.apache.nifi.toolkit.cli.impl.command.AbstractPropertyCommand.execute(AbstractPropertyCommand.java:74)
at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.processCommand(CommandProcessor.java:252)
at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.processGroupCommand(CommandProcessor.java:233)
at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.process(CommandProcessor.java:188)
at org.apache.nifi.toolkit.cli.CLIMain.runSingleCommand(CLIMain.java:145)
at org.apache.nifi.toolkit.cli.CLIMain.main(CLIMain.java:72)
Caused by: java.lang.NullPointerException
at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
at java.util.TimSort.sort(TimSort.java:220)
at java.util.Arrays.sort(Arrays.java:1512)
at java.util.ArrayList.sort(ArrayList.java:1462)
at org.apache.nifi.toolkit.cli.impl.result.nifi.ProcessGroupsResult.<init>(ProcessGroupsResult.java:50)
at org.apache.nifi.toolkit.cli.impl.command.nifi.pg.PGList.doExecute(PGList.java:78)
at org.apache.nifi.toolkit.cli.impl.command.nifi.pg.PGList.doExecute(PGList.java:40)
at org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand.doExecute(AbstractNiFiCommand.java:63)
... 6 more

Regards

1 ACCEPTED SOLUTION

avatar
New Contributor

The problem seemed to be caused by wrong access policies on PG under the root.
With the wrong credentials the name attribute of certain PG was not returned
in the response which caused pg-list to fail.
Adding read policy for the credentials on the PGs solved the case. ?!

Regards

View solution in original post

1 REPLY 1

avatar
New Contributor

The problem seemed to be caused by wrong access policies on PG under the root.
With the wrong credentials the name attribute of certain PG was not returned
in the response which caused pg-list to fail.
Adding read policy for the credentials on the PGs solved the case. ?!

Regards