Exception in thread "main" org.I0Itec.zkclient.exception.ZkAuthFailedException: Authentication failure is thrown while creating kafka topic
Exception in thread "main" org.I0Itec.zkclient.exception.ZkAuthFailedException: Authentication failure is thrown while creating kafka topic
when i try to create topic in kafka using non kafka admin user with following command:
usr/hdp/current/kafka-broker/bin/kafka-topics.sh --create --zookeeper <zk_url> --replication-factor 1 --partitions 1 --topic kafka_topic
- [2016-11-09 09:20:32,716] WARN Could not login: the client is being asked for a password, but the Zookeeper client code does not currently support obtaining a password from the user. Make sure that the client is configured to use a ticket cache (using the JAAS configuration setting 'useTicketCache=true)' and restart the client. If you still get this message after that, the TGT in the ticket cache has expired and must be manually refreshed. To do so, first determine if you are using a password or a keytab. If the former, run kinit in a Unix shell in the environment of the user who is running this Zookeeper client using the command 'kinit <princ>' (where <princ> is the name of the client's Kerberos principal). If the latter, do 'kinit -k -t <keytab> <princ>' (where <princ> is the name of the Kerberos principal, and <keytab> is the location of the keytab file). After manually refreshing your cache, restart this client. If you continue to see this message after manually refreshing your cache, ensure that your KDC host's clock is in sync with this host's clock. (org.apache.zookeeper.client.ZooKeeperSaslClient)[2016-11-09 09:20:32,719] WARN SASL configuration failed: javax.security.auth.login.LoginException: No password provided Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it. (org.apache.zookeeper.ClientCnxn)Exception in thread "main" org.I0Itec.zkclient.exception.ZkAuthFailedException: Authentication failureat org.I0Itec.zkclient.ZkClient.waitForKeeperState(ZkClient.java:946)at org.I0Itec.zkclient.ZkClient.waitUntilConnected(ZkClient.java:923)at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1230)at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:156)at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:130)at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:75)at kafka.utils.ZkUtils$.apply(ZkUtils.scala:57)at kafka.admin.TopicCommand$.main(TopicCommand.scala:54)at kafka.admin.TopicCommand.main(TopicCommand.scala)
but when i run same command as kafka user then it works, any clue on this ?
Note: this is a secure cluster
个解答,截止Balint Molnar · 2016年11月11日 09:55
If the cluster is kerberized only one user can create new topic with command:
- bin/kafka-topics.sh --create --zookeeper <you zk node> --replication-factor 1 --partitions 1 --topic kafka_topic
This user is the user who runs the kafka broker, this is a zookeeper security limitation but there is a property in kafka auto.create.topics.enable, if this one is set to true the required topic will be created if the user produce/consume message.
- bin/kafka-console-producer.sh --broker-list broker address --topic kafka_topic --security-protocol SASL_PLAINTEXT
This command will create the kafka_topic, with different users.
https://community.hortonworks.com/questions/65575/exception-in-thread-main-orgi0iteczkclientexceptio.html
Exception in thread "main" org.I0Itec.zkclient.exception.ZkAuthFailedException: Authentication failure is thrown while creating kafka topic的更多相关文章
- springboot 和 mongdb连接问题 Exception in thread "main" com.mongodb.MongoSecurityException:
1 Exception in thread "main" com.mongodb.MongoSecurityException: Exception authenticating ...
- 【原创】大叔问题定位分享(8)提交spark任务报错 Caused by: java.lang.ClassNotFoundException: org.I0Itec.zkclient.exception.ZkNoNodeException
spark 2.1.1 一 问题重现 spark-submit --master local[*] --class app.package.AppClass --jars /jarpath/zkcli ...
- zookeeper报错: org.I0Itec.zkclient.exception.ZkMarshallingError: java.io.EOFException
zookeeper报错: org.I0Itec.zkclient.exception.ZkMarshallingError: java.io.EOFException 主要因为是没有序列化. 可以使用 ...
- java.lang.ClassNotFoundException: org.I0Itec.zkclient.exception.ZkNoNodeException 异常 如何处理
严重: Context initialization failed java.lang.NoClassDefFoundError: org/I0Itec/zkclient/exception/ZkNo ...
- Caused by: org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 5000
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brandControl ...
- Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
学习架构探险,从零开始写Java Web框架时,在学习到springAOP时遇到一个异常: "C:\Program Files\Java\jdk1.7.0_40\bin\java" ...
- Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
在学习CGlib动态代理时,遇到如下错误: Exception in thread "main" java.lang.NoSuchMethodError: org.objectwe ...
- GUI学习中错误Exception in thread "main" java.lang.NullPointerException
运行时出现错误:Exception in thread "main" java.lang.NullPointerException 该问题多半是由于用到的某个对象只进行了声明,而没 ...
- zookeeper_service 出错 java.lang.NoClassDefFoundError: org/I0Itec/zkclient/exception/ZkNoNodeException
2016-12-18 08:28:07 ContextLoader:358 ERROR - Context initialization failed java.lang.NoClassDefFoun ...
随机推荐
- Variable SQLLOGDIR not found
昨天在一数据库(SQL Server 2008 R2 SP3)上部署了一个作业,今天早上收到告警邮件,作业执行报错"Unable to start execution of step 1 ( ...
- eShopOnContainers 知多少[2]:Run起来
环境准备 Win10(开启Hyper-V) .NET Core SDK Docker for Windows VS2017 or VS Code Git SQL Server Management S ...
- 【原创开源】网络版二代双通道示波器开源发布,支持电脑,手机和Pad等各种OS平台访问
前言感谢大家的支持,提前奉上今年的国庆福利. 一代示波器发布于3年前,去年年底的时候发布了二代示波器,软件性能已经比较强劲,但依然有值得升级改进的地方,经过今年这半年多努力,在二代示波器的基础上再推出 ...
- cglib根据数据动态生成对象
最近有个任务:根据查询SQL直接导出报表 实现关键是,怎么根据sql查询的数据动态生成对象列表,想到Cglib动态代理实现 废话少说,上代码: 定义动态生成Java Bean类: import jav ...
- 爬虫框架之Scrapy(三 CrawlSpider)
如何爬取一个网站的全站数据? 可以使用Scrapy中基于Spider的递归方式进行爬取(Request模块回调parse方法) 还有一种更高效的方法,就是基于CrawlSpider的自动爬取实现 简介 ...
- 关于 Docker 镜像的操作,看完这篇就够啦 !(下)
紧接着上篇<关于 Docker 镜像的操作,看完这篇就够啦 !(上)>,奉上下篇 !!! 镜像作为 Docker 三大核心概念中最重要的一个关键词,它有很多操作,是您想学习容器技术不得不掌 ...
- java~springboot~gradle里的docker集成
在springboot里,我们的task任务可以添加docker构建的功能,在gradle集成环境里,直接可以实现编译,测试,打包镜像的流水线作业,很是方便! 下面分享给大家,在gradle里添加do ...
- SpringBoot简单打包部署(附工程)
前言 本文主要介绍SpringBoot的一些打包事项和项目部署以及在其中遇到一些问题的解决方案. SpringBoot打包 在SpringBoot打包这块,我们就用之前的一个web项目来进行打包. 首 ...
- Java基础系列-Enum深入解析
原创文章,转载请标注出处:https://www.cnblogs.com/V1haoge/p/10755129.html 一.概述 枚举就是一个语法糖效果. 定义一个枚举,其实就是定义一个继承抽象类E ...
- c# 制作正方形图片
using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D ...