INFO: os::commit_memory(X, X, 0) failed; error='Cannot allocate memory' (errno=12)


I'm trying to follow Google Cloud Storage Repository Plugin | Elasticsearch Plugins and Integrations [5.6] | Elastic and while executing command, I'm getting following error:

# docker exec -it elasticsearch bin/elasticsearch-plugin install repository-gcs
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007fc435200000, 22905094144, 0) failed; error='Cannot allocate memory' (errno=12)
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 22905094144 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /usr/share/elasticsearch/hs_err_pid1286.log

"workaround" is to restart container and then try again:

# docker-compose restart
Restarting elasticsearch13 ... done
# docker exec -it elasticsearch bin/elasticsearch-plugin install repository-gcs
-> Downloading repository-gcs from elastic
[=================================================] 100%?? 
@     WARNING: plugin requires additional permissions     @
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission setFactory
* java.lang.reflect.ReflectPermission suppressAccessChecks
** *:
** *:
for descriptions of what these permissions allow and the associated risks.

Continue with installation? [y/N]y
-> Installed repository-gcs

Is there a way to build repository-gcs elasticsearch plugin into image somehow? this way I won't have to repeat installation/configuration steps every time I have to take elasticsearch container down) or perhaps there a better way to handle this issue all together?

Please advise.


Install Elasticsearch with Docker | Elasticsearch Reference [5.6] | Elastic

# cat Dockerfile 
RUN bin/elasticsearch-plugin install repository-gcs
ADD X-X.json /
RUN bin/elasticsearch-keystore create
RUN bin/elasticsearch-keystore add-file gcs.client.default.credentials_file /X-X.json

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.