Support Questions

Find answers, ask questions, and share your expertise

Nifi CLI not working as expected

avatar
Expert Contributor

Hi All,

Good Day.

 

I am trying to work with NiFi cli toolkit. Installation is successful, and I am able to enter the CLI prompt.

But When I use CLI commands it throws errors like below:

#> nifi list-param-contexts

ERROR: Error executing command 'list-param-contexts' : Unexpected end of file from server

 

 

My cli.properties looks like below:

 

baseUrl=http://localhost:8443/
keystore=
keystoreType=
keystorePasswd=
keyPasswd=
truststore=
truststoreType=
truststorePasswd=
proxiedEntity=

 

even i explicitly mention the baseUrl the error is same:

 

#> nifi list-param-contexts -baseUrl http://localhost:8443/

ERROR: Error executing command 'list-param-contexts' : Unexpected end of file from server

 

 

My Nifi instance don't have certificate authorization (I actually don't need it, because I do ssh into the isntance and don't  login from outside world) 

and I have only admin user.

 

I had Nifi Registry as well and it working good. but i want to interact with Nifi instance not with registry.

#> registry list-buckets -baseUrl http://localhost:18080

# Name Id Description
- ------------ ------------------------------------ -----------
1 First-bucket 8a3da253-f635-4b01-941f-bfb6437cead7
2 delete 4df052fd-fddc-4e7b-b4ea-bb3b8b691385

 

 

complete error when using verbose:

 

#> nifi list-param-contexts --verbose

ERROR: Error executing command 'list-param-contexts' : Unexpected end of file from server


org.apache.nifi.toolkit.cli.api.CommandException: Error executing command 'list-param-contexts' : Unexpected end of file from server
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.runInteractiveCLI(CLIMain.java:124)
at org.apache.nifi.toolkit.cli.CLIMain.main(CLIMain.java:68)
Caused by: java.net.SocketException: Unexpected end of file from server
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:866)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:863)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1615)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
at org.glassfish.jersey.client.internal.HttpUrlConnector._apply(HttpUrlConnector.java:378)
at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:267)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:297)
at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:675)
at org.glassfish.jersey.client.JerseyInvocation.call(JerseyInvocation.java:697)
at org.glassfish.jersey.client.JerseyInvocation.lambda$runInScope$3(JerseyInvocation.java:691)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.process(Errors.java:205)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:390)
at org.glassfish.jersey.client.JerseyInvocation.runInScope(JerseyInvocation.java:691)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:674)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:422)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:318)
at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.JerseyParamContextClient.lambda$getParamContexts$0(JerseyParamContextClient.java:51)
at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.AbstractJerseyClient.executeAction(AbstractJerseyClient.java:76)
at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.JerseyParamContextClient.getParamContexts(JerseyParamContextClient.java:49)
at org.apache.nifi.toolkit.cli.impl.command.nifi.params.ListParamContexts.doExecute(ListParamContexts.java:46)
at org.apache.nifi.toolkit.cli.impl.command.nifi.params.ListParamContexts.doExecute(ListParamContexts.java:31)
at org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand.doExecute(AbstractNiFiCommand.java:63)
... 6 more

 

 

I am not able to get any clue where going wrong..

Can someone please help me fix it.

 Thanks in advance.

0 REPLIES 0