I want to install elasticsearch on a vserver:
- virtuozzo container
- Ubunutu 16.04
When typing apt-get install elasticsearch, I've getting the following error message:
Selecting previously unselected package elasticsearch.
(Reading database ... 40410 files and directories currently installed.)
Preparing to unpack .../elasticsearch_5.5.0_all.deb ...
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Unpacking elasticsearch (5.5.0) ...
Processing triggers for systemd (229-4ubuntu17) ...
Setting up elasticsearch (5.5.0) ...
Job for systemd-sysctl.service failed because the control process exited with error code. See "systemctl status systemd-sysctl.service" and "journalctl -xe" for details.
dpkg: error processing package elasticsearch (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu17) ...
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've also tried installing with export SKIP_SET_KERNEL_PARAMETERS=true && apt-get install elasticsearch, but I got the same error message.
This is output of systemctl status systemd-sysctl.service:
● systemd-sysctl.service - Apply Kernel Variables
Loaded: loaded (/lib/systemd/system/systemd-sysctl.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-07-13 19:08:34 CEST; 5min ago
Docs: man:systemd-sysctl.service(8)
man:sysctl.d(5)
Main PID: 21550 (code=exited, status=1/FAILURE)
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '1' to 'fs/protected_hardlinks', ignoring: No such file or directory
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '1' to 'kernel/kptr_restrict', ignoring: Permission denied
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '262144' to 'vm/max_map_count', ignoring: Permission denied
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '176' to 'kernel/sysrq', ignoring: Permission denied
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '1' to 'fs/protected_symlinks', ignoring: No such file or directory
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '1' to 'kernel/yama/ptrace_scope', ignoring: No such file or directory
This is the (relevant!?) output of journalctl -xe:
Jul 13 19:16:18 h2707501.stratoserver.net groupadd[21716]: group added to /etc/group: name=elasticsearch, GID=117
Jul 13 19:16:18 h2707501.stratoserver.net groupadd[21716]: group added to /etc/gshadow: name=elasticsearch
Jul 13 19:16:18 h2707501.stratoserver.net groupadd[21716]: new group: name=elasticsearch, GID=117
Jul 13 19:16:18 h2707501.stratoserver.net useradd[21722]: new user: name=elasticsearch, UID=111, GID=117, home=/home/elasticsearch, shell=/bin/false
Jul 13 19:16:18 h2707501.stratoserver.net usermod[21727]: change user 'elasticsearch' password
Jul 13 19:16:18 h2707501.stratoserver.net chage[21732]: changed password expiry for elasticsearch
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '176' to 'kernel/sysrq', ignoring: Permission denied
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '1' to 'fs/protected_symlinks', ignoring: No such file or directory
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '262144' to 'vm/max_map_count', ignoring: Permission denied
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '1' to 'kernel/yama/ptrace_scope', ignoring: No such file or directory
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '1' to 'fs/protected_hardlinks', ignoring: No such file or directory
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '1' to 'kernel/kptr_restrict', ignoring: Permission denied
Any ideas? Thanks in advance!
You are facing this issue due to miss configured
dpkgPackage responsible for all kind of installations.It will clear all the repository data and you will be good to go.