Skip to content

Elasticsearch 5 can't be installed in LXC #22340

@divanikus

Description

@divanikus

I'm trying to install elasticsearch 5.0.2 inside a priveleged LXC container. Install process fails with
Failed to write '262144' to '/proc/sys/vm/max_map_count': Read-only file system

Elasticsearch version: 5.0.x

JVM version: 8u111

OS version: Debian 8.6

Installing using dpkg fails with mentioned error. Can't be fixed with apt-get -f install. Package manager remains in failed state. Only option is to remove /usr/lib/sysctl.d/elasticsearch.conf and try to reconfigure package.
Error appears even if /proc/sys/vm/max_map_count is already set to 262144 (on the host system).

Steps to reproduce:

  1. Spin up a debian LXC container lxc-create -n debian -t debian -- -r jessie
  2. Install java
  3. dpkg -i elasticsearch-5.0.2.deb
    Provide logs (if relevant):

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up elasticsearch (5.0.2) ...
Failed to write '262144' to '/proc/sys/vm/max_map_count': Read-only file system
dpkg: error processing package elasticsearch (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions