Kafka服务器未远程连接zookeeper服务器

2024-04-21

我正在尝试将 kafka 服务器(在 Windows 系统上)连接到 Zookeeper 服务器。我面临着

Opening socket connection to server 10.160.10.25/10.160.10.25:2181. Will not attempt to authenticate using SASL (unknown error)

我无法理解如何解决。我尝试了与此相关的更相关问题,但没有得到答案。我还附上了用于连接的日志和命令。

客户端也可以访问端口

**bin\windows\kafka-server-start.bat config\server.properties**

下面附上日志

[2020-05-01 16:25:37,082] INFO Client environment:java.io.tmpdir=C:\Users\Admin\AppData\Local\Temp\ (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,083] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,083] INFO Client environment:os.name=Windows 7 (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,084] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,084] INFO Client environment:os.version=6.1 (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,085] INFO Client environment:user.name=Admin (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,085] INFO Client environment:user.home=C:\Users\Admin (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,086] INFO Client environment:user.dir=D:\Software\kafka_2.12-2.4.1 (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,086] INFO Client environment:os.memory.free=976MB (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,087] INFO Client environment:os.memory.max=1024MB (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,087] INFO Client environment:os.memory.total=1024MB (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,099] INFO Initiating client connection, connectString=X.X.X.X:2181 sessionTimeout=6000 watcher=kafka.zookeeper.ZooKeeperClient$ZooKeep
erClientWatcher$@31c88ec8 (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:37,192] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.co
mmon.X509Util)
[2020-05-01 16:25:37,357] INFO jute.maxbuffer value is 4194304 Bytes (org.apache.zookeeper.ClientCnxnSocket)
[2020-05-01 16:25:37,393] INFO zookeeper.request.timeout value is 0. feature enabled= (org.apache.zookeeper.ClientCnxn)
[2020-05-01 16:25:37,402] INFO [ZooKeeperClient Kafka server] Waiting until connected. (kafka.zookeeper.ZooKeeperClient)
[2020-05-01 16:25:43,416] INFO [ZooKeeperClient Kafka server] Closing. (kafka.zookeeper.ZooKeeperClient)
[2020-05-01 16:25:46,564] INFO Opening socket connection to server XX.XX.XX.XX/XX.XX.XX.XX:2181. Will not attempt to authenticate using SASL (unknown error) (
org.apache.zookeeper.ClientCnxn)
[2020-05-01 16:25:46,569] WARN Client session timed out, have not heard from server in 9172ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn)
[2020-05-01 16:25:46,699] INFO Session: 0x0 closed (org.apache.zookeeper.ZooKeeper)
[2020-05-01 16:25:46,706] INFO [ZooKeeperClient Kafka server] Closed. (kafka.zookeeper.ZooKeeperClient)
[2020-05-01 16:25:46,711] INFO EventThread shut down for session: 0x0 (org.apache.zookeeper.ClientCnxn)
[2020-05-01 16:25:46,724] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
        at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected$3(ZooKeeperClient.scala:259)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:253)
        at kafka.zookeeper.ZooKeeperClient.waitUntilConnected(ZooKeeperClient.scala:255)
        at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:113)
        at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1858)
        at kafka.server.KafkaServer.createZkClient$1(KafkaServer.scala:375)
        at kafka.server.KafkaServer.initZkClient(KafkaServer.scala:399)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:207)
        at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:44)
        at kafka.Kafka$.main(Kafka.scala:84)
        at kafka.Kafka.main(Kafka.scala)
[2020-05-01 16:25:46,749] INFO shutting down (kafka.server.KafkaServer)
[2020-05-01 16:25:46,844] INFO shut down completed (kafka.server.KafkaServer)
[2020-05-01 16:25:46,886] ERROR Exiting Kafka. (kafka.server.KafkaServerStartable)
[2020-05-01 16:25:46,993] INFO shutting down (kafka.server.KafkaServer)

动物园管理员属性

icensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# the directory where the snapshot is stored.
dataDir=/home/weaver/app_server/zookeeper
# the port at which the clients will connect
clientPort=2181
# disable the per-ip limit on the number of connections since this is a non-production config
maxClientCnxns=0
# Disable the adminserver by default to avoid port conflicts.
# Set the port to something non-conflicting if choosing to enable this
admin.enableServer=false
# admin.serverPort=8080

