kafka搭建报错01

搭建kafka后执行命令 

bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --opic-test

报错: 

[root@localhost kafka_2.11-2.2.0]# bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --opic-test
Exception in thread "main" joptsimple.UnrecognizedOptionException: topic-test is not a recognized option
	at joptsimple.OptionException.unrecognizedOption(OptionException.java:108)
	at joptsimple.OptionParser.handleLongOptionToken(OptionParser.java:510)
	at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:56)
	at joptsimple.OptionParser.parse(OptionParser.java:396)
	at kafka.admin.TopicCommand$TopicCommandOptions.(TopicCommand.scala:552)
	at kafka.admin.TopicCommand$.main(TopicCommand.scala:49)
	at kafka.admin.TopicCommand.main(TopicCommand.scala)

解决方案:

进入到kafka目录下执行如下命令
    mkdir zookeeper
  cd zookeeper 
  touch myid 
  echo 0 > myid 

 

你可能感兴趣的:(软件)