<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Unable to run NIFI CLI &amp;quot;nifi&amp;quot; subcommands, &amp;quot;registry&amp;quot; works fine in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/287347#M213000</link>
    <description>&lt;P&gt;I'm able to run cli.sh registry commands, but not cli.sh nifi commands for some reason. They're both secured and use the same props files (except for different baseurls) as defined in ~/.nifi-cli.config:&lt;/P&gt;
&lt;PRE&gt;$ cat ~/.nifi-cli.config 
nifi.reg.props=/appl/nifi-registry/nifi-registry-current/conf/cli-props
nifi.props=/appl/nifi/nifi-current/conf/cli-props&lt;/PRE&gt;
&lt;PRE&gt;$ ./bin/cli.sh registry list-buckets

#   Name             Id                                     Description   
-   --------------   ------------------------------------   -----------   
1   abc              87959437-dfbf-4fa2-9a4d-c0509afaff17   (empty)       
2   def              4864d2de-0af5-4a69-a584-d88c108b774f   (empty)       
3   ghi              20f8069e-60bb-437b-ac3a-f949ffa4582b   (empty) &lt;/PRE&gt;
&lt;P&gt;But nifi commands fail:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$ ./bin/cli.sh nifi current-user

ERROR: Error executing command 'current-user' : Error retrieving current&lt;/PRE&gt;
&lt;PRE&gt;$ ./bin/cli.sh nifi current-user -verbose

ERROR: Error executing command 'current-user' : Error retrieving current


org.apache.nifi.toolkit.cli.api.CommandException: Error executing command 'current-user' : Error retrieving current
	at org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand.doExecute(AbstractNiFiCommand.java:52)
	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:251)
	at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.processGroupCommand(CommandProcessor.java:232)
	at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.process(CommandProcessor.java:187)
	at org.apache.nifi.toolkit.cli.CLIMain.runSingleCommand(CLIMain.java:145)
	at org.apache.nifi.toolkit.cli.CLIMain.main(CLIMain.java:72)
Caused by: org.apache.nifi.toolkit.cli.impl.client.nifi.NiFiClientException: Error retrieving current
	at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.AbstractJerseyClient.executeAction(AbstractJerseyClient.java:85)
	at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.JerseyFlowClient.getCurrentUser(JerseyFlowClient.java:67)
	at org.apache.nifi.toolkit.cli.impl.command.nifi.flow.CurrentUser.doExecute(CurrentUser.java:48)
	at org.apache.nifi.toolkit.cli.impl.command.nifi.flow.CurrentUser.doExecute(CurrentUser.java:32)
	at org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand.doExecute(AbstractNiFiCommand.java:50)
	... 6 more
Caused by: javax.ws.rs.client.ResponseProcessingException: org.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException: MessageBodyReader not found for media type=text/html;charset=utf-8, type=class org.apache.nifi.web.api.entity.CurrentUserEntity, genericType=class org.apache.nifi.web.api.entity.CurrentUserEntity.
	at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:875)
	at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:767)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:229)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:414)
	at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:765)
	at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:428)
	at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:324)
	at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.JerseyFlowClient.lambda$getCurrentUser$0(JerseyFlowClient.java:69)
	at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.AbstractJerseyClient.executeAction(AbstractJerseyClient.java:71)
	... 10 more
Caused by: org.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException: MessageBodyReader not found for media type=text/html;charset=utf-8, type=class org.apache.nifi.web.api.entity.CurrentUserEntity, genericType=class org.apache.nifi.web.api.entity.CurrentUserEntity.
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:232)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:156)
	at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1091)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:874)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:808)
	at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:321)
	at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:870)
	... 20 more&lt;/PRE&gt;
&lt;P&gt;Does anyone have any idea what's going on? Happy to provide more debugging output.&lt;/P&gt;
&lt;P&gt;I'm running Nifi &lt;SPAN&gt;1.9.2 and Nifi-Registry 0.5.0.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jan 2020 14:32:53 GMT</pubDate>
    <dc:creator>JTT</dc:creator>
    <dc:date>2020-01-10T14:32:53Z</dc:date>
    <item>
      <title>Unable to run NIFI CLI "nifi" subcommands, "registry" works fine</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/287347#M213000</link>
      <description>&lt;P&gt;I'm able to run cli.sh registry commands, but not cli.sh nifi commands for some reason. They're both secured and use the same props files (except for different baseurls) as defined in ~/.nifi-cli.config:&lt;/P&gt;
&lt;PRE&gt;$ cat ~/.nifi-cli.config 
nifi.reg.props=/appl/nifi-registry/nifi-registry-current/conf/cli-props
nifi.props=/appl/nifi/nifi-current/conf/cli-props&lt;/PRE&gt;
&lt;PRE&gt;$ ./bin/cli.sh registry list-buckets

#   Name             Id                                     Description   
-   --------------   ------------------------------------   -----------   
1   abc              87959437-dfbf-4fa2-9a4d-c0509afaff17   (empty)       
2   def              4864d2de-0af5-4a69-a584-d88c108b774f   (empty)       
3   ghi              20f8069e-60bb-437b-ac3a-f949ffa4582b   (empty) &lt;/PRE&gt;
&lt;P&gt;But nifi commands fail:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$ ./bin/cli.sh nifi current-user

ERROR: Error executing command 'current-user' : Error retrieving current&lt;/PRE&gt;
&lt;PRE&gt;$ ./bin/cli.sh nifi current-user -verbose

ERROR: Error executing command 'current-user' : Error retrieving current


