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.

hbase REST does not work

hbase REST does not work

New Contributor

I'm new to hbase and I want use REST interface. I've started (inside sandbox):

hbase-deamon.sh start rest --infoport 8085

and get response:

starting rest, logging to /var/log/hbase/hbase-root-rest-sandbox.hortonworks.com.out

But when I do GET request on 127.0.0.1:8085/, I get result (as I understand I shuld get database metadata):

<!--
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<meta HTTP-EQUIV="REFRESH" content="0;url=/rest.jsp"/>

If I try to do any other request (to create table for example) I allways get just:

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
        <title>Error 404 NOT_FOUND</title>
    </head>
    <body>
        <h2>HTTP ERROR 404</h2>
        <p>Problem accessing /iemployee. Reason:
            <pre>    NOT_FOUND</pre>
        </p>
        <hr />
        <i>
            <small>Powered by Jetty://</small>
        </i>

Thanks for help.

4 REPLIES 4
Highlighted

Re: hbase REST does not work

Guru

You are passing infoport 8085 as an argument. Infoport is the HTTP endpoint for human consumption (shows the status of the rest server). You can pass --port instead which is the REST HTTP endpoint port.

Highlighted

Re: hbase REST does not work

Hi @matej golob, the default HBase REST API port is 8080. So, if you tried to start it on the machine running Ambari it had failed. As Artem said, set another port, for example, "--port 8088" and retry. Also check the log file given in the output, both .out and .log files, for more details. Note that you can also set ports in Ambari-->Hbase-->Custom HBase site, as hbase.rest.port, and hbase.rest.info.port. If you do so, you can start REST API using just "hbase-deamon.sh start rest"

Highlighted

Re: hbase REST does not work

Mentor

You mean Enis.

Highlighted

Re: hbase REST does not work

New Contributor

Thanks. It works now.

Don't have an account?
Coming from Hortonworks? Activate your account here