2013-11-15 3 views
0

안녕하세요, 내 Java 프로그램에서 원격 시스템의 hbase에 연결하려고합니다. 하지만 연결이 거부되었습니다. 오류를보고 난 내 로컬 호스트 대신 원격 컴퓨터에 연결하려고 생각합니다.java 프로그램에서 원격 hbase에 연결할 수 없습니다.

내 구성은 내 포트 2181이 열려 있는지 확인하는 원격 시스템에서 lsof를 실행에

13/11/15 17:35:08 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect 
java.net.ConnectException: Connection refused: no further information 
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) 
    at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) 
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) 
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068) 
13/11/15 17:35:08 INFO zookeeper.ClientCnxn: Opening socket connection to server 127.0.0.1/127.0.0.1:2180. Will not attempt to authenticate using SASL (unknown error) 
13/11/15 17:35:08 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master 
13/11/15 17:35:08 INFO util.RetryCounter: The 1 times to retry after sleeping 2000 ms 

또한 다음과 같은 오류를 얻고있다

HBaseConfiguration conf = new HBaseConfiguration(); 
    conf.set("hbase.master", "10.219.47.22:60010"); 
    conf.set("hbase.zookeeper.quorum.", "10.219.47.22:60010"); 
    conf.set("hbase.zookeeper.property.clientPort", "2181"); 

'예요. 내가 가지고 다음에서 그 결과

java  18854   root 266u IPv6 6199707  0t0 TCP 127.0.0.1:47000->127.0.0.1:2181 (CLOSE_WAIT) 

답변

1

귀하의 사육사 쿼럼의 IP adderess 10.219.47.22:60010 또한 포트 (60010)가 은 또한 당신이 가진 것을 제거 지정 후 불필요한 . 쿼럼

conf.set("hbase.zookeeper.quorum", "10.219.47.22"); 
conf.set("hbase.zookeeper.property.clientPort", "2181"); 
1

60010 포트는 단지입니다 웹 UI는 연결하지 않습니다. 이 코드가 당신을 도울 수 있다면 확인 :

Configuration hbaseConfiguration = HBaseConfiguration.create(); 
hbaseConfiguration.addResource(new Path("hbase-site.xml"); 

및 HBase와-site.xml 파일에

는 마스터 노드에서 HBase를 설치 폴더의 당신의 conf 폴더에있는 것과 같은 속성을 추가 할 수 있습니다.

관련 문제