服务器属性

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# see kafka.server.KafkaConfig for additional details and defaults

############################# Server Basics #############################

# The id of the broker. This must be set to a unique integer for each broker.
broker.id=0

############################# Socket Server Settings #############################

# The address the socket server listens on. It will get the value returned from 
# java.net.InetAddress.getCanonicalHostName() if not configured.
#   FORMAT:
#     listeners = listener_name://host_name:port
#   EXAMPLE:
#     listeners = PLAINTEXT://your.host.name:9092
#listeners=PLAINTEXT://:9092

# Hostname and port the broker will advertise to producers and consumers. If not set, 
# it uses the value for "listeners" if configured.  Otherwise, it will use the value
# returned from java.net.InetAddress.getCanonicalHostName().
#advertised.listeners=PLAINTEXT://your.host.name:9092

# Maps listener names to security protocols, the default is for them to be the same. See the config documentation for more details
#listener.security.protocol.map=PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL

# The number of threads that the server uses for receiving requests from the network and sending responses to the network
num.network.threads=3

# The number of threads that the server uses for processing requests, which may include disk I/O
num.io.threads=8

# The send buffer (SO_SNDBUF) used by the socket server
socket.send.buffer.bytes=102400

# The receive buffer (SO_RCVBUF) used by the socket server
socket.receive.buffer.bytes=102400

# The maximum size of a request that the socket server will accept (protection against OOM)
socket.request.max.bytes=104857600


############################# Log Basics #############################

# A comma separated list of directories under which to store log files
log.dirs=/tmp/kafka-logs

# The default number of log partitions per topic. More partitions allow greater
# parallelism for consumption, but this will also result in more files across
# the brokers.
num.partitions=1

# The number of threads per data directory to be used for log recovery at startup and flushing at shutdown.
# This value is recommended to be increased for installations with data dirs located in RAID array.
num.recovery.threads.per.data.dir=1

############################# Internal Topic Settings  #############################
# The replication factor for the group metadata internal topics "__consumer_offsets" and "__transaction_state"
# For anything other than development testing, a value greater than 1 is recommended to ensure availability such as 3.
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1

############################# Log Flush Policy #############################

# Messages are immediately written to the filesystem but by default we only fsync() to sync
# the OS cache lazily. The following configurations control the flush of data to disk.
# There are a few important trade-offs here:
#    1. Durability: Unflushed data may be lost if you are not using replication.
#    2. Latency: Very large flush intervals may lead to latency spikes when the flush does occur as there will be a lot of data to flush.
#    3. Throughput: The flush is generally the most expensive operation, and a small flush interval may lead to excessive seeks.
# The settings below allow one to configure the flush policy to flush data after a period of time or
# every N messages (or both). This can be done globally and overridden on a per-topic basis.

# The number of messages to accept before forcing a flush of data to disk
#log.flush.interval.messages=10000

# The maximum amount of time a message can sit in a log before we force a flush
#log.flush.interval.ms=1000

############################# Log Retention Policy #############################

# The following configurations control the disposal of log segments. The policy can
# be set to delete segments after a period of time, or after a given size has accumulated.
# A segment will be deleted whenever *either* of these criteria are met. Deletion always happens
# from the end of the log.

# The minimum age of a log file to be eligible for deletion due to age
log.retention.hours=168

# A size-based retention policy for logs. Segments are pruned from the log unless the remaining
# segments drop below log.retention.bytes. Functions independently of log.retention.hours.
#log.retention.bytes=1073741824

# The maximum size of a log segment file. When this size is reached a new log segment will be created.
log.segment.bytes=1073741824

# The interval at which log segments are checked to see if they can be deleted according
# to the retention policies
log.retention.check.interval.ms=300000

############################# Zookeeper #############################

# Zookeeper connection string (see zookeeper docs for details).
# This is a comma separated host:port pairs, each corresponding to a zk
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
# You can also append an optional chroot string to the urls to specify the
# root directory for all kafka znodes.
zookeeper.connect=10.160.10.25:2181

# Timeout in ms for connecting to zookeeper
zookeeper.connection.timeout.ms=6000


############################# Group Coordinator Settings #############################

