The textproc/elasticsearch5 port installs configuration files into /usr/local/etc/elasticsearch/, but the jvm.options there is ignored, JVM options cannot be configured as documented. The /usr/local/lib/elasticsearch/bin/elasticsearch shell script contains the following code section: if [ -z "$ES_JVM_OPTIONS" ]; then for jvm_options in "$ES_HOME"/config/jvm.options \ /etc/elasticsearch/jvm.options; do if [ -r "$jvm_options" ]; then ES_JVM_OPTIONS=$jvm_options break fi done fi ... which is looking for a file jvm.options in /etc/elasticsearch/, yet this options file is actually installed by the package in the directory /usr/local/etc/elasticsearch/ and is therefore being ignored.
A commit references this bug: Author: tj Date: Fri Dec 2 12:01:13 UTC 2016 New revision: 427553 URL: https://svnweb.freebsd.org/changeset/ports/427553 Log: * Update to 5.0.2 * Fix using jvm.options file * Add errors to rc script when using legacy rc.conf options PR: 214572, 214983 Submitted by: purpleritza@gmail.com Reported by: purpleritza@gmail.com, Mark.Martinec@ijs.si Changes: head/textproc/elasticsearch5/Makefile head/textproc/elasticsearch5/distinfo head/textproc/elasticsearch5/files/elasticsearch.in head/textproc/elasticsearch5/files/patch-bin_elasticsearch head/textproc/elasticsearch5/files/patch-bin_elasticsearch.in.sh head/textproc/elasticsearch5/files/patch-config_elasticsearch.yml head/textproc/elasticsearch5/pkg-plist