无法启动Zookeeper服务器 - Kafka安装程序

时间:2015-05-26 22:52:49

标签: apache-zookeeper apache-kafka

我正在尝试设置Kafka,参考apache kafka页面上的快速入门指南,并且在启动zookeeper服务器时它会陷入此步骤...如果有人可以帮助指导我如何启动zookeeper,我将不胜感激服务器

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="match_parent" >

<ImageView
    android:layout_width="match_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:src="@drawable/news_hockey2"
    android:adjustViewBounds="true" />

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:layout_weight="1"
    android:orientation="vertical" >

<TextView
    android:id="@+id/title"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:text="title"
    android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
    android:id="@+id/date_of_pub"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:text="date_of_pub"
    android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
    android:id="@+id/link"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="25dp"
    android:layout_marginTop="5dp"
    android:text="link"
    android:textAppearance="?android:attr/textAppearanceSmall" />

<TextView
    android:id="@+id/article"
    android:layout_width="match_parent"
    android:layout_height="fill_parent"
    android:layout_marginBottom="15dp"
    android:layout_marginTop="10dp"
    android:text="article"
    android:textAppearance="?android:attr/textAppearanceMedium" />

</LinearLayout>
</LinearLayout>

5 个答案:

答案 0 :(得分:12)

终端卡在该步骤实际意味着服务器正在运行。因此,虽然您可能认为自己收到了错误,但实际上意味着服务器已启动。

答案 1 :(得分:6)

我正在运行相同的设置。由于您已在该终端中打开端口,因此您可以继续执行其他终端的其余指令。您必须在整个设置中打开多个终端,最终将在一个终端(生产者)中输入消息,并看到它们出现在另一个终端(消费者)中。

答案 2 :(得分:2)

我的日志被困在这条线上,这意味着zookeper无法正常启动。我也无法开始卡夫卡。

0.0.0.0可能意味着有些事情是错误的。我在我的mac上更新了DHCP租约(系统首选项 - &gt;高级 - &gt; TCP / IP - &gt;续订DHCP租约),重新启动了zookeeper并开始工作。

答案 3 :(得分:0)

基于已发布的屏幕截图,以下内容表明Zookeeper正在端口2181上运行

[2015-05-26 15:41:39,235] INFO binding to port 0.0.0.0/0.0.0.0:2181

答案 4 :(得分:0)

似乎您已经成功启动了zookeeper服务器,但没有运行Kafka服务器,您正在尝试运行Kafka命令,并且由于您收到错误,代理不可用。

在 mac 中,在两个选项卡中运行以下两个命令: 启动动物园管理员:

<块引用>

zookeeper-start-server /usr/local/kafka/zookeeper.properties

启动kafka服务器:

<块引用>

kafka-server-start /usr/local/etc/kafka/server.properties

打开另一个终端并尝试 Kafka 命令,命令将正常运行

相关问题