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.

Not able to add Sentry service - command line

Not able to add Sentry service - command line

Explorer

Hi Team,

 

I'm using CDH 5.7.X and trying to start the sentry service from command line. The similar error is display in case of postgress SQL as well.  It display the below error. Any response would be highly appreciated.  Many thanks in advance.

 

Cheers

Chinumari

 

[root@cemhadoopactive01sl1al ~]# cat /root/sentry-site.xml.mysql
<configuration>
<property>
<name>sentry.store.jdbc.url</name>
<value> jdbc:mysql://cemhadoopactive01sl1al:3306</value>
<description>JDBC connection URL for the backed DB</description>
</property>
<property>
<name>sentry.store.jdbc.user</name>
<value>sentry</value>
<description>Userid for connecting to backend db </description>
</property>
<property>
<name>sentry.store.jdbc.password</name>
<value>password</value>
<description>Sentry password for backend JDBC user </description>
</property>
<property>
<name>sentry.store.jdbc.driver</name>
<value>com.mysql.jdbc.Driver</value>
<description>Backend JDBC driver - org.apache.derby.jdbc.EmbeddedDriver (only when dbtype = derby) JDBC Driver class for the backed DB</description>
</property>
</configuration>

 

 

[root@cemhadoopactive01sl1al ~]# sentry --command schema-tool --conffile /root/sentry-site.xml.mysql --dbType mysql --initSchema
Sentry store connection URL: jdbc:mysql://cemhadoopactive01sl1al:3306
Sentry store Connection Driver : com.mysql.jdbc.Driver
Sentry store connection User: sentry
org.apache.sentry.SentryUserException: Failed to make connection to Sentry store.
*** Sentry schemaTool failed ***

 

 

 

 

 

 

2 REPLIES 2

Re: Not able to add Sentry service - command line

Rising Star

Hello,

 

Please check Sentry DB permissions and set them according to docs:

 

http://www.cloudera.com/documentation/enterprise/5-7-x/topics/cm_ig_mysql.html

 

Example:

 

create database sentry DEFAULT CHARACTER SET utf8;
grant all on sentry.* TO 'sentry'@'%' IDENTIFIED BY 'password';

Highlighted

Re: Not able to add Sentry service - command line

Explorer

Hi Guys,

 

Thank you very much for the answers. Appreciate it.

 

Cheers

Nagaraj C