📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 7.16-8.9

简而言之,当您使用的Java开发工具包(JDK)版本不支持线程分配内存时,会出现此错误。Elasticsearch使用此功能以获得更好的性能和内存管理。要解决此问题,您可以将JDK升级到支持线程分配内存的版本。或者,您可以在Elasticsearch中禁用线程分配内存的使用,但这可能会影响性能。最后,确保您的Elasticsearch和JDK版本兼容。

日志上下文 #

日志"thread allocated memory is not supported on this JDK"的类名是 HotThreads.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:

if (threadBean.isThreadCpuTimeSupported() == false) {
 throw new ElasticsearchException("thread CPU time is not supported on this JDK");
 }  if (type == ReportType.MEM && sunThreadInfo.isThreadAllocatedMemorySupported() == false) {
 throw new ElasticsearchException("thread allocated memory is not supported on this JDK");
 }  // Enabling thread contention monitoring is required for capturing JVM thread wait/blocked times. If we weren't
 // able to enable this functionality during bootstrap; we should not produce HotThreads reports.
 if (isThreadWaitBlockTimeMonitoringEnabled(threadBean) == false) {