You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Alexandre Linte (JIRA)" <ji...@apache.org> on 2016/06/06 15:06:20 UTC

[jira] [Commented] (HIVE-13950) Beeline: infinite loop during the connection to as remote hiveserver2

    [ https://issues.apache.org/jira/browse/HIVE-13950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15316614#comment-15316614 ] 

Alexandre Linte commented on HIVE-13950:
----------------------------------------

I think I found the source of this infinite loop. I edited the beeline executable like the following:

{noformat}
#!/usr/bin/env bash

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

bin=`dirname "$0"`
bin=`cd "$bin"; pwd`

# If process is backgrounded, don't change terminal settings
#if [[ ! $(ps -o stat= -p $$) == *+ ]]; then
#  export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djline.terminal=jline.UnsupportedTerminal"
#fi

# Set Hadoop User classpath to true so that httpclient jars are taken from
# hive lib instead of hadoop lib.
export HADOOP_USER_CLASSPATH_FIRST=true

# If process is backgrounded, don't change terminal settings
#if [[ ! $(ps -o stat= -p $$) =~ + ]]; then
#  export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djline.terminal=jline.UnsupportedTerminal"
#fi

. "$bin"/hive --service beeline "$@"
{noformat}
In addition, by commenting the lines I  also solved a bad access to the command history. When pressing arrows "up" and "down" was giving me this:
{noformat}
beeline> ^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A
{noformat}

> Beeline: infinite loop during the connection to as remote hiveserver2
> ---------------------------------------------------------------------
>
>                 Key: HIVE-13950
>                 URL: https://issues.apache.org/jira/browse/HIVE-13950
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>    Affects Versions: 2.0.0, 2.0.1
>         Environment: Hadoop 2.7.2, Hive 2.0.1, Tez 0.8.3, Kerberos V
>            Reporter: Alexandre Linte
>
> From a hive client machine, I can use beeline to connect to a remote Hiveserver2. The connection is secured with Kerberos.
> During the connection process, I have an infinite loop when a username is entered. The loop prints "Enter username for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:" and only stops if the user pushes down "enter" on its keyboard.
> {noformat}
> [shfs3453@hive-cli01 workspace]$ beeline
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in [jar:file:/opt/application/Hive/apache-hive-2.0.1-bin/lib/hive-jdbc-2.0.1-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/opt/application/Hive/apache-hive-2.0.1-bin/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/opt/application/Spark/spark-1.6.1/hive/assembly/spark-assembly-1.4.1-hadoop2.7.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/opt/application/Hadoop/hadoop-2.7.2/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
> SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
> Beeline version 2.0.1 by Apache Hive
> beeline> !connect jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS
> Connecting to jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS
> Enter username for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Enter password for jdbc:hive2://hiveserver2.bigdata.fr:10000/shfs3453;principal=hiveserver2/hiveserver2.bigdata.fr@REALM.KERBEROS:  
> Jun 06 14:46:53 beeline INFO - org.apache.hive.jdbc.UtilsSupplied authorities: hiveserver2.bigdata.fr:10000
> Jun 06 14:46:53 beeline INFO - org.apache.hive.jdbc.UtilsResolved authority: hiveserver2.bigdata.fr:10000
> Connected to: Apache Hive (version 2.0.1)
> Driver: Hive JDBC (version 2.0.1)
> Jun 06 14:46:55 beeline WARN - org.apache.hive.jdbc.HiveConnectionRequest to set autoCommit to false; Hive does not support autoCommit=false.
> Transaction isolation: TRANSACTION_REPEATABLE_READ
> 0: jdbc:hive2://hiveserver2.bigdata.fr>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)