Kafka Unrecognized VM option 'PrintGCDateStamps'

前端 未结 7 1253
梦毁少年i
梦毁少年i 2021-02-02 12:12

I installed Kafka on a remote server, and when I tried to run

~/kafka/bin/zookeeper-server-start.sh ~/kafka/config/zookeeper.properties

And I r

相关标签:
7条回答
  • 2021-02-02 12:58

    I am using java 10 and kafka_2.11-0.10.1.0 and I had the same problem.I did not find JAVA_MAJOR_VERSION in the kafka-run-class.sh ,so I reviewed the error. It says "Unrecognized VM option 'PrintGCDateStamps'" This means, Java 10 GC related vm options are changed and Kafka configs are not compatible with it yet. This also confirms my thoughts.

    So switching to a Java version < 9 is one solution but if you want to keep using your new java version then instead of removing the whole line containing that parameter , you can remove the specified option. I did that and then "PrintGCTimeStamps" became a problem. I removed that also. So I ended up having the line below : KAFKA_GC_LOG_OPTS="-Xloggc:$LOG_DIR/$GC_LOG_FILE_NAME -verbose:gc -XX:+PrintGCDetails " So this will still print the GC details , but timestamp will not be specified. Zookeeper started without any problem!

    0 讨论(0)
提交回复
热议问题