Support Questions

Find answers, ask questions, and share your expertise

Failed to get clientConfig via API /clusters/{clusterName}/services/{serviceName}/clientConfig

avatar
Explorer

I upgraded Cloud Manager from 5.10.0 to 6.3.0, then i tried to run 'wget http://10.0.0.209:7180/api/v13/clusters/{clusterName}/services/{serviceName}/clientConfig', got a error 404. Checked the log file of cloudera-scm-server, got the following:

2020-09-15 04:11:57,977 INFO scm-web-16747:com.cloudera.api.ApiExceptionMapper: Exception caught in API invocation. Msg:Service 'yarn' not found in cluster 'platform-pod10-eason-cdh'.
java.util.NoSuchElementException: Service 'yarn' not found in cluster 'platform-pod10-eason-cdh'.
at com.cloudera.api.dao.impl.ManagerDaoBase.findService(ManagerDaoBase.java:484)
......

but I checked the services via accessing API /clusters/{clusterName}/services/{serviceName}, actually the service 'yarn' is in this cluster, ref:

[root@rhel76x64 ~]# curl http://<user>:<password>@10.0.0.209:7180/api/v13/clusters/platform-pod10-eason-cdh/services/yarn/
{
"healthChecks" : [ {
"name" : "YARN_JOBHISTORY_HEALTH",
"summary" : "GOOD",
"suppressed" : false
}, {
"name" : "YARN_NODE_MANAGERS_HEALTHY",
"summary" : "GOOD",
"suppressed" : false
}, {
"name" : "YARN_RESOURCEMANAGERS_HEALTH",
"summary" : "GOOD",
"suppressed" : false
}, {
"name" : "YARN_USAGE_AGGREGATION_HEALTH",
"summary" : "DISABLED",
"suppressed" : false
} ],
"maintenanceOwners" : [ ],
"name" : "yarn",
"type" : "YARN",
"clusterRef" : {
"clusterName" : "cluster"
},
"serviceUrl" : "http://ip-10-0-0-209.us-west-2.compute.internal:7180/cmf/serviceRedirect/yarn",
"roleInstancesUrl" : "http://ip-10-0-0-209.us-west-2.compute.internal:7180/cmf/serviceRedirect/yarn/instances",
"serviceState" : "STARTED",
"healthSummary" : "GOOD",
"configStalenessStatus" : "FRESH",
"clientConfigStalenessStatus" : "FRESH",
"maintenanceMode" : false,
"displayName" : "YARN (MR2 Included)",
"entityStatus" : "GOOD_HEALTH"

 

In addition, i can get clientConfig successfully by running 'wget http://10.0.0.209:7180/api/v13/clusters/{clusterName}/services/{serviceName}/clientConfig --user=xxx --password=xxx --auth-no-challenge', but base on the specification of API, this API does not require any authentication.

 

Does anyone have a clue about it? Thanks!

2 ACCEPTED SOLUTIONS

avatar
Moderator

Hello @iEason8 ,

 

you've got a good point. The main page for the doc (which I've cited earlier) says you need authentication for API calls for CM6 however, the section you've found says explicitly it does not require authentication.

 

So I've done some research in our records and found that the desired behaviour for CM6 is to enforce authentication for API calls (internal jira reference OPSAPS-44459) and that there is a bug in our doc (internal jira reference DOCS-4659) that explains "Doc wrongly suggests that clientConfig API call does not require any authentication" and this jira is unresolved at this moment.

 

Sorry for the inconvenience caused. You need to get authenticated to be able to use the API in CM6.

 

Kind regards:

Ferenc


Ferenc Erdelyi, Technical Solutions Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

View solution in original post

avatar
Moderator

Hi @iEason8 ,

 

you are welcome! Thank you for raising these questions and accepting the answer as a solution! Solved articles will surface better on search engines, hence other members with similar questions will find the answer easier.

 

Best regards:

Ferenc


Ferenc Erdelyi, Technical Solutions Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

View solution in original post

11 REPLIES 11

avatar
Explorer

@Bender ,

 

OK. Thanks for your clarification.

avatar
Moderator

Hi @iEason8 ,

 

you are welcome! Thank you for raising these questions and accepting the answer as a solution! Solved articles will surface better on search engines, hence other members with similar questions will find the answer easier.

 

Best regards:

Ferenc


Ferenc Erdelyi, Technical Solutions Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community: