Taiwan Hadoop Forum

台灣 Hadoop 技術討論區
現在的時間是 2022-07-02, 14:12

所有顯示的時間為 UTC + 8 小時




發表新文章 回覆主題  [ 5 篇文章 ] 
發表人 內容
 文章主題 : 執行 java檔 zookeeper的錯誤訊息
文章發表於 : 2013-10-21, 20:25 
離線

註冊時間: 2013-10-21, 20:17
文章: 12
我是用: hadoop-0.20.2 版本
hbase-0.90.4 版本
jps
在master端成功出現:
16704 HMaster
16202 NameNode
16345 SecondaryNameNode
17990 Jps
16425 JobTracker

在slave端出現:
1082 TaskTracker
1291 HRegionServer
1206 HQuorumPeer
2576 Jps
997 DataNode

執行java程式的時候出現的錯誤訊息
代碼:
java -cp .:org.apache.commons.logging.jar:hbase-0.90.4.jar:hadoop-0.20.2-core.jar:hbase-0.90.4-test.jar:hadoop-0.20.2-test.jar:hadoop-0.20.2-tools:hadoop-0.20.2-examples.jar:hadoop-0.20.2-ant.jar:zookeeper-3.3.2.jar:./lib/log4j-1.2.16.jar Test

有人知道此錯誤訊息該如何修正嗎

困擾很久了 請問各位前輩 萬分感謝


代碼:
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.3.2-1031432, built on 11/05/2010 05:32 GMT
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:host.name=master
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:java.version=1.6.0_37
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc.
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:java.home=/usr/java/jdk1.6.0_37/jre
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:java.class.path=.:org.apache.commons.logging.jar:hbase-0.90.4.jar:hadoop-0.20.2-core.jar:hbase-0.90.4-test.jar:hadoop-0.20.2-test.jar:hadoop-0.20.2-tools:hadoop-0.20.2-examples.jar:hadoop-0.20.2-ant.jar:zookeeper-3.3.2.jar:./lib/log4j-1.2.16.jar
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/java/jdk1.6.0_37/jre/lib/amd64/server:/usr/java/jdk1.6.0_37/jre/lib/amd64:/usr/java/jdk1.6.0_37/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:os.version=3.5.0-17-generic
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:user.name=wen
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:user.home=/home/wen
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Client environment:user.dir=/home/wen/桌面/put_data
13/10/21 20:01:14 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
13/10/21 20:01:14 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
13/10/21 20:01:14 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
   at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
   at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
13/10/21 20:01:16 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
13/10/21 20:01:16 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
   at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
   at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
13/10/21 20:01:17 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
13/10/21 20:01:17 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
   at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
   at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
13/10/21 20:01:18 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
13/10/21 20:01:18 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
   at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
   at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
13/10/21 20:01:20 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
13/10/21 20:01:20 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
   at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
   at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
13/10/21 20:01:22 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
13/10/21 20:01:22 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
   at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
   at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
13/10/21 20:01:23 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
13/10/21 20:01:23 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
   at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
   at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
13/10/21 20:01:26 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
13/10/21 20:01:26 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
   at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
   at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
13/10/21 20:01:28 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
13/10/21 20:01:28 INFO zookeeper.ZooKeeper: Session: 0x0 closed
Exception in thread "main" org.apache.hadoop.hbase.ZooKeeperConnectionException: HBase is able to connect to ZooKeeper but the connection closes immediately. This could be a sign that the server has too many connections (30 is the default). Consider inspecting your ZK server logs for that error and then make sure you are reusing HBaseConfiguration as often as you can. See HTable's javadoc for more information.
   at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<init>(ZooKeeperWatcher.java:155)
   at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getZooKeeperWatcher(HConnectionManager.java:1002)
   at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:304)
   at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:295)
   at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:157)
   at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:90)
   at Test.createHBaseTable(Test.java:24)
   at Test.main(Test.java:172)
Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
   at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
   at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
   at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:809)
   at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:837)
   at org.apache.hadoop.hbase.zookeeper.ZKUtil.createAndFailSilent(ZKUtil.java:903)
   at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<init>(ZooKeeperWatcher.java:133)
   ... 7 more
13/10/21 20:01:28 INFO zookeeper.ClientCnxn: EventThread shut down


回頂端
 個人資料 E-mail  
 
 文章主題 : Re: 執行 java檔 zookeeper的錯誤訊息
文章發表於 : 2013-10-24, 23:05 
離線

註冊時間: 2009-11-09, 19:52
文章: 2897
錯誤訊息與連不上 localhost/127.0.0.1:2181 有關。
可以請您先下 netstat -na | grep 2181 ,並回覆結果嘛?

- Jazz


回頂端
 個人資料 E-mail  
 
 文章主題 : Re: 執行 java檔 zookeeper的錯誤訊息
文章發表於 : 2013-11-01, 12:57 
離線

註冊時間: 2013-10-21, 20:17
文章: 12
Dear Jazz
輸入完指令後 結果如下:
tcp6 0 0 192.168.0.100:35196 192.168.0.105:2181 ESTABLISHED

謝謝jazz


回頂端
 個人資料 E-mail  
 
 文章主題 : Re: 執行 java檔 zookeeper的錯誤訊息
文章發表於 : 2013-11-02, 03:35 
離線

註冊時間: 2009-11-09, 19:52
文章: 2897
date1379 寫:
Dear Jazz
輸入完指令後 結果如下:
tcp6 0 0 192.168.0.100:35196 192.168.0.105:2181 ESTABLISHED
謝謝jazz


因為 binding 的 IP 跟 port 是 192.168.0.105:2181
而程式嘗試要連線的卻是 127.0.0.1:2181

代表設定檔有個地方忘記把 localhost 字眼改掉了。
試試看 grep localhost conf/*.xml 看看囉~
或者要麻煩您貼出所有 ZooKeeper 相關的設定檔。

- Jazz


回頂端
 個人資料 E-mail  
 
 文章主題 : Re: 執行 java檔 zookeeper的錯誤訊息
文章發表於 : 2013-12-16, 10:58 
離線

註冊時間: 2013-10-21, 20:17
文章: 12
jazz 大大:
目前我執行 這個檔案還是出現zookeeper 連線的錯誤@@

我是使用hbase內建的zookeeper來運行
每一台都是這樣設定的
1.
sudo vi /etc/hosts
192.168.0.100 localhost
192.168.0.100 master
192.168.0.101 slave1
192.168.0.102 slave2
192.168.0.103 slave3
192.168.0.104 slave4
192.168.0.105 slave5

2.
sudo vi/etc/hostname
master

3.
hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
</property>

<property>
<name>hbase.tmp.dir</name>
<value>/home/wen/LOG/hbase/hbase-wen</value>
</property>

<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>

<property>
<name>hbase.master.info.port</name>
<value>60010</value>
</property>

<property>
<name>hbase.master.port</name>
<value>60000</value>
</property>
<property>
<name>dfs.support.append</name>
<value>true</value>
</property>

<property>
<name>hbase.zookeeper.quorum</name>
<value>slave1,slave2,slave3,slave4,slave5</value>
</property>

</configuration>

錯誤訊息如下;
13/12/14 11:46:49 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
13/12/14 11:46:49 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

麻煩 jazz大大幫我看一下喔 謝謝您!


回頂端
 個人資料 E-mail  
 
顯示文章 :  排序  
發表新文章 回覆主題  [ 5 篇文章 ] 

所有顯示的時間為 UTC + 8 小時


誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 2 位訪客


不能 在這個版面發表主題
不能 在這個版面回覆主題
不能 在這個版面編輯您的文章
不能 在這個版面刪除您的文章
不能 在這個版面上傳附加檔案

搜尋:
前往 :  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
正體中文語系由 竹貓星球 維護製作