本来一切就绪,镜像里已安装如下主要的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. 【洛谷P4148】简单题(kd-tree)

    传送门 题意: 给出一个\(n*n\)的棋盘,现在有两种操作:一种是某个格子里的数字加上\(A\),另一种是询问矩阵和. 空间限制:\(20MB\),强制在线. 思路: 直接\(kd-tree\)来搞 ...

  2. glibc-static

    yum install glibc-static yum install libstdc++-static

  3. 【Spring AOP】AOP核心概念(二)

    1. 横切关注点 对哪些方法进行拦截,拦截后怎么处理,这些关注点称之为横切关注点. 2. 切面(aspect)-- 本质上仅仅是一个类 类是对物体特征的抽象,切面就是对横切关注点的抽象. 3. 连接点 ...

  4. bioawk

    https://github.com/lh3/bioawk 1.基本思想 使用: usage: bioawk [-F fs] [-v var=value] [-c fmt] [-tH] [-f pro ...

  5. [转]python中np.multiply()、np.dot()和星号(*)三种乘法运算的区别

    转自https://blog.csdn.net/zenghaitao0128/article/details/78715140 为了区分三种乘法运算的规则,具体分析如下: import numpy a ...

  6. 修改kile工程名字(转)

    假设原来的工程文件名是first,要改成second1.在工程文件目录中,将first.uvopt和first.uvproj名字改成second.uvopt和second.uvproj.2.其他fir ...

  7. etcd+https部署

    关闭防火墙 关闭selinux 下载所需的包(cfssl,生成证书工具) mkdir /usr/local/src/etcd/ cd /usr/local/src/etcd/ wget https:/ ...

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

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

  9. css不常用的4个选择器-个人向

    ①:element1.element2(给同时满足有element1和element2 2个类名的元素添加样式) <!DOCTYPE html> <html> <head ...

  10. centos crontab定时任务用法

    一.安装crond服务 yum -y update yum -y install cronie yum-cron 二.crontab任务语法 crontab任务配置基本格式: * * * * * co ...