Why doesn't Elasticsearch start after a proServer patch day?

The configuration files for Elasticsearch 7 are located in the /usr/local/etc/elasticsearch folder; those for Elasticsearch 5 are located in /usr/local/etc/elasticsearch5; and those for Elasticsearch 6 are located in /usr/local/etc/elasticsearch6.
By default on FreeBSD, the folders containing configuration files for programs belong to the "root" user and the "wheel" group.

When Elasticsearch starts for the first time after an update, it attempts to modify configuration entries automatically; however, it cannot do so if the directory is owned by “root.” As a result, the startup may fail.

In the case of Elasticsearch, it may be necessary and advisable to assign ownership of the configuration directories to the user under which Elasticsearch is running. Unless otherwise configured by the customer, this is the user “elasticsearch” in the “elasticsearch” group.

You can generally change the ownership of a folder using the command

chown -R <user>:<group> <folder>

In this case, the command might look like this:

chown -R elasticsearch:elasticsearch /usr/local/etc/elasticsearch

Changing ownership can have security implications. If you’re not entirely sure whether you should make this change, please feel free to contact us!