I have an AWS MSK cluster up and running and an Amazon Linux 2 EC2 instance working as a client, with both Java 1.8 and Kafka installed via:
sudo yum install java-1.8.0
wget https://archive.apache.org/dist/kafka/2.2.1/kafka_2.12-2.2.1.tgz
tar -xzf kafka_2.12-2.2.1.tgz
Trying to create a test topic I navigate to the folder where I unpacked kafka, the contents of which are bin
, config
and libs
, and run this command:
sudo bin/kafka-topics.sh --create --zookeeper "MY_ZOOKEEPER_STRING" --replication-factor 3 --partitions 1 --topic testTopic
It outputs a warning and an error. The warning:
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
The error:
`Could not find or load main class kafka.admin.TopicCommand`
Any ideas as to what's happening? I have zero java knowledge so I know this mught sound trivial.
question from:
https://stackoverflow.com/questions/65835114/could-not-find-or-load-main-class-kafka-admin-topiccommand 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…