我不能用GCE创造卡夫卡的主题
在GEC
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
aa@kafka-1-vm:~$ sudo systemctl restart kafka
aa@kafka-1-vm:~$ bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test_cdc
-bash: bin/kafka-topics.sh: No such file or directory
aa@kafka-1-vm:~$ kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --
topic test_cdc
Exception in thread "main" joptsimple.UnrecognizedOptionException: bootstrap-server 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.<init>(TopicCommand.scala:361)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:44)
at kafka.admin.TopicCommand.main(TopicCommand.scala) 发布于 2020-04-24 07:49:55
如果您使用的版本早于2.2,您应该使用“
命令应该是这样的: kafka-topics.sh -create --zookeeper localhost:2181 --复制因子1--分区1--主题test_cdc
在命令kafka-topics.sh之前-创建-引导-服务器本地主机:9092-复制因子1-分区1-主题test_cdc
发布于 2022-03-24 12:31:35
在最新版本kafka_2.12-3.1.0 (2022)中,在解压缩和设置属性和日志之后。将Kafka文件夹保存在C驱动器上,并始终以“以管理员身份运行”运行命令提示符。.bat文件用于windows
1号航站楼
C:\kafka\bin\windows>zookeeper-server-start.bat ....\config\zookeeper.properties
2号航站楼
C:\kafka\bin\windows>kafka-server-start.bat ....\config\server.properties
3号航站楼
C:\kafka\bin\windows>kafka-topics.bat -创建-主题tutorialGB -引导-服务器本地主机:9092
Created topic tutorialGB.
创建的主题清单
C:\kafka\bin\windows>kafka-topics.bat -列表-引导-服务器本地主机:9092
tutorialGB
https://stackoverflow.com/questions/57023480
复制相似问题