nCLI is throwing erro while connecting to Prism Central | Nutanix Community
Skip to main content

Hi Team

I am trying to execute some NCLI command to interact with my Cluster. I have download the nCLI artifacts from my Prism Central web UI. Followed the steps to install it on Windows machine as mentioned here https://portal.nutanix.com/page/documents/details?targetId=Command-Ref-AOS-v6_6:man-ncli-session-local-initiate-t.html

But when I am trying to connect, I am getting the below error.

PS C:\Users\maharanaak> ncli -s 10.108.60.35 -u admin -p -j
User Name: admin
Enter Password:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1 column 5
Cannot invoke "java.util.Map.get(Object)" because "messageBody" is null 

I have tried with both CVM IP and Prism Central IP and in both cases got the same error.

Attaching the screenshots of installation related to java version, ncli version and the command execution here for reference.

Please help here.

@Kcmount  @JeroenTielen 

 

I never played with this. Let me dig into this. Hold my beer 😂


I found this due to a google search - I’m also seeing this same issue, but with RHEL9 and connecting to a newly built 6.8 cluster.  I’m currently trying to connect to PE instead of PC, for the moment.

$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.4 (Plow)

$ java -version
openjdk version "1.8.0_412"
OpenJDK Runtime Environment (build 1.8.0_412-b08)
OpenJDK 64-Bit Server VM (build 25.412-b08, mixed mode)
$ ./ncli --version

    ncli Version              : fraser-6.8.0.1-stable
    Changeset ID              : 5a8235
    Changeset Date            : 2024-05-17 18:26:46 +0000
$ ./ncli -s 10.xx.xx.xx -u 'builduser' -p
User Name: builduser
Enter Password:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1 column 5

I’m going to try a few things to work around this, and will update if I find anything.


has this been solved? I’m also facing the same issue and not able to solve the issue, below are my details of environement

OS: Ubuntu 22.04.2 LTS
NCLI Details: 

last-commit-date=2024-06-04 05:03:15 +0000

platform=el7.3

build-type=release

release-branch=fraser-6.5.6-stable

 

Java Details: 

openjdk version "1.8.0_422"

OpenJDK Runtime Environment (build 1.8.0_422-8u422-b05-1~22.04-b05)

OpenJDK 64-Bit Server VM (build 25.422-b05, mixed mode)

 

Error: com.google.gson.stream.MalformedJsonException: Expected EOF at line 1 column 5