Error: VM option 'UseG1GC' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
According to the error message, go to the kafka
decompression directory bin/kafka-run-class.sh
file, use vim
to open it, then use /UseG1GC
to search for this piece of configuration information, and delete this piece of configuration
After removing it, continue to restart kafka. If there is a similar problem, you can see if there is an abnormally similar configuration, you can try to delete it, and remember to save the backup.