Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

YARN Resource Manager API is failing post kerberization

avatar
New Contributor

Hi Team,

We have implemented Kerberos in our environment recently. We have python scripts which collects metrics from Cloudera Manager. So, we are modifying these scripts post kerberization, all the scripts except YARN scripts are working fine after making changes. With YARN we are getting connection refused error. Can somebody please suggest what additional parameter should be included in case of YARN 

=================================

The script to collect metrics contains :

              print(rm_host_list)
active_rm=getActiveRM(rm_host_list)
                        print(active_rm)
rm_host_list is giving correct output but the next line is failing
================================


def getActiveRM(rmHostList):
       active_rm=None
       if len(rmHostList)==2:

             if ResourceManager(rmHostList[0],timeout=10).cluster_information().data['clusterInfo'].     ['haState']=='ACTIVE':
                     active_rm=ResourceManager(rmHostList[0],timeout=600)
             elif ResourceManager(rmHostList[1],timeout=10).cluster_information().data['clusterInfo']['haState']=='ACTIVE':
                    active_rm=ResourceManager(rmHostList[1],timeout=600)
             else:
                    active_rm=None
           else:
                if ResourceManager(rmHostList[0],timeout=10).cluster_information().data['clusterInfo']['haState']=='ACTIVE':
                       active_rm=ResourceManager(rmHostList[0],timeout=600)
               else:
                       active_rm=None
return active_rm

===================================

 

Regards,

Tejaswi

2 REPLIES 2

avatar
Master Collaborator

Hi @Tejaswi2503 

From the description, I understand that you build some Python scripts to fetch yarn metrics.

and it is failing with connection refused.

 

Can you make sure the url  which you're passing in the script is correct?

 

avatar
Community Manager

@Tejaswi2503, Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.  If you are still experiencing the issue, can you provide the information @Scharan has requested?



Regards,

Vidya Sargur,
Community 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: