Solved

Basic realm=\"Intent Gateway Login Required\"

  • 17 September 2018
  • 5 replies
  • 2484 views

Badge +3
Hello team,

Got following error when trying to get list of clusters using RestAPI request:

code:
{
"api_version": "3.0",
"code": 401,
"message_list": [
{
"details": "Basic realm=\"Intent Gateway Login Required\"",
"message": "Authentication required.",
"reason": "AUTHENTICATION_REQUIRED"
}
],
"state": "ERROR"
}



Rest API request is quite common, this is how it looks like using curl:

code:
curl -u ntnxadm@support.local -k -X POST --header "Content-Type: application/json" --header "Accept: application/json"  -d "{"kind":"cluster"}" "https://ahvcls.support.local:9440/api/nutanix/v3/clusters/list"



Strange thigs are:

  • Same request via Rest API explorer completed successfully. Same account used for Rest API explorer
  • When running it using curl from machine inside cluster network it always fail like this
  • Account is from same domain which is used by cluster for authentication. Authentication to cluster using domain accounts works just fine
  • Local admin account works just fine
Sadly I can't find more of this error anywhere on domain side. Has somebody faced with it before? Any chance I can find more of this error in NCC log bundle? Any help appreciated. Looks like something is not right with cluster or domain account. This is latest CE version.
icon

Best answer by rhunt 12 September 2019, 05:26

I was able to reproduce this using the same curl above. The easiest fix is to escape out the double quotes. The following body worked in curl for myself:


code:
 "{\"kind\": \"cluster\"}"
View original

5 replies

I have the exact same error, but I currently have no solution how to fix it.
Would another IPMI account make sense to be set up and used instead?
Userlevel 2
Badge +4
I was able to reproduce this using the same curl above. The easiest fix is to escape out the double quotes. The following body worked in curl for myself:


code:
 "{\"kind\": \"cluster\"}"
Badge +6

Who can address this issue.  I find this very frustrating as I figure this out every once in awhile and then spend an hour trying to address this.

 

This should just work. Period.

Userlevel 2
Badge +4

The body for the cluster list is just a standard formatted JSON body. I think this might work so you don’t have to escape out the quotes:

 

curl --request POST \
--url http://1.1.1.1/clusters/list \
--header 'content-type: application/json' \
--data '{"kind":"cluster"}'


Badge +6

I was showing my NTNX SE how it isn't working… I believe I replayed what I was doing and it works now.  I think how I am doing basic auth there isn't an issue with a cookie timing out… not sure what it going on… learning at warp. I appreciate the response.

 

Reply