Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

errors with cm.host_install

errors with cm.host_install

Explorer

hello,

 

I am running the Python CM API v10, the following command is giving errors in the cm agent log:

cm.host_install(host_username,host_list,private_key=id_rsa,cm_repo_url=cm_repo_url)

Errors:

[05/Jan/2016 11:38:47 +0000] 8987 MainThread throttling_logger WARNING  Command failure: ['sudo', '/usr/sbin/update-alternatives', '--admindir', '/var/lib/alternatives', '--altdir', '/etc/alternatives', '--display', 'libnssckbi.so.x86_64'], sudo: sorry, you must have a tty to run sudo

[05/Jan/2016 11:38:47 +0000] 8987 MainThread throttling_logger WARNING  Failed alternatives lookup: libnssckbi.so.x86_64
[05/Jan/2016 11:38:47 +0000] 8987 MainThread parcel       INFO     Ensuring alternatives entries are deactivated for parcel CDH-5.5.1-1.cdh5.5.1.p0.11.
[05/Jan/2016 11:38:47 +0000] 8987 MainThread parcel       INFO     Executing command ['/usr/lib64/cmf/service/common/alternatives.sh', 'deactivate', 'sqoop-import', '/usr/bin/sqoop-import', 'bin/sqoop-import', '10', 'False']
[05/Jan/2016 11:38:47 +0000] 8987 MainThread parcel       ERROR    Failed to deactivate alternatives for parcel CDH-5.5.1-1.cdh5.5.1.p0.11: 1
[05/Jan/2016 11:38:47 +0000] 8987 MainThread parcel       INFO     Executing command ['/usr/lib64/cmf/service/common/alternatives.sh', 'deactivate', 'solr-conf', '/etc/solr/conf', 'etc/solr/conf.dist', '10', 'True']

note: this is running on ec2 where i don't have root access, i am running the above commands from ipython.

 

any help  appreciated

 

thanks

2 REPLIES 2

Re: errors with cm.host_install

Explorer

this was caused by the redhat default setting in the sudoers file requiring a terminal for sudo - fixed by commenting out the following line:

Defaults    requiretty

Highlighted

Re: errors with cm.host_install

New Contributor

Thank you very much!!

 

I as struggling here... it has been so helpful!.. Thaks again...