Reply
Explorer
Posts: 17
Registered: ‎11-03-2016

Not able to add Sentry service - command line

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 ***

 

 

 

 

 

 

Posts: 62
Topics: 0
Kudos: 14
Blog Posts: 0
Ideas: 0
Solutions: 6
Registered: ‎11-26-2015

Re: Not able to add Sentry service - command line

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';

Explorer
Posts: 17
Registered: ‎11-03-2016

Re: Not able to add Sentry service - command line

Hi Guys,

 

Thank you very much for the answers. Appreciate it.

 

Cheers

Nagaraj C