# The following configuration specifies the time, in milliseconds, that the GroupCoordinator will delay the initial consumer rebalance.
# The rebalance will be further delayed by the value of group.initial.rebalance.delay.ms as new members join the group, up to a maximum of max.poll.interval.ms.
# The default value for this is 3 seconds.
# We override this to 0 here as it makes for a better out-of-the-box experience for development and testing.
# However, in production environments the default value of 3 seconds is more suitable as this will help to avoid unnecessary, and potentially expensive, rebalances during application startup.
group.initial.rebalance.delay.ms=0

None

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Kafka服务器未远程连接zookeeper服务器 的相关文章

  • Kafka结构化流KafkaSourceProvider无法实例化

    我正在开发一个流项目 其中有一个 ping 统计数据的 kafka 流 如下所示 64 bytes from vas fractalanalytics com 192 168 30 26 icmp seq 1 ttl 62 time 0 9
  • python 脚本在 docker 内运行时无法导入 kafka 库 [重复]

    这个问题在这里已经有答案了 我有以下 python 脚本 可以从 twitter 中提取推文并将其发送到 kafka 主题 该脚本运行完美 但是当我尝试在 docker 容器内运行它时 它无法导入 kafka 库 它说 语法错误 语法无效
  • 通过API服务端点消费来自Kafka主题的消息

    目前 我有一个 API 服务端点 用 netcore6 C 编写 它将接受消息对象并将其保存到数据库 然后将该消息发布到 kafka topic 2 如何利用我的 API 服务端点始终监听 观看并连接到 kafka topic 1 一旦新消
  • 卡夫卡高级消费者 error_code=15

    当尝试使用高级消费者 使用全新的消费者组 从 Kafka 进行消费时 消费者永远不会开始运行 当我将日志记录级别切换为调试时 我可以看到以下两行一遍又一遍地重复 DEBUG AbstractCoordinator 09 43 51 192
  • 如何连接Kafka和Elasticsearch?

    我是Kafka的新手 我使用kafka通过logstash收集netflow 可以 并且我想将数据从kafka发送到elasticsearch 但是存在一些问题 我的问题是如何将 Kafka 与 Elasticsearch 连接起来 net
  • 带有 Kafka 消费者的 Spring Boot 作业调度程序

    我正在开发一个 POC 我想使用来自 Kafka 主题 用户 的消息 尝试实现消费者应该从 Kafka 主题读取消息 一旦 spring boot 调度程序在预定时间或 cron 时间触发 那么我们应该开始从 kafka 主题中一一消费现有
  • 具有替代方案的重载方法值表

    我有编译器抱怨的以下代码 val state KTable String String builder table BARY PATH Materialized as PATH STORE 错误信息 error home developer
  • 如何使用 haproxy 负载均衡器 Kafka Bootstrap?

    我有一个 kafka 集群 由 3 台在 AWS 上运行的机器组成 卡夫卡1到卡夫卡3 我正在使用新型卡夫卡消费者 gt 0 8 我知道kafka客户端连接到其中一台kafka服务器 获取服务器元数据 然后直接连接到代理 我想确保在代理发生
  • 由于 jaas.conf 不正确而导致 Kafka TopicAuthorizationException

    我指的是JAAS登录配置文件 https docs oracle com javase 7 docs technotes guides security jgss tutorials LoginConfigFile html 它讨论了两种指
  • Spring Kafka MessageListenerContainer

    我看到 spring Kafka 代码 我有一些疑问 如果我们使用 1 个 kafkaListener 和 2 个主题 那么 spring Kafka 将创建一个 MessageListenerContainer 如果我为每个主题使用单独的
  • Kafka中如何使用事务以及如何使用abortTransaction?

    我是 kafka 新手 我使用 Kafka Producer Java api 面对Kafka的这个问题 Kafka Invalid transition attempted from state COMMITTING TRANSACTIO
  • 如何在kafka消费组中动态添加消费者

    我应该如何知道何时必须扩展消费者组中的消费者 当存在快速生产者时 消费者扩大规模的触发因素是什么 一种直接的方法是获取消费者延迟 这可以计算为提交的偏移量和开始偏移量之间的差值 如果最后 n 次计算的延迟正在增加 您可以扩大规模 反之亦然
  • Grafana/prometheus 中没有 kafka 指标

    我成功部署了 Helm Chart普罗米修斯操作员 https github com coreos prometheus operator tree master helm prometheus operator kube 普罗米修斯 ht
  • 无法初始化类 io.confluence.kafka.schemaregistry.client.rest.RestService

    我正在尝试使用 KafkaAvroSerialzer 设置一个卡夫卡生产者以获得价值 当 rit 尝试创建生产者时 我遇到了这个错误 我正在使用 confluence 5 2 1 中提供的所有罐子 java lang NoClassDefF
  • 我们如何读取给定时间范围内的Kafka主题?

    我需要读取 Kafka 主题中给定时间范围内的消息 我能想到的解决方案是首先找出时间范围开始的最大偏移量 然后继续消费消息 直到所有分区上的偏移量超过时间范围的末尾 有没有更好的方法来解决这个问题 谢谢 好吧 您肯定必须首先搜索适合时间范围
  • Apache Kafka 与 Apache Storm

    Apache Kafka 分布式消息系统Apache Storm 实时消息处理 我们如何在实时数据管道中使用这两种技术来处理事件数据 就实时数据管道而言 在我看来 两者的工作都是相同的 我们如何在数据管道上使用这两种技术 您可以使用 Apa
  • 事务性 Kafka 生产者

    我正在尝试让我的卡夫卡生产者具有事务性 我正在发送 10 条消息 如果发生任何错误 则不应向 kafka 发送任何消息 即不发送或全部消息 我正在使用 Spring Boot KafkaTemplate Configuration Enab
  • Kafka 主题删除不起作用

    我使用的是 Kafka 0 8 2 版本 在开发过程中 我想我可能需要删除一个主题 所以我所做的是将以下行放入服务器配置文件中并启动两个 kafka 服务器 delete topic enable true 当我需要删除一个主题并运行以下命
  • 如何更改主题的起始偏移量?

    是否可以更改新主题的起始偏移量 我想创建一个新主题并从偏移量开始阅读10000 How 自从卡夫卡0 11 0 0 https issues apache org jira browse KAFKA 4743你可以使用脚本kafka con
  • 在spark-kafka中使用schema将ConsumerRecord值转换为Dataframe

    我正在使用 Spark 2 0 2 和 Kafka 0 11 0 并且 我正在尝试在火花流中使用来自卡夫卡的消息 以下是代码 val topics notes val kafkaParams Map String Object bootst

