Support Questions

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

Principal not defined in configuration while starting the rest server

avatar

i was following this doc

http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_command-line-installation/content/ref-9e8...

configured some of the property in custom-hbase-site.xml

8790-screen-shot-2016-10-22-at-65355-pm.png

but still i am getting same error after starting hbase rest server

2016-10-22 13:19:24,423 WARN  [main] mortbay.log: Error starting handlersjavax.servlet.ServletException: javax.servlet.ServletException: Principal not defined in configuration        at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.init(KerberosAuthenticationHandler.java:241)        at org.apache.hadoop.security.authentication.server.AuthenticationFilter.initializeAuthHandler(AuthenticationFilter.java:247)        at org.apache.hadoop.security.authentication.server.AuthenticationFilter.init(AuthenticationFilter.java:233)        at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)        at org.mortbay.jetty.Server.doStart(Server.java:224)        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)        at org.apache.hadoop.hbase.rest.RESTServer.main(RESTServer.java:310)Caused by: javax.servlet.ServletException: Principal not defined in configuration        at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.init(KerberosAuthenticationHandler.java:186)        ... 12 more2016-10-22 13:19:24,426 WARN  [main] mortbay.log: Nested in javax.servlet.ServletException: javax.servlet.ServletException: Principal not defined in configuration:javax.servlet.ServletException: Principal not defined in configuration        at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.init(KerberosAuthenticationHandler.java:186)        at org.apache.hadoop.security.authentication.server.AuthenticationFilter.initializeAuthHandler(AuthenticationFilter.java:247)        at org.apache.hadoop.security.authentication.server.AuthenticationFilter.init(AuthenticationFilter.java:233)        at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)        at org.mortbay.jetty.Server.doStart(Server.java:224)        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)        at org.apache.hadoop.hbase.rest.RESTServer.main(RESTServer.java:310)2016-10-22 13:19:24,469 INFO  [main] mortbay.log: Started SslSelectChannelConnector@0.0.0.0:17000

note this is a ssl enabled and secure cluster , please let me know if i have missed something , thanks in advance.


screen-shot-2016-10-22-at-65355-pm.png
1 ACCEPTED SOLUTION

avatar

@Deepak Sharma I guess you are using the service principals in your configuration. Can you try using spnego principal and keytabs as mentioned below..

<property>
     <name>hbase.rest.authentication</name>
     <value>kerberos</value>
     <description^>Enter the authentication method for the REST server.</description>
</property>
                        
<property>
     <name>hbase.rest.kerberos.spnego.principal</name>
     <value>HTTP/_HOST@EXAMPLE.COM</value>
     <description>Enter the hostname of the principal.</description>
</property>
                        
<property>
     <name>hbase.rest.keytab.file</name>
     <value>/etc/security/keytabs/spnego.service.keytab</value>
     <description>Enter the location of the keytab.</description>
</property>

View solution in original post

5 REPLIES 5

avatar

@Deepak Sharma I guess you are using the service principals in your configuration. Can you try using spnego principal and keytabs as mentioned below..

<property>
     <name>hbase.rest.authentication</name>
     <value>kerberos</value>
     <description^>Enter the authentication method for the REST server.</description>
</property>
                        
<property>
     <name>hbase.rest.kerberos.spnego.principal</name>
     <value>HTTP/_HOST@EXAMPLE.COM</value>
     <description>Enter the hostname of the principal.</description>
</property>
                        
<property>
     <name>hbase.rest.keytab.file</name>
     <value>/etc/security/keytabs/spnego.service.keytab</value>
     <description>Enter the location of the keytab.</description>
</property>

avatar

@Ayub Khan thank you for your answer but even after using spnego keytab i face same issue 😞

avatar
@Deepak Sharma

Looking at the kerberosAuthenticationHandler code(at line number 183), seems like your configuration has missing properties. Please add below props and let me know if it works..

<property>
  <name>hbase.rest.authentication.kerberos.principal</name>
  <value>HTTP/_HOST@HADOOP.LOCALDOMAIN</value>
</property>
<property>
  <name>hbase.rest.authentication.kerberos.keytab</name>
  <value>$KEYTAB</value>
</property>

For more information, please refer to https://hbase.apache.org/book.html#security.example.config.

avatar

I have verified by adding above missing properties, hbase startup is successful and things look good. Please try and confirm.

8801-hbase-rest-missing-props.png

avatar

Thank you ayub 🙂 this error resolved after add these properties , now i am seeing other error that seems some thing related to SSL