Briefly, this error occurs when Elasticsearch is unable to retrieve the total swap space size from the operating system. This could be due to insufficient permissions or an unsupported operating system. To resolve this issue, you can try running Elasticsearch with administrative privileges or check if your operating system is compatible with Elasticsearch. Alternatively, you can disable the swap space check by setting the ‘bootstrap.memory_lock’ to ‘false’ in the Elasticsearch configuration file. However, this might affect the performance of Elasticsearch.
This guide will help you check for common problems that cause the log ” exception retrieving total swap space size ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: monitor.
Log Context
Log “exception retrieving total swap space size” classname is OsProbe.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
logger.debug("OS reported a negative total swap space size [{}]"; mem); return 0; } return mem; } catch (Exception e) { logger.warn("exception retrieving total swap space size"; e); return 0; } } /**
[ratemypost]