HiveServer2'无法连接到localhost:10000与Thrift服务器通信时,未知的HS2问题。 '

时间:2019-05-11 11:46:16

标签: hive bigdata

直线-u“ jdbc:hive2:// namenode:10000 / default”

连接到jdbc:hive2:// namenode:10000 / default 19/05/11 17:21:52 [main]:WARN jdbc.HiveConnection:无法连接到namenode:10000 与Thrift服务器通信时出现未知的HS2问题。 错误:无法使用JDBC Uri打开客户端传输:jdbc:hive2:// namenode:10000 / default:java.net.SocketException:连接重置(状态= 08S01,代码= 0) Apache Hive的Beeline版本3.1.0

hive-site.xml

        javax.jdo.option.ConnectionURL         jdbc:mysql:// localhost:3306 / metastore?createDatabaseIfNotExist = true     

<property>
    <name>metastore.warehouse.dir</name>
    <value>hdfs://namenode:9820/user/hive/warehouse</value>
    <description>location of default database for the warehouse</description>
</property>

<property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>root</value>
</property>

<property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>root</value>
</property>

<property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.cj.jdbc.Driver</value>
</property>
<property>
    <name>metastore.schema.verification</name>
    <value>true</value>
</property>
<property>
    <name>metastore.hmshandler.retry.attemp</name>
    <value>10</value>
    <description>The number of times to retry a HMSHandler call if there were a connection error.</description>
 </property>

<property>
    <name>metastore.thrift.uris</name>
    <value>thrift://namenode:9083</value>
</property>

<property>
    <name>metastore.thrift.port</name>
    <value>9083</value>
</property>

<property>
    <name>hive.server2.transport.mode</name>
    <value>binary</value>
    <description>The server transport mode. The value can be binary or http. Set to http to enable HTTP transport mode.
</description>
</property>

<property>
    <name>hive.server2.thrift.port</name>
    <value>10000</value>
    <description>TCP port number to listen on</description>
</property>

<property>
    <name>hiver.server2.thrift.bind.host</name>
    <value>namenode</value>
    <description>TCP interface to bind to</description>
</property>

<property>
    <name>hive.server2.thrift.http.port</name>
    <value>100002</value>
    <description>HTTP port number to listen on</description>
</property>

<property>
    <name>hive.server2.thrift.http.min.worker.threads</name>
    <value>5</value>
    <description>Maximum worker threads in the server pool</description>
</property>

<property>
    <name>hive.server2.thrift.http.max.worker.threads</name>
    <value>500</value>
    <description>Maximum worker threads in the server pool</description>
</property>

<property>
    <name>hive.server2.thrift.min.worker.threads</name>
    <value>5</value>
    <description>Minimum number of worker threads</description>
</property>

<property>
    <name>hive.server2.thrift.max.worker.threads</name>
    <value>500</value>
    <description>Maximum number of worker threads</description>
</property>

<property>
    <name>hive.server2.authentication</name>
    <value>NOSASL</value>
    <description>
      Expects one of [nosasl, none, ldap, kerberos, pam, custom].
      Client authentication types.
    NONE: no authentication check
    LDAP: LDAP/AD based authentication
    KERBEROS: Kerberos/GSSAPI authentication
    CUSTOM: Custom authentication provider
            (Use with property hive.server2.custom.authentication.class)
    PAM: Pluggable authentication module
    NOSASL:  Raw transport
    </description>
</property>
<property>
    <name>hive.server2.thrift.http.path</name>
    <value>cliservice</value>
    <description>The path component of the URL endpoint when in HTTP mode</description>
</property>

<property>
    <name>hive.metastore.event.db.notification.api.auth</name>
    <value>false</value>
    <description>
  Should metastore do authorization against database notification related APIs such as get_next_notification.
  If set to true, then only the superusers in proxy settings have the permission
        </description>
</property>

<property>
    <name>hive.exec.scratchdir</name>
    <value>hdfs://namenode:9820/tmp/hive</value>
    <description>HDFS root scratch dir for Hive jobs which gets created with write all (733) permission.</description>
</property>

<property>
    <name>hive.exec.local.scratchdir</name>
    <value>/tmp/${user.name}</value>
    <description>Local scratch space for Hive jobs</description>
</property>

<property>
    <name>hive.downloaded.resources.dir</name>
    <value>/tmp/${user.name}_resources</value>
    <description>Temporary local directory for added resources in the remote file system.</description>
</property>

<property>
    <name>hive.scratch.dir.permission</name>
    <value>733</value>
    <description>The permission for the user specific scratch directories that get created.</description>
</property>

大家好,

hive服务器正在侦听端口10000(tcp)和10002(http)。 如果我命中了,beeline -u jdbc:hive2:// 它可以工作,但是当我尝试从host-ip或hostname访问时, 它显示了以上错误。有人知道吗?

0 个答案:

没有答案