2013-01-01 25 views
2

((1))面臨的問題,同時啓動蜂巢服務器和蜂巢網絡接口

我提示以下錯誤:在啓動節儉服務器:

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. 

,當我跑netstat的10000端口已經在使用..

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

如何解決這個問題?

((2))

當啓動蜂巢網絡界面獲得以下錯誤

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 [email protected]: 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) 

請幫助。

在此先感謝!

+0

試試'netstat -nl | grep 9999'來檢查哪個進程使用'9999'是默認hwi端口的端口。 – pensz

+0

更改默認地址並嘗試再次運行。 – Amol

回答

3

你的端口地址似乎是由其他程序使用,你可以按照以下提到的步驟: -

((1))使用其他端口地址

hive --service hiveserver -p 10001 & 

(啓動蜂巢服務器(2 ))

一個]創建就把以下在它

<?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> 
線蜂房site.xml文件如果$ HIVE_HOME/conf文件夾 b不存在]

C]開始蜂巢web界面

hive --service hwi 

d]瀏覽本地主機:9998/HWI/

1

我在這裏所面臨同樣的問題是設置我

1)溶液端口NUMER

  export HIVE_PORT=10000 

2)檢查哪些服務正在監聽

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

3)如果有相關的10000端口進程殺掉它

 kill -9 pid 

4)啓動蜂巢服務器

  $HIVE_HOME/bin --service hiveserver 

如果它不能正常工作轉到步驟2然後重新啓動服務器

0

停止配置單元;

在蜂房-site.xml中添加以下性質

1)hive.hwi.listen.host =宿主

2)hive.hwi.listen.port = 9999

3) hive.hwi.war.file = /lib/hive-common-0.12.0.2.0.6.1-102。罐子{這臺路徑HWI戰爭文件,相對於$ HIVE_HOME}

開始蜂巢再次

開始HWI配置單元的服務器上使用命令

nohup的蜂巢--service HWI &

現在,您可以訪問HWI爲主機:如果這種問題出現的運行9999/HWI

0

$ bin/metatool -listFSRoot 

如果運行出錯,則嘗試運行metastore,然後檢查配置單元是否可以從表中獲取記錄。

0

通常會出現此問題。 要麼您正在更改主機名,以便用戶在Metastore中創建的任何內容仍舊引用舊的Metastore主機名。

案例-1要麼metastore不起來,其中引發上述錯誤,所以運行bin/metatool -listFSRoot如果它運行沒有錯誤,那麼你可以安全地連接配置單元。

,但仍然不解決問題的情況下-2

案例2什麼都在蜂巢創建的表仍指向這是指向舊主機名老hiveuser所以ü不能featch從記錄蜂巢表。

解決方案: - 使用舊主機名恢復所有文件中的主機名,然後依次運行hadoop和hive堆棧。

除此之外,如果任何人有其他解決方案,請share.This我解決在我的生產箱。