本来一切就绪,镜像里已安装如下主要的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. 8. Go语言—指针类型

    一.指针类型介绍 普通类型,变量存的就是值,也叫值类型. 获取变量的地址,用&,比如:var a int ,获取a的地址:&a 指针类型,变量存的是一个地址,这个地址存的才是值(指针存 ...

  2. keras 学习笔记(二) ——— data_generator

    data_generator 每次输出一个batch,基于keras.utils.Sequence Base object for fitting to a sequence of data, suc ...

  3. HDU 6298(数学)

    题意是给出一个数,找出这个数的三个因子且这三个因子的和等于这个数,输出满足条件的乘积最大的一组因子的乘积,如果不存在这样的因子,就输出 -1. 第一次 wa 了,因为把题目中的 x | n 当做了位或 ...

  4. matlab练习程序(贝塞尔曲线)

    下面三个公式分别是一次.二次和三次贝塞尔曲线公式: 通用的贝塞尔曲线公式如下: 可以看出,系数是由一个杨辉三角组成的. 这里的一次或者二次三次由控制点个数来决定,次数等于控制点个数-1. 实现的效果如 ...

  5. 05-01 seaborn

    1.Seaborn 在上节中我们学习了matplotlib,这节课我们来看看另一个可视化的模块seaborn,它是基于matplotlib的更高级的开源库,主要用作于数据可视化,解决了matplotl ...

  6. RSA加密与解密

    /// <summary> /// RSA 公钥加密 /// </summary> /// <param name="content">要加密的 ...

  7. 在Azure DevOps Server 中提交Maven 依赖包(mvn deploy-file)

    Contents 1. 概述 2. 必要准备 安装Java 下载安装Maven 3. 服务器配置 新建连接源 4. 客户端配置 5. 上传maven包文件 6. 常见问题 Maven最新版本3.6.2 ...

  8. 《Web前端开发》等级考试样题~以国家“1+X”职业技能证书为标准,厚溥推出Web前端开发人才培养方案

    1+x证书Web前端开发初级理论考试样题2019 http://blog.zh66.club/index.php/archives/149/ 1+x证书Web前端开发初级实操考试样题2019 http ...

  9. python Lock、RLock

    Lock: 只能acquire一次,下一次acquire必须release后才能,不然会造成死锁 from threading import Lock total = 0 lock = Lock() ...

  10. 小记 .NET Core 3.0 下 WPF 是如何运行的

    1. 解决方案架构 如图: 2. 生成的代码 如图: /// <summary> /// App /// </summary> public partial class App ...