Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 10-22-2016 01:28 PM - edited 08-19-2019 12:48 AM
i was following this doc
configured some of the property in custom-hbase-site.xml
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 [email protected]:17000
note this is a ssl enabled and secure cluster , please let me know if i have missed something , thanks in advance.
Created 10-22-2016 02:10 PM
@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/[email protected]</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>
Created 10-22-2016 02:10 PM
@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/[email protected]</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>
Created 10-22-2016 02:12 PM
@Ayub Khan thank you for your answer but even after using spnego keytab i face same issue 😞
Created 10-22-2016 03:13 PM
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/[email protected]</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.
Created on 10-22-2016 04:15 PM - edited 08-19-2019 12:48 AM
I have verified by adding above missing properties, hbase startup is successful and things look good. Please try and confirm.
Created 10-23-2016 04:58 PM
Thank you ayub 🙂 this error resolved after add these properties , now i am seeing other error that seems some thing related to SSL