srinivas raj
srinivas raj

Reputation: 21

facing issue while starting hive server and hive web interface

((1))

I'm getting the below error while starting thrift server:

hive --service hiveserver

Starting Hive Thrift Server
org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.

when I ran netstat port 10000 was already in use..

$ netstat -nl | grep 10000
tcp6       0      0 :::10000                :::*                    LISTEN 

How do I resolve this?

((2))

While starting hive web interface getting below error

hive --service hwi

$ hive --service  hwi
13/01/01 22:05:36 INFO hwi.HWIServer: HWI is starting up
13/01/01 22:05:37 INFO mortbay.log: Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
13/01/01 22:05:37 INFO mortbay.log: jetty-6.1.26
13/01/01 22:05:37 INFO mortbay.log: Extract /opt/hive/lib/hive-hwi-0.9.0.jar to /tmp/Jetty_127_0_0_1_3606_hive.hwi.0.9.0.jar__hwi__.6ogsv5/webapp
13/01/01 22:05:37 WARN mortbay.log: failed [email protected]:3606: java.net.BindException: Address already in use
13/01/01 22:05:37 WARN mortbay.log: failed Jetty20SShims$Server@21e554: java.net.BindException: Address already in use
Exception in thread "main" java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method)

Please help.

Thanks in advance!!

Upvotes: 2

Views: 17797

Answers (5)

amitav Swain
amitav Swain

Reputation: 1

If this kind of issue arises run

$ bin/metatool -listFSRoot 

If it runs with out error then try to run the metastore and then check the hive can fetch the record from a table or not.

Upvotes: 0

amitav Swain
amitav Swain

Reputation: 1

normally this issue arises . Either you are changing the hostname so that what ever the user u have created in the metastore it still refering to the old metastore hostname.

Case -1 either metastore is not up which throws the above error so run the bin/metatool -listFSRoot if it ran without error then u r able to connect hive safly.

but still issue is not resolved case -2

Case-2 what ever the table created in the hive still points to the old hiveuser which was pointing to the old host name so u cant featch the record from the hive table .

Solution :- revert the host name in all the file with old host name and then run the hadoop and hive stack one after other.

Apart from this if any one has other solution please share.This I resolved in my production box.

Upvotes: 0

minhas23
minhas23

Reputation: 9671

Stop Hive;

Add the following properties in hive-site.xml

1) hive.hwi.listen.host = host

2) hive.hwi.listen.port = 9999

3) hive.hwi.war.file = /lib/hive-common-0.12.0.2.0.6.1-102.jar {This sets the path to the HWI war file, relative to $HIVE_HOME}

Start Hive again

Start HWI on Hive server with the command

nohup hive --service hwi &

Now, you can access HWI as host:9999/hwi

Upvotes: 0

nadia
nadia

Reputation: 43

I faced same problem here is the solution I got

1)set port numer

           export HIVE_PORT=10000

2) Check which services is listening

     sudo lsof -i -P | grep -i "listen"

3)if there is process relevant to port 10000 kill it

     kill -9 pid

4) Start hive server

         $HIVE_HOME/bin --service hiveserver

If it not work go to step 2 and start server again

Upvotes: 1

deepakmodak
deepakmodak

Reputation: 1339

Your port address seems to be used by some other program, you may follow below mentioned steps :-

((1)) Start hive server using another port address

    hive --service hiveserver -p 10001 &

((2))

a] create hive-site.xml file if not present in $HIVE_HOME/conf folder b] put following lines in it

   <?xml version="1.0"?>
   <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
   <configuration>
   <property>
    <name>hive.hwi.listen.host</name>
    <value>localhost</value>
   </property>
   <property>
    <name>hive.hwi.listen.port</name>
    <value>9998</value>
   </property>
   <property>
    <name>hive.hwi.war.file</name>
    <value>lib/hive-hwi-0.10.0.war</value>
    <description>This sets the path to the HWI war file, relative to ${HIVE_HOME}. </description>
   </property>
   </configuration>

c] start hive web interface

    hive --service hwi

d] browse localhost:9998/hwi/

Upvotes: 3

Related Questions