본문 바로가기
Study/Bigdata

HIVE : Error applying authorization policy on hive configuration: java.net.ConnectException: Call From ems2/192.168.1.12 to 0.0.0.0:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.a..

by Red Analyst 2016. 4. 16.
반응형

java.lang.RuntimeException: Error applying authorization policy on hive configuration: java.net.ConnectException: Call From HOST2/192.168.1.12 to 0.0.0.0:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

        at org.apache.hive.service.cli.CLIService.init(CLIService.java:114)

        at org.apache.hive.service.CompositeService.init(CompositeService.java:59)

        at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:104)

        at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:411)

        at org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:78)

        at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:654)

        at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:527)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:497)

        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)

        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

Caused by: java.lang.RuntimeException: java.net.ConnectException: Call From HOST2/192.168.1.12 to 0.0.0.0:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:494)

        at org.apache.hive.service.cli.CLIService.applyAuthorizationConfigPolicy(CLIService.java:127)

        at org.apache.hive.service.cli.CLIService.init(CLIService.java:112)

        ... 12 more

Caused by: java.net.ConnectException: Call From HOST2/192.168.1.12 to 0.0.0.0:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)

        at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:792)

        at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:732)

        at org.apache.hadoop.ipc.Client.call(Client.java:1431)

        at org.apache.hadoop.ipc.Client.call(Client.java:1358)

        at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:229)

        at com.sun.proxy.$Proxy15.getFileInfo(Unknown Source)

        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:771)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:497)

        at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:252)

        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:104)

        at com.sun.proxy.$Proxy16.getFileInfo(Unknown Source)

        at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:2116)

        at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:1315)

        at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:1311)

        at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)

        at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1311)

        at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1424)

        at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:568)

        at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:526)

        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:480)

        ... 14 more

Caused by: java.net.ConnectException: Connection refused

        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)

        at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)

        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531)

        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:495)

        at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:612)

        at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:710)

        at org.apache.hadoop.ipc.Client$Connection.access$2800(Client.java:373)

        at org.apache.hadoop.ipc.Client.getConnection(Client.java:1493)

        at org.apache.hadoop.ipc.Client.call(Client.java:1397)


HDP Ambari를 보니 Hive가 뻗어있길래 저런 오류가 나있더군요...한번 HDFS의 Core-site.xml 에서 defualt.fs 가 제대로 설정되어있는지 확인해보셔야 합니다. 


만약에 default.fs 쪽에 0.0.0.0:8020 으로 설정 하셨으면, 해당 네임노드 호스트로 바꾸면 될것 같습니다.

(지금 헷갈리는게,, 원래 저렇게 안썻나,,)


반응형