hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hzwangxx <whwangxingx...@163.com>
Subject connect error from mac
Date Thu, 09 Jan 2014 15:38:09 GMT
Hi, all
    I use java api to access hbase cluster from my mac book as follows:

	public static void main(String[] args) throws MasterNotRunningException, ZooKeeperConnectionException
{
        	Configuration config = HBaseConfiguration.create();
        	config.set("hbase.zookeeper.quorum",”node02");
        	config.set("hbase.zookeeper.property.clientPort","2181");
        	HBaseAdmin admin = new HBaseAdmin(config);
	}

run and paste error:

2014-01-09 22:42:30.870 java[3040:1903] Unable to load realm info from SCDynamicStore
14/01/09 22:42:30 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your
platform... using builtin-java classes where applicable
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.5-cdh4.2.1--1,
built on 04/22/2013 16:43 GMT
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:host.name=192.168.1.116
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:java.version=1.7.0_40
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:java.class.path=/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/JObjC.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Users/apple/IdeaProjects/hbase-manage/target/classes:/Users/apple/.m2/repository/org/apache/hbase/hbase/0.94.2-cdh4.2.1/hbase-0.94.2-cdh4.2.1.jar:/Users/apple/.m2/repository/com/yammer/metrics/metrics-core/2.1.2/metrics-core-2.1.2.jar:/Users/apple/.m2/repository/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.jar:/Users/apple/.m2/repository/com/google/guava/guava/11.0.2/guava-11.0.2.jar:/Users/apple/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/apple/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/Users/apple/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/Users/apple/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/Users/apple/.m2/repository/commons-lang/commons-lang/2.5/commons-lang-2.5.jar:/Users/apple/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/Users/apple/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/Users/apple/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/Users/apple/.m2/repository/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar:/Users/apple/.m2/repository/com/github/stephenc/high-scale-lib/high-scale-lib/1.1.1/high-scale-lib-1.1.1.jar:/Users/apple/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar:/Users/apple/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:/Users/apple/.m2/repository/commons-io/commons-io/2.1/commons-io-2.1.jar:/Users/apple/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/apple/.m2/repository/org/apache/zookeeper/zookeeper/3.4.5-cdh4.2.1/zookeeper-3.4.5-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/thrift/libthrift/0.9.0/libthrift-0.9.0.jar:/Users/apple/.m2/repository/org/apache/httpcomponents/httpclient/4.1.3/httpclient-4.1.3.jar:/Users/apple/.m2/repository/org/apache/httpcomponents/httpcore/4.1.3/httpcore-4.1.3.jar:/Users/apple/.m2/repository/org/jruby/jruby-complete/1.6.5/jruby-complete-1.6.5.jar:/Users/apple/.m2/repository/org/mortbay/jetty/jetty/6.1.26.cloudera.2/jetty-6.1.26.cloudera.2.jar:/Users/apple/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26.cloudera.2/jetty-util-6.1.26.cloudera.2.jar:/Users/apple/.m2/repository/org/mortbay/jetty/jsp-2.1/6.1.14/jsp-2.1-6.1.14.jar:/Users/apple/.m2/repository/org/eclipse/jdt/core/3.1.1/core-3.1.1.jar:/Users/apple/.m2/repository/org/mortbay/jetty/jsp-api-2.1/6.1.14/jsp-api-2.1-6.1.14.jar:/Users/apple/.m2/repository/org/mortbay/jetty/servlet-api-2.5/6.1.14/servlet-api-2.5-6.1.14.jar:/Users/apple/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.8.8/jackson-core-asl-1.8.8.jar:/Users/apple/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.8.8/jackson-mapper-asl-1.8.8.jar:/Users/apple/.m2/repository/org/codehaus/jackson/jackson-jaxrs/1.8.8/jackson-jaxrs-1.8.8.jar:/Users/apple/.m2/repository/org/codehaus/jackson/jackson-xc/1.8.8/jackson-xc-1.8.8.jar:/Users/apple/.m2/repository/org/slf4j/slf4j-log4j12/1.4.3/slf4j-log4j12-1.4.3.jar:/Users/apple/.m2/repository/tomcat/jasper-compiler/5.5.23/jasper-compiler-5.5.23.jar:/Users/apple/.m2/repository/tomcat/jasper-runtime/5.5.23/jasper-runtime-5.5.23.jar:/Users/apple/.m2/repository/commons-el/commons-el/1.0/commons-el-1.0.jar:/Users/apple/.m2/repository/org/jamon/jamon-runtime/2.3.1/jamon-runtime-2.3.1.jar:/Users/apple/.m2/repository/com/google/protobuf/protobuf-java/2.4.0a/protobuf-java-2.4.0a.jar:/Users/apple/.m2/repository/com/sun/jersey/jersey-core/1.8/jersey-core-1.8.jar:/Users/apple/.m2/repository/com/sun/jersey/jersey-json/1.8/jersey-json-1.8.jar:/Users/apple/.m2/repository/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar:/Users/apple/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar:/Users/apple/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-impl-2.2.3-1.jar:/Users/apple/.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar:/Users/apple/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/apple/.m2/repository/com/sun/jersey/jersey-server/1.8/jersey-server-1.8.jar:/Users/apple/.m2/repository/asm/asm/3.1/asm-3.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-core/2.0.0-mr1-cdh4.2.1/hadoop-core-2.0.0-mr1-cdh4.2.1.jar:/Users/apple/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar:/Users/apple/.m2/repository/commons-net/commons-net/3.1/commons-net-3.1.jar:/Users/apple/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar:/Users/apple/.m2/repository/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar:/Users/apple/.m2/repository/net/java/dev/jets3t/jets3t/0.6.1/jets3t-0.6.1.jar:/Users/apple/.m2/repository/hsqldb/hsqldb/1.8.0.10/hsqldb-1.8.0.10.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-client/2.0.0-cdh4.2.1/hadoop-client-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-common/2.0.0-cdh4.2.1/hadoop-common-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-annotations/2.0.0-cdh4.2.1/hadoop-annotations-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/commons/commons-math/2.1/commons-math-2.1.jar:/Users/apple/.m2/repository/org/mockito/mockito-all/1.8.5/mockito-all-1.8.5.jar:/Users/apple/.m2/repository/org/apache/avro/avro/1.7.3/avro-1.7.3.jar:/Users/apple/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar:/Users/apple/.m2/repository/org/xerial/snappy/snappy-java/1.0.4.1/snappy-java-1.0.4.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-auth/2.0.0-cdh4.2.1/hadoop-auth-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/com/jcraft/jsch/0.1.42/jsch-0.1.42.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-hdfs/2.0.0-cdh4.2.1/hadoop-hdfs-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-app/2.0.0-cdh4.2.1/hadoop-mapreduce-client-app-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-common/2.0.0-cdh4.2.1/hadoop-mapreduce-client-common-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-yarn-common/2.0.0-cdh4.2.1/hadoop-yarn-common-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-yarn-api/2.0.0-cdh4.2.1/hadoop-yarn-api-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/jboss/netty/netty/3.2.4.Final/netty-3.2.4.Final.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-yarn-client/2.0.0-cdh4.2.1/hadoop-yarn-client-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-core/2.0.0-cdh4.2.1/hadoop-mapreduce-client-core-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-yarn-server-common/2.0.0-cdh4.2.1/hadoop-yarn-server-common-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-shuffle/2.0.0-cdh4.2.1/hadoop-mapreduce-client-shuffle-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-jobclient/2.0.0-cdh4.2.1/hadoop-mapreduce-client-jobclient-2.0.0-cdh4.2.1.jar:/Users/apple/.m2/repository/net/sf/kosmosfs/kfs/0.3/kfs-0.3.jar:/Applications/IntelliJ_12.app/lib/idea_rt.jar
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/Users/apple/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/var/folders/wl/633vlc2n6hn7g9mhh174v4r80000gn/T/
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:os.name=Mac OS X
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:os.arch=x86_64
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:os.version=10.9
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:user.name=apple
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:user.home=/Users/apple
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Client environment:user.dir=/Users/apple/IdeaProjects/out/hbase-manage
14/01/09 22:42:31 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=node02:2181
sessionTimeout=180000 watcher=hconnection
14/01/09 22:42:31 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 3040@appletekiMacBook-Pro.local
14/01/09 22:42:31 INFO zookeeper.ClientCnxn: Opening socket connection to server node02/172.16.62.132:2181.
Will not attempt to authenticate using SASL (unknown error)
14/01/09 22:42:31 INFO zookeeper.ClientCnxn: Socket connection established to node02/172.16.62.132:2181,
initiating session
14/01/09 22:42:31 INFO zookeeper.ClientCnxn: Session establishment complete on server node02/172.16.62.132:2181,
sessionid = 0x143652715d4001a, negotiated timeout = 180000
14/01/09 22:42:31 WARN conf.Configuration: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.net.NetUtils.getInputStream(Ljava/net/Socket;)Ljava/io/InputStream;
	at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:463)
	at org.apache.hadoop.hbase.ipc.HBaseClient.getConnection(HBaseClient.java:1150)
	at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:1000)
	at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:150)
	at com.sun.proxy.$Proxy7.getProtocolVersion(Unknown Source)
	at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getProxy(WritableRpcEngine.java:183)
	at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:335)
	at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:312)
	at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:364)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:682)
	at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:121)
	at com.netease.hbase.manage.util.HRegionInfoUtil.main(HRegionInfoUtil.java:20)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Could you encounter this problem?
Thanks~
Best Regards!
Xiyi
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message