使用Java对HBase创建表报错java.net.UnknownHostException: unknown host: chen

INFO - Process identifier=hconnection-0x7fac631b connecting to ZooKeeper ensemble=192.168.1.111:2181
INFO - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
INFO - Client environment:host.name=LAPTOP-MBH46UT1
INFO - Client environment:java.version=1.8.0_77
INFO - Client environment:java.vendor=Oracle Corporation
INFO - Client environment:java.home=F:\Java\jdk1.8.0_77\jre
INFO - Client environment:java.class.path=F:\Java\project\Hbase\target\classes;F:\Java\jdk1.8.0_77\lib\tools.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-common\2.5.0\hadoop-common-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-annotations\2.5.0\hadoop-annotations-2.5.0.jar;C:\Users\HP\.m2\repository\com\google\guava\guava\11.0.2\guava-11.0.2.jar;C:\Users\HP\.m2\repository\commons-cli\commons-cli\1.2\commons-cli-1.2.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-math3\3.1.1\commons-math3-3.1.1.jar;C:\Users\HP\.m2\repository\xmlenc\xmlenc\0.52\xmlenc-0.52.jar;C:\Users\HP\.m2\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;C:\Users\HP\.m2\repository\commons-codec\commons-codec\1.4\commons-codec-1.4.jar;C:\Users\HP\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\HP\.m2\repository\commons-net\commons-net\3.1\commons-net-3.1.jar;C:\Users\HP\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\HP\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;C:\Users\HP\.m2\repository\org\mortbay\jetty\jetty\6.1.26\jetty-6.1.26.jar;C:\Users\HP\.m2\repository\org\mortbay\jetty\jetty-util\6.1.26\jetty-util-6.1.26.jar;C:\Users\HP\.m2\repository\com\sun\jersey\jersey-core\1.9\jersey-core-1.9.jar;C:\Users\HP\.m2\repository\com\sun\jersey\jersey-json\1.9\jersey-json-1.9.jar;C:\Users\HP\.m2\repository\org\codehaus\jettison\jettison\1.1\jettison-1.1.jar;C:\Users\HP\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.3-1\jaxb-impl-2.2.3-1.jar;C:\Users\HP\.m2\repository\javax\xml\bind\jaxb-api\2.2.2\jaxb-api-2.2.2.jar;C:\Users\HP\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;C:\Users\HP\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\HP\.m2\repository\org\codehaus\jackson\jackson-jaxrs\1.8.3\jackson-jaxrs-1.8.3.jar;C:\Users\HP\.m2\repository\org\codehaus\jackson\jackson-xc\1.8.3\jackson-xc-1.8.3.jar;C:\Users\HP\.m2\repository\com\sun\jersey\jersey-server\1.9\jersey-server-1.9.jar;C:\Users\HP\.m2\repository\asm\asm\3.1\asm-3.1.jar;C:\Users\HP\.m2\repository\tomcat\jasper-compiler\5.5.23\jasper-compiler-5.5.23.jar;C:\Users\HP\.m2\repository\tomcat\jasper-runtime\5.5.23\jasper-runtime-5.5.23.jar;C:\Users\HP\.m2\repository\javax\servlet\jsp\jsp-api\2.1\jsp-api-2.1.jar;C:\Users\HP\.m2\repository\commons-el\commons-el\1.0\commons-el-1.0.jar;C:\Users\HP\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\HP\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\HP\.m2\repository\net\java\dev\jets3t\jets3t\0.9.0\jets3t-0.9.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient\4.1.2\httpclient-4.1.2.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore\4.1.2\httpcore-4.1.2.jar;C:\Users\HP\.m2\repository\com\jamesmurty\utils\java-xmlbuilder\0.4\java-xmlbuilder-0.4.jar;C:\Users\HP\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\HP\.m2\repository\commons-configuration\commons-configuration\1.6\commons-configuration-1.6.jar;C:\Users\HP\.m2\repository\commons-digester\commons-digester\1.8\commons-digester-1.8.jar;C:\Users\HP\.m2\repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar;C:\Users\HP\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.0\commons-beanutils-core-1.8.0.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-log4j12\1.7.5\slf4j-log4j12-1.7.5.jar;C:\Users\HP\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.9.13\jackson-core-asl-1.9.13.jar;C:\Users\HP\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.13\jackson-mapper-asl-1.9.13.jar;C:\Users\HP\.m2\repository\org\apache\avro\avro\1.7.4\avro-1.7.4.jar;C:\Users\HP\.m2\repository\com\thoughtworks\paranamer\paranamer\2.3\paranamer-2.3.jar;C:\Users\HP\.m2\repository\org\xerial\snappy\snappy-java\1.0.4.1\snappy-java-1.0.4.1.jar;C:\Users\HP\.m2\repository\com\google\protobuf\protobuf-java\2.5.0\protobuf-java-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-auth\2.5.0\hadoop-auth-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\directory\server\apacheds-kerberos-codec\2.0.0-M15\apacheds-kerberos-codec-2.0.0-M15.jar;C:\Users\HP\.m2\repository\org\apache\directory\server\apacheds-i18n\2.0.0-M15\apacheds-i18n-2.0.0-M15.jar;C:\Users\HP\.m2\repository\org\apache\directory\api\api-asn1-api\1.0.0-M20\api-asn1-api-1.0.0-M20.jar;C:\Users\HP\.m2\repository\org\apache\directory\api\api-util\1.0.0-M20\api-util-1.0.0-M20.jar;C:\Users\HP\.m2\repository\com\jcraft\jsch\0.1.42\jsch-0.1.42.jar;C:\Users\HP\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\HP\.m2\repository\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-compress\1.4.1\commons-compress-1.4.1.jar;C:\Users\HP\.m2\repository\org\tukaani\xz\1.0\xz-1.0.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-hdfs\2.5.0\hadoop-hdfs-2.5.0.jar;C:\Users\HP\.m2\repository\commons-daemon\commons-daemon\1.0.13\commons-daemon-1.0.13.jar;C:\Users\HP\.m2\repository\io\netty\netty\3.6.2.Final\netty-3.6.2.Final.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-client\2.5.0\hadoop-client-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-app\2.5.0\hadoop-mapreduce-client-app-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-common\2.5.0\hadoop-mapreduce-client-common-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-yarn-client\2.5.0\hadoop-yarn-client-2.5.0.jar;C:\Users\HP\.m2\repository\com\sun\jersey\jersey-client\1.9\jersey-client-1.9.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-yarn-server-common\2.5.0\hadoop-yarn-server-common-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-shuffle\2.5.0\hadoop-mapreduce-client-shuffle-2.5.0.jar;C:\Users\HP\.m2\repository\org\fusesource\leveldbjni\leveldbjni-all\1.8\leveldbjni-all-1.8.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-yarn-api\2.5.0\hadoop-yarn-api-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-core\2.5.0\hadoop-mapreduce-client-core-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-yarn-common\2.5.0\hadoop-yarn-common-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-jobclient\2.5.0\hadoop-mapreduce-client-jobclient-2.5.0.jar;C:\Users\HP\.m2\repository\org\apache\hbase\hbase-client\0.98.6-hadoop2\hbase-client-0.98.6-hadoop2.jar;C:\Users\HP\.m2\repository\org\apache\hbase\hbase-common\0.98.6-hadoop2\hbase-common-0.98.6-hadoop2.jar;C:\Users\HP\.m2\repository\org\apache\hbase\hbase-protocol\0.98.6-hadoop2\hbase-protocol-0.98.6-hadoop2.jar;C:\Users\HP\.m2\repository\org\cloudera\htrace\htrace-core\2.04\htrace-core-2.04.jar;C:\Users\HP\.m2\repository\com\github\stephenc\findbugs\findbugs-annotations\1.3.9-1\findbugs-annotations-1.3.9-1.jar;C:\Users\HP\.m2\repository\junit\junit\4.11\junit-4.11.jar;C:\Users\HP\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar
INFO - Client environment:java.library.path=F:\Java\jdk1.8.0_77\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;F:/Java/jre1.8.0_77/bin/server;F:/Java/jre1.8.0_77/bin;F:/Java/jre1.8.0_77/lib/amd64;C:\Program Files (x86)\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;"F:\Java\jdk1.8.0_77\bin;F:\Java\jdk1.8.0_77\jre\bin;";C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;F:\Java\jre1.8.0_77;F:\python\python2.7.9;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;D:\办公学习\hadoop伪分布式搭建\apache-maven-3.5.0\bin\;D:\办公学习\hadoop伪分布式搭建\hadoop-2.5.0-cdh5.3.6\bin\;C:\Users\HP\AppData\Local\Microsoft\WindowsApps;;F:\Java\eclipse_juno;;.
INFO - Client environment:java.io.tmpdir=C:\Users\HP\AppData\Local\Temp\
INFO - Client environment:java.compiler=<NA>
INFO - Client environment:os.name=Windows 10
INFO - Client environment:os.arch=amd64
INFO - Client environment:os.version=10.0
INFO - Client environment:user.name=HP
INFO - Client environment:user.home=C:\Users\HP
INFO - Client environment:user.dir=F:\Java\project\Hbase
INFO - Initiating client connection, connectString=192.168.1.111:2181 sessionTimeout=90000 watcher=hconnection-0x7fac631b, quorum=192.168.1.111:2181, baseZNode=/hbase
INFO - Opening socket connection to server 192.168.1.111/192.168.1.111:2181. Will not attempt to authenticate using SASL (unknown error)
INFO - Socket connection established to 192.168.1.111/192.168.1.111:2181, initiating session
INFO - Session establishment complete on server 192.168.1.111/192.168.1.111:2181, sessionid = 0x16a04ef2168000e, negotiated timeout = 90000
INFO - hadoop.native.lib is deprecated. Instead, use io.native.lib.available
INFO - getMaster attempt 1 of 35 failed; retrying after sleep of 100, exception=com.google.protobuf.ServiceException: java.net.UnknownHostException: unknown host: chen
INFO - getMaster attempt 2 of 35 failed; retrying after sleep of 201, exception=com.google.protobuf.ServiceException: java.net.UnknownHostException: unknown host: chen
INFO - getMaster attempt 3 of 35 failed; retrying after sleep of 302, exception=com.google.protobuf.ServiceException: java.net.UnknownHostException: unknown host: chen
INFO - getMaster attempt 4 of 35 failed; retrying after sleep of 500, exception=com.google.protobuf.ServiceException: java.net.UnknownHostException: unknown host: chen

通过在网上的搜寻最终解决了这个问题
解决的方法就是在本地C:\Windows\System32\drivers\etc\hosts文件中添加IP地址及主机名
在这里插入图片描述
添加之后保存文件就ok了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值