Error while installing Elasticsearch in Ubuntu 16.04


(John) #1

I got following error while installing Elasticsearch 5.4.0 from .deb file:

dpkg -i elasticsearch-5.4.0.deb

Selecting previously unselected package elasticsearch.
(Reading database ... 54562 files and directories currently installed.)
Preparing to unpack elasticsearch-5.4.0.deb ...
Unpacking elasticsearch (5.4.0) ...
Setting up elasticsearch (5.4.0) ...
Couldn't write '262144' to 'vm/max_map_count', ignoring: Permission denied
Couldn't write '1' to 'kernel/yama/ptrace_scope', ignoring: No such file or directory
Couldn't write '1' to 'kernel/kptr_restrict', ignoring: Permission denied
Couldn't write '1' to 'fs/protected_hardlinks', ignoring: No such file or directory
Couldn't write '176' to 'kernel/sysrq', ignoring: Permission denied
Couldn't write '1' to 'fs/protected_symlinks', ignoring: No such file or directory
dpkg: error processing package elasticsearch (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu17) ...
Errors were encountered while processing:
elasticsearch

Is this related with vm?


(Mark Walkom) #2

Are you running that command as root?


(John) #3

yes. by reading documentation we can skip it by setting environment variable

export ES_SKIP_SET_KERNEL_PARAMETERS=true

But I am not able to start elasticsearch now. It says

/etc/init.d/elasticsearch status

‚óŹ elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Wed 2017-05-24 05:52:41 EDT; 1min 46s ago
Docs: http://www.elastic.co
Process: 14790 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=killed, signal=KILL)
Process: 14787 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 14790 (code=killed, signal=KILL)

May 24 05:52:37 kibana systemd[1]: Starting Elasticsearch...
May 24 05:52:37 kibana systemd[1]: Started Elasticsearch.
May 24 05:52:41 kibana systemd[1]: elasticsearch.service: Main process exited, code=killed, status=9/KILL
May 24 05:52:41 kibana systemd[1]: elasticsearch.service: Unit entered failed state.
May 24 05:52:41 kibana systemd[1]: elasticsearch.service: Failed with result 'signal'.


(Mark Walkom) #4

Check the ES logs instead.


(John) #5

elasticsearch log is empty :frowning:


(John) #6

After increasing RAM to 4G I now see logs. It says:

bootstrap checks failed
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

I have inserted following to elasticsearch.yml

bootstrap.system_call_filter: false

but not working. After this I changed network.host to localhost instead of public ip, then it worked. But the actual problem is related with OpenVZ and vm.max_map_count size. This discussion is all over the github and didnt find any solution which worked.


(system) #7

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