本来一切就绪,镜像里已安装如下主要的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.Python网络编程_多线程死锁

    死锁:指两个或两个以上的线程在执行过程中,由于竞争资源或者由于彼此通信而造成的一种阻塞的现象,若无外力作用,它们都将无法推进下去.此时称系统处于死锁状态或系统产生了死锁,这些永远在互相等待的进程称为死 ...

  2. 18.Java基础_关键字this及其内存原理

    this使用 this的内存原理 执行函数setName时,首先是创建函数栈空间,然后创建形参name,除此之外还会有一个this(实质是堆内存中对象的首地址),这个this会索引对象的成员变量nam ...

  3. C++学习三 模板类出错总结(Missing template arguments before 'L')

    一.模板类的说明 模板类有一个好处是可以放宽你输入的数据类型. 比如有这样的一个函数: int add(int x, int y) { return x+y; } 这个函数对于int类型的x,y才适合 ...

  4. day48_9_9 前端之javascript与jQuary

    一.BOM与DOM BOM(Browser Object Model)是指浏览器对象模型,它使 JavaScript 有能力与浏览器进行“对话. DOM (Document Object Model) ...

  5. jenkins配置自动部署java程序

    任务背景 该项目包含4个程序包:a.jar,b.jar,c.jar,d.jar,每次启动前需要修改程序中的配置文件(修改数据源配置),然后按照先后顺序启动. 任务目标 1.利用jenkins拉取代码, ...

  6. x2

    #include<stdio.h> int main () { int days; printf("输入一个整数:\n"); scanf("%d", ...

  7. Spark学习笔记01-基础

    目录 简介 特性 Spark运行模式 Mac本地安装 本文基于 Spark 2.4.1 进行演示,相关代码可以在我的Github上看到. 简介 Spark是一个分布式集群计算系统,类似Hadoop提供 ...

  8. LeetCode 283:移动零 Move Zeroes

    给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序. Given an array nums, write a function to move all 0' ...

  9. picture元素的使用

    前言 相信前端小伙伴们对img元素已经烂熟于心,但不知是否了解picture元素呢? 简单来说,picture元素通过包含一个或多个<source>元素和一个<img>元素再结 ...

  10. Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.username' in string value "${jdbc.username}"

    1.启动dubbo的引用dubbo服务时候报下面这个错误,这是由于去找dubbo的发布服务未找到报的错误,所以先启动dubbo的发布服务即可. [INFO] Scanning for projects ...