org.apache.nifi.toolkit.cli.api.CommandException: Error executing command 'current-user' : Error retrieving current
	at org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand.doExecute(AbstractNiFiCommand.java:52)
	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:251)
	at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.processGroupCommand(CommandProcessor.java:232)
	at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.process(CommandProcessor.java:187)
	at org.apache.nifi.toolkit.cli.CLIMain.runSingleCommand(CLIMain.java:145)
	at org.apache.nifi.toolkit.cli.CLIMain.main(CLIMain.java:72)
Caused by: org.apache.nifi.toolkit.cli.impl.client.nifi.NiFiClientException: Error retrieving current
	at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.AbstractJerseyClient.executeAction(AbstractJerseyClient.java:85)
	at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.JerseyFlowClient.getCurrentUser(JerseyFlowClient.java:67)
	at org.apache.nifi.toolkit.cli.impl.command.nifi.flow.CurrentUser.doExecute(CurrentUser.java:48)
	at org.apache.nifi.toolkit.cli.impl.command.nifi.flow.CurrentUser.doExecute(CurrentUser.java:32)
	at org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand.doExecute(AbstractNiFiCommand.java:50)
	... 6 more
Caused by: javax.ws.rs.client.ResponseProcessingException: org.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException: MessageBodyReader not found for media type=text/html;charset=utf-8, type=class org.apache.nifi.web.api.entity.CurrentUserEntity, genericType=class org.apache.nifi.web.api.entity.CurrentUserEntity.
	at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:875)
	at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:767)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:229)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:414)
	at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:765)
	at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:428)
	at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:324)
	at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.JerseyFlowClient.lambda$getCurrentUser$0(JerseyFlowClient.java:69)
	at org.apache.nifi.toolkit.cli.impl.client.nifi.impl.AbstractJerseyClient.executeAction(AbstractJerseyClient.java:71)
	... 10 more
Caused by: org.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException: MessageBodyReader not found for media type=text/html;charset=utf-8, type=class org.apache.nifi.web.api.entity.CurrentUserEntity, genericType=class org.apache.nifi.web.api.entity.CurrentUserEntity.
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:232)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:156)
	at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1091)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:874)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:808)
	at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:321)
	at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:870)
	... 20 more&lt;/PRE&gt;
&lt;P&gt;Does anyone have any idea what's going on? Happy to provide more debugging output.&lt;/P&gt;
&lt;P&gt;I'm running Nifi &lt;SPAN&gt;1.9.2 and Nifi-Registry 0.5.0.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 14:32:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/287347#M213000</guid>
      <dc:creator>JTT</dc:creator>
      <dc:date>2020-01-10T14:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run NIFI CLI "nifi" subcommands, "registry" works fine</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/289333#M214183</link>
      <description>&lt;P&gt;My bad, apparently. I found errors in logs that made it clear that this was a bad configuration.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 11:50:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/289333#M214183</guid>
      <dc:creator>JTT</dc:creator>
      <dc:date>2020-02-07T11:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run NIFI CLI "nifi" subcommands, "registry" works fine</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/289357#M214194</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/73111"&gt;@JTT&lt;/a&gt;&amp;nbsp;Can you provide some additional details on what what configured incorrectly and how you corrected it? It may be useful to others who face a similar issue in the future.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 16:02:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/289357#M214194</guid>
      <dc:creator>cjervis</dc:creator>
      <dc:date>2020-02-07T16:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run NIFI CLI "nifi" subcommands, "registry" works fine</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/289373#M214205</link>
      <description>&lt;P&gt;Yeah, my bad, I didn't want to break it again after fixing it, but I can see there'd be value in documenting this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case, I saw the following error popping up in my `nifi-app.log` when trying to run bin/cli.sh nifi current-user:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;WARN [NiFi Web Server-363] o.a.nifi.web.server.HostHeaderHandler Request host header [example.com] different from web hostname [127.0.0.1(:8444)]. Overriding to [127.0.0.1:8444/nifi-api/flow/current-user]&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what I did was add example.com to the nifi.web.proxy.host config, which fixed the issue for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be really helpful if the error message in that case would state the error more clearly. The current error looks like the CLI isn't handling the response correctly, although it's actually a server error. So I guess the CLI is in fact not handling the response properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Unrelated: It'd be nice to be able to insert &amp;lt;code&amp;gt; tags to make this more readable. They're currently being stripped when you press "Post")&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 17:58:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/289373#M214205</guid>
      <dc:creator>JTT</dc:creator>
      <dc:date>2020-02-07T17:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run NIFI CLI "nifi" subcommands, "registry" works fine</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/289386#M214212</link>
      <description>&lt;P&gt;Thanks for sharing&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/73111"&gt;@JTT&lt;/a&gt;.&amp;nbsp;As for entering code, you do have the option to add a code sample in the post editor.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-02-07 at 4.55.10 PM.png" style="width: 891px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26300i4C6B3DD95CECCE8B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-02-07 at 4.55.10 PM.png" alt="Screen Shot 2020-02-07 at 4.55.10 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will open a pop-up to enter the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-02-07 at 4.57.09 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26301i77086D57B4BC1BF5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2020-02-07 at 4.57.09 PM.png" alt="Screen Shot 2020-02-07 at 4.57.09 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final result looks like this ( I anonymized the IP addresses):&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;WARN [NiFi Web Server-363] o.a.nifi.web.server.HostHeaderHandler Request host header [example.com] different from web hostname [xxx.x.x.x(:xxxx)]. Overriding to [xxx.x.x.x:xxxx/nifi-api/flow/current-user]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While you cannot use this to format words in a sentence, it is helpful for large samples. I hope it helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 22:03:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-run-NIFI-CLI-quot-nifi-quot-subcommands-quot/m-p/289386#M214212</guid>
      <dc:creator>cjervis</dc:creator>
      <dc:date>2020-02-07T22:03:49Z</dc:date>
    </item>
  </channel>
</rss>

