本来一切就绪,镜像里已安装如下主要的pip包。

pyhive
configparser
pandas
hdfs
thrift
sqlparse
sasl
thrift-sasl

但,使用pyhive client去真正连接hive服务器时,还是会报如下错误:

thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found'

这个问题,有点大条了,按网上centos的解决方式,以下安装包即可解决:

yum install cyrus-sasl-plain  cyrus-sasl-devel  cyrus-sasl-gssapi

但我的镜像是UBUNTU,因为tensorflow官方镜像就是ubuntu 1804。所以,这条路不错。

又参考了网上一些ubuntu的方法,安装sasl2-bin等这些软件包,都没有解决问题。

最后,还是实打实的来到http://www.linuxfromscratch.org/blfs/view/cvs/postlfs/cyrus-sasl.html

源码安装好Cyrus SASL-2.1.27,这个问题才搞定。

非docker的安装命令:

./configure --prefix=/usr        \
            --sysconfdir=/etc    \
            --enable-auth-sasldb \
            --with-dbpath=/var/lib/sasl/sasldb2 \
            --with-saslauthd=/var/run/saslauthd &&
make -j1

make install &&
/html &&
      &&
install -v -m644  doc/legacy/*.html        /usr/share/doc/cyrus-sasl-2.1.27/html &&
install -v -dm700 /var/lib/sasl

附上将cyrus sasl编译进镜像的dockerfile.

FROM harbor.xxx.com.cn/3rd_part/tensorflow:xxx 

MAINTAINER xxx

COPY cyrus-sasl-2.1.27 /tmp/cyrus-sasl-2.1.27

RUN export http_proxy=http://xxx:8080 \
    && export https_proxy=http://xxx:8080 \
    && export ftp_proxy=http://xxx:8080 \
    && cd /tmp/cyrus-sasl-2.1.27 \
    && ls -lh /tmp/ \
    && ls -lh /tmp/cyrus-sasl-2.1.27/ \
    && ./configure --prefix=/usr --sysconfdir=/etc --enable-auth-sasldb --with-dbpath=/var/lib/sasl/sasldb2 --with-saslauthd=/var/run/saslauthd \
    && make -j1 \
    && make install \
    && install -v -dm755 /usr/share/doc/cyrus-sasl-2.1.27/html \
    && install -v -m644  saslauthd/LDAP_SASLAUTHD /usr/share/doc/cyrus-sasl-2.1.27 \
    && install -v -m644  doc/legacy/*.html /usr/share/doc/cyrus-sasl-2.1.27/html  \
    && install -v -dm700 /var/lib/sasl \
    && echo "finished!!!"

pyhive client连接hive报错处理:Could not start SASL的更多相关文章

  1. Zeppelin 用jdbc连接hive报错

    日志: Could not establish connection to jdbc:hive2://192.168.0.51:10000: Required field 'serverProtoco ...

  2. Navicat连接Mysql报错:Client does not support authentication protocol requested by server;

    Navicat连接Mysql报错:Client does not support authentication protocol requested by server: 刚安装Mysql,想用Nav ...

  3. SSH Secure File Transfer Client连接远程设备报“algorithm negotiation failed”错的解决方法

    SSH Secure File Transfer Client连接远程设备报"algorithm negotiation failed"错的解决方法 ssh client 报 al ...

  4. Navicat连接mysql报错1251 -client does not support authentication protocol

    原文https://blog.csdn.net/qq_35654080/article/details/82588188 详解请参考https://blog.csdn.net/chszs/articl ...

  5. 【原创】大叔问题定位分享(33)beeline连接presto报错

    hive2.3.4 presto0.215 使用hive2.3.4的beeline连接presto报错 $ beeline -d com.facebook.presto.jdbc.PrestoDriv ...

  6. beeline链接hive报错

    看问题:beeline连接hiveserver2报错.连接串:hive  --service beeline -u jdbc:hive2://localhost:10000/hive 错误:Error ...

  7. Atom远程连接服务器报错服务器版本和客户端版本不一致

    Atom远程连接服务器 报错信息: Server version is different than client version Original error message: Version mi ...

  8. 【原创】大叔经验分享(38)beeline连接hiveserver2报错impersonate

    beeline连接hiveserver2报错 Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost: ...

  9. Sqoop- sqoop将mysql数据表导入到hive报错

    sqoop将mysql数据表导入到hive报错 [root@ip---- lib]# sqoop import --connect jdbc:mysql://54.223.175.12:3308/gx ...

随机推荐

  1. git笔录

    [一]git介绍 初始的项目版本管理可以在本地赋值备份之前版本代码,项目较小时还可以,但项目较大时,这种方法显得有点捉襟见肘 ... ... 后期也出现了很多版本管理工具,例如svn.vcs.vss等 ...

  2. (转)cube-ui后编译

    转载地址:https://www.jianshu.com/p/189755f9ce43 1. 后编译介绍 目前大部分的前端项目开发都是使用es6+的代码并且使用babel进行编译,而传统的对代码包的引 ...

  3. Python thread (线程)

    线程 (thread) 操作系统最小的调度单位,是一串指令的集合 程序一开始就有一个主线程,新启动的线程和主线程之间互不影响,主线程启动子线程之后就相互独立(子线程也可以启动线程),无论子线程是否执行 ...

  4. DRF--验证器

    前戏 在之前我们对前端妹子传来的数据进行校验,使用的是序列化类来进行校验的,但这里面往往满足不了我们的需求,更多的时候我们希望自己定义校验规则.这里介绍三种自定义校验的方式.分别是单一字段校验,多个字 ...

  5. codevs 3304 水果姐逛水果街Ⅰ

    这道题可以用ST表过: 题目链接 记录4个数组:maxval[][], minval[][], ans[][], rans[][] maxval[i][j]表示从i号元素开始,长度为(1<< ...

  6. Oracle中如何创建数据库

    Oracle数据库的物理结构与MySQL以及SQLServer有着很大的不同.在使用MySQL或SQLServer时,我们不需要去关心它们的逻辑结构和物理结构. 但是在使用Oracle的时候,我们必须 ...

  7. HttpUtility.HtmlDecode ,HttpUtility.HtmlEncode 与 Server.HtmlDecode ,Server.HtmlEncode 与 HttpServerUtility.HtmlDecode , HttpServerUtility.HtmlEncode

    HtmlEncode: 将 Html 源文件中不允许出现的字符进行编码,通常是编码以下字符"<".">"."&" 等. ...

  8. Kafka随笔

    1.选举Leader  Leader 是 Partition 级别的,当一个 Broker 挂掉后,所有 Leader 在该 Broker 上的 Partition 都会被重新选举,选出一个新 Lea ...

  9. Java8新特性——Optional类的使用(有效的避免空指针异常)

    OPtional类的使用 概述 到目前为止,臭名昭著的空指针异常是导致Java应用程序失败的最常见原因.以前,为了解决空指针异常,Google公司著名的Guava项目引入了Optional类,Guav ...

  10. 三维网格细分算法(Catmull-Clark subdivision & Loop subdivision)附源码(转载)

    转载:  https://www.cnblogs.com/shushen/p/5251070.html 下图描述了细分的基本思想,每次细分都是在每条边上插入一个新的顶点,可以看到随着细分次数的增加,折 ...