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.

Install Navigator Metadata Server using Python CM API

Install Navigator Metadata Server using Python CM API

Explorer

Hi

 

I am trying to add roles for Management Service. I could add all the roles, except Navigator Metadata Server. I get "NullPointerException" as my code touches the create_role for Navigator Metadata Server.

cm_api.api_client.ApiException: <ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat"><ns1:faultstring xmlns:ns1="http://cxf.apache.org/bindings/xformat">java.lang.RuntimeException: java.lang.NullPointerException</ns1:faultstring></ns1:XMLFault> (error 500)

 

My code is as follows:

 

mgmt = ApiResource(<my_configs_here>).get_cloudera_manager().create_mgmt_service(<my_configs_here>)
mgmt.create_role(navms_role_name + '-1', navms_role_type, cm_host_name)

Any help or pointers would be appreciated.

6 REPLIES 6

Re: Install Navigator Metadata Server using Python CM API

Hi Harman,

Did you install a license? This role requires a license to install. That may be the issue.

You can also turn on API debug logging and/or check the CM server log for more information.

Thanks,
Darren

Re: Install Navigator Metadata Server using Python CM API

Explorer

Hey Darren,

 

I started the CM with a trial license, and I was able to install Navigator Auditor as well, but not just Navigator Metadata Server.

 

As you suggested, I will try a re-install and check the logs and then come back.

Sorry for a dumb question, but how can I change the logging level for the API ?

 

Thanks for the pointers.

 

Cheers,

Harman

Re: Install Navigator Metadata Server using Python CM API

The CM server log (in /var/log/cloudera-scm-server/) may have a stack trace for this error which can help us diagnose what is going on, even if you don't re-install everything.

There's a Cloudera Manager configuration to enable API debug logging. Look at the top of the screen for Administration -> Settings, then use the left search box and search for API, and enable the option "Enable Debugging of API". Once this is checked, new API requests will log a message to the CM server log.

Thanks,
Darren

Re: Install Navigator Metadata Server using Python CM API

Explorer

Hey Darren,

 

Thanks a lot for all your help and patience. Also, is there a way out to enable debugging and change web port using API ?

 

Logs from my server are:

 

 Body:
{"items": [{"type": "NAVIGATORMETADATASERVER", "name": "NAVIGATORMETADATASERVER-1", "hostRef": {"hostId": "my-host-name"}}]}
2015-04-23 04:56:37,280 WARN 1161865304@scm-web-140:com.cloudera.cmf.persist.ReadOnlyDatabaseTaskCallable: Error while executing read only database task
java.lang.NullPointerException

 

2015-04-23 04:56:37,282 WARN 1161865304@scm-web-140:org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://api.cloudera.com/}ApiRootResourceImpl has thrown exception, unwinding now
java.lang.RuntimeException: java.lang.NullPointerException

 

Caused by: java.lang.NullPointerException

 

Thanks,

Harman

Re: Install Navigator Metadata Server using Python CM API

Explorer

Hey Darren,

 

Did you get a chance to look at the error from CM Server logs ?

 

Thanks,

Harman

 

Highlighted

Re: Install Navigator Metadata Server using Python CM API

New Contributor

I'm having this same issue when installing using Cloudera Manager API. Were you able to install Navigator Metadata Server role using API?