GetFreeSwapSpaceSize is not available – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch is unable to retrieve the free swap space size, possibly due to the operating system’s restrictions or JVM settings. To resolve this issue, you can disable the use of swap space by setting bootstrap.memory_lock to true in the Elasticsearch configuration file. Alternatively, you can configure the JVM settings to allow Elasticsearch to access swap space information. Lastly, ensure that your operating system allows applications to access swap space information.

This guide will help you check for common problems that cause the log ” getFreeSwapSpaceSize is not available ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: monitor.

Log Context

Log “getFreeSwapSpaceSize is not available” classname is OsProbe.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

    /**
     * Returns the amount of free swap space in bytes.
     */
    public long getFreeSwapSpaceSize() {
        if (getFreeSwapSpaceSize == null) {
            logger.warn("getFreeSwapSpaceSize is not available");
            return 0;
        }
        try {
            final long mem = (long) getFreeSwapSpaceSize.invoke(osMxBean);
            if (mem 


 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?