java 连接 hive 出错,请大家帮忙看下?

问答 寒冰雪域 ⋅ 于 2019-06-19 17:23:13 ⋅ 最后回复由 青牛 2019-06-20 10:30:18 ⋅ 5194 阅读

java.sql.SQLException: Could not open client transport for any of the Server URI's in ZooKeeper: java.net.UnknownHostException: hadoop-03

at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:333)

at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:247)

at com.zctt.bigdata.test.JdbcHive.main(JdbcHive.java:23)

Caused by: org.apache.hive.org.apache.thrift.transport.TTransportException: java.net.UnknownHostException: hadoop-03

at org.apache.hive.org.apache.thrift.transport.TSocket.open(TSocket.java:226)

at org.apache.hive.org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:266)

at org.apache.hive.org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)

at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:420)

at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:301)

... 4 more

Caused by: java.net.UnknownHostException: hadoop-03

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:589)

at org.apache.hive.org.apache.thrift.transport.TSocket.open(TSocket.java:221)

... 8 more

成为第一个点赞的人吧 :bowtie:
回复数量: 1
  • 青牛 海汼部落创始人,80后程序员一枚,曾就职于金山,喜欢倒腾技术做产品
    2019-06-20 10:30:18

    java.net.UnknownHostException: hadoop-03 就是说你配置的 hadoop-03这个域名没法用ip访问

暂无评论~~
  • 请注意单词拼写,以及中英文排版,参考此页
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`, 更多语法请见这里 Markdown 语法
  • 支持表情,可用Emoji的自动补全, 在输入的时候只需要 ":" 就可以自动提示了 :metal: :point_right: 表情列表 :star: :sparkles:
  • 上传图片, 支持拖拽和剪切板黏贴上传, 格式限制 - jpg, png, gif,教程
  • 发布框支持本地存储功能,会在内容变更时保存,「提交」按钮点击时清空
Ctrl+Enter