[Troubleshoot] Elasticsearch Installation in LXC Ubuntu 16.04 Failed

Case: When installing elasticsearch 5.2.2 from its repo or .deb file on LXC Container Ubuntu 16.04, the installation doesn’t finished properly.

Output when installing:
Couldn't write '1' to 'kernel/yama/ptrace_scope', ignoring: Read-only file system
Couldn't write '1' to 'net/ipv4/tcp_syncookies', ignoring: No such file or directory
Couldn't write '65536' to 'vm/mmap_min_addr', ignoring: Read-only file system
Couldn't write '1' to 'fs/protected_symlinks', ignoring: Read-only file system
Couldn't write '1' to 'kernel/kptr_restrict', ignoring: Read-only file system
Couldn't write '176' to 'kernel/sysrq', ignoring: Read-only file system
Couldn't write '4 4 1 7' to 'kernel/printk', ignoring: Read-only file system
Couldn't write '262144' to 'vm/max_map_count', ignoring: Read-only file system
Couldn't write '1' to 'fs/protected_hardlinks', ignoring: 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 (1)

Why: During package install on systemd-based systems, The installation is try to set vm.max_map_count. On some systems (e.g., containers), users do not have the ability to tune these parameters from within the container. This commit provides an option for these users to skip setting such kernel parameters.

How to solve: Set variable

ES_SKIP_SET_KERNEL_PARAMETERS=true

in /etc/default/elasticsearch and execute

"apt install elasticsearch" or "dpkg -i elasticsearch-5.2.2.deb" again

Reference: https://github.com/elastic/elasticsearch/pull/21899

[Troubleshoot]Vagrant Guest Addition VirtualBox Not Sync with VirtualBox Version.

Case: When you try to execute vagrant up and the output there are warning like this:

The guest additions on this VM do not match the installed version of VirtualBox! 
In most cases this is fine, but in rare cases it can prevent things such as shared folders from working properly. 
If you see shared folder errors, please make sure the guest additions within the virtual machine match the version of VirtualBox you have installed on your host and reload your VM.
Guest Additions Version: 4.3.36
VirtualBox Version: 5.1

Why: Because guest additions version and virtualbox version is not match. (The warning have said that)

How to solve: Install Vbguest-plugin.
Go to your vagrant working directory and execute “vagrant plugin install vagrant-vbguest”

Reference: http://kvz.io/blog/2013/01/16/vagrant-tip-keep-virtualbox-guest-additions-in-sync/

[Troubleshoot] Operation not permitted in NFS Client

Case: When root is execute chown in mounting NFS directory and the result is “Operation not permitted”

Why: Because by default the root_squash export option is turned on, therefore NFS does not allow a root user from the client to perform operations as root on the server, instead mapping it to the user/group id specified by anonuid and anongid options (default=65534). This is configurable in /etc/exports together with other export options.

How to solve: Make sure the no_root_squash option in file configuration /etc/exports NFS Server is exist.

For example:
root@cloudxx:~# cat /etc/exports
# /etc/exports: the access control list for file systems which may be exported
# to NFS clients. See exports(5).
# Cloud XX
/share/backup-files 10.0.0.100(rw,sync,no_subtree_check,no_root_squash)

Reference: http://serverfault.com/questions/212178/chown-on-a-mounted-nfs-partition-gives-operation-not-permitted

openSUSE.Asia Summit 2016

Hello everyone.
So it’s been awhile since my last writing about my travel experience in Banyuwangi – Bali which there’s a final part that I don’t release yet. I apologize If there’s somebody waiting for it. But I’m sure nobody care about it haha.

Anyway, let me tell you another interesting story. It was started by the announcement that this year Indonesia will be the host of openSUSE.Asia Summit 2016. It’ll be held at Sunan Kalijaga State Islamic University in Yogyakarta, Indonesia on October 1st and 2nd, 2016.

Read more