随机推荐

  • 使用文档片段真的能提高性能吗?

    我对 JS 的性能有疑问 比如说 我有下一个代码 var divContainer document createElement div divContainer id container var divHeader document cr
  • Elastic Beanstalk:Amazon Linux 2 平台上的日志任务自定义

    我想知道该怎么做日志任务定制 https docs aws amazon com elasticbeanstalk latest dg using features logging html health logs extend在新的 El
  • 如何查看定位服务是否开启?

    如何检查用户是否关闭了定位服务 这样我就可以提示他 她打开它才能使用我的应用程序 谢谢 The CLLocationManager提供类方法来确定位置服务的可用性 BOOL locationServicesEnabled for lt iO
  • 在 Visual Studio 中进行嵌入式代码开发(尤其是使用 C18 的 PIC)

    我使用 Visual Studio 编写桌面应用程序 我发现它非常用户友好且易于使用 如果可能的话 我还想在Visual Studio中编写嵌入式代码 例如 是否可以使用 C18 或任何其他类似的基于 C 的语言为 PIC18Fxxx 系列
  • javax.management.InstanceAlreadyExistsException:com.zaxxer.hikari:名称= dataSource,类型= HikariDataSource

    我怎么解决这个问题 哪个是最好的选择以及如何做到这一点 设置唯一的池名称 销毁之前的连接池 org apache catalina core ApplicationContext log Initializing Spring embedd
  • 检测unicode字符串中的非ascii字符[重复]

    这个问题在这里已经有答案了 给定一个文本文件 或 unicode 字符串 检测 ASCII 编码之外的字符的好方法是什么 我可以轻松地将每个字符迭代传递给ord 但我想知道是否有更有效 更优雅或更惯用的方法来做到这一点 这里的最终目标是编译
  • Ruby/Rails 中的夏令时开始和结束日期

    我正在开发一个 Rails 应用程序 我需要在给定特定偏移量或时区的情况下查找夏令时开始和结束日期 我基本上将从用户浏览器接收到的时区偏移保存在数据库中 3 5 并且我想在由于夏令时而改变时对其进行修改 I know Time实例变量有ds
  • 获取 OS X 中用户库文件夹的路径

    我需要打开一个 NSSavePanel 并将用户库文件夹作为目标文件夹 通常我会通过输入来做到这一点 Library in NSSavePanel beginSheetForDirectory 只要应用程序没有被沙箱化 这种方法就可以正常工
  • Android Studio 1.0.2 m2respository gradle问题

    使用Android Studio 1 0 2 并且强制使用Gradle 2 2 1 所有系统变量都是正确的 在新的更新中 旧版本的 gradle 和 m2repository 存在问题 我正在尝试导入 kickflip io android
  • 如何手动调用(查找)ReCaptcha Callback函数?

    我目前正在尝试验证码解决 并决定使用流行的 2captcha 服务来实现此目的 他们的方法是向他们发送验证码值 谷歌验证码密钥和站点线程 然后他们解决它并向我发回应该发送给谷歌的完成值 以检查验证码是否已解决 我被困在最后一步 使用返回的解
  • 包装 API 以支持依赖注入

    我正在与一个只有静态函数的 API 进行交互 并且无法打开和更改 public class WindowsNativeGraphAPI public static IEnumerable
  • 练习:网络爬虫 - 并发不起作用

    我正在经历 golang 之旅 并致力于最后的练习 以将网络爬虫更改为并行爬行而不是重复爬行 http tour golang org 73 http tour golang org 73 我所改变的只是抓取功能 var used make
  • Android Resources$NotFoundException:无法找到资源 ID

    我从 Firebase 收到一份活动报告 由于找不到我的资源而导致活动失败 我真的很困惑为什么找不到它 因为我相信所有文件都在正确的目录中 并且用户使用的是 Android v8 1 它并不古老 应该能够处理我认为有的东西自 v1 1 以来
  • 强制用户注销会话 PHP

    我似乎无法找到这个问题的直接答案 有没有办法强制登录用户注销 我的登录系统本质上只依赖于包含用户唯一 ID 存储在 mysql 数据库中 的会话 所以本质上只是 if isset SESSION user id echo You re lo
  • Delphi XE2:为什么 FireMonkey 应用程序是高清的?

    根据 Delphi XE2 的发行说明 FireMonkey可以创建高清应用程序 HD 代表高清晰度 为什么是高清 VCL应用程序不能像FireMonkey一样创建高清应用程序吗 这里是Firemonkey 的文档 http docwiki
  • 来自 post 请求的有效负载在 Node.js 函数中不可用

    我刚刚开始摆弄三个新的 对我来说 框架 产品 MongoDB NodeJS 和 AngularJS 我想要完成的是让一个简单的表单提交一个值并将该值写入数据库 我已经到了这样的地步 在我的 Angular 应用程序中使用 http post
  • jQuery 中的对象或方法链接如何工作?

    我不是问链接的适当语法是什么 我知道它可能是这样的 myDiv removeClass off addClass on 据我所知 链接是相对于其他著名框架的优势之一 有人可以向我解释一下链接在这里是如何工作的吗 如果您有一个具有某些方法的对
  • 参数“sectionGroupName”无效

    我正在尝试添加服务引用 然后收到此错误 参数 sectionGroupName 无效 参数名称 sectionGrouName 项目运行 Net 3 5 当我将项目升级到 Net 4 0 时 它就可以工作了 但这对我来说不是一个选择 因为其
  • 为什么按钮不绘制?

    我不明白为什么按钮不绘制在它之前工作的背景上 这不会显示错误 这是代码 gt 这段代码是错误的吗 我的问题是否可以重现 它可能在按钮的代码中 我将不胜感激 import pygame pygame init screen pygame di
  • Kafka服务器未远程连接zookeeper服务器

    我正在尝试将 kafka 服务器 在 Windows 系统上 连接到 Zookeeper 服务器 我面临着 Opening socket connection to server 10 160 10 25 10 160 10 25 2181