I have noticed, that the freebsd port is outdated (8.11.3). The latest available release currently is 8.19.0. There is also an open issue regarding FreeBSD Support: https://github.com/elastic/elasticsearch/issues/131904#issuecomment-3149591132 8.18.0 had some changes which will actively prevent elasticsearch to start on unsupported platforms. Looks like they are willing to take a look at it. Let's hope they will fix it.
(In reply to vincent.jancso from comment #0) I implemented the missing NativeAccess functionality into Elasticsearch a few months ago. https://github.com/sarog/elasticsearch/ Currently the repository has the fixes applied on the 8.17 branch. I'm working on porting the fixes to 8.19 and 9.1 shortly. If you decide to try it out, you need to add the following properties in `jvm.options: -Des.nativelibs.path=/usr/local/lib -Dorg.elasticsearch.nativeaccess.enableVectorLibrary=false
For a quick overview of what changes/patches are needed: https://github.com/elastic/elasticsearch/compare/main...sarog:elasticsearch:freebsd The 8.19 branch has a few conflicts which I have resolved but not pushed yet. Currently running a test build in a VM before I publish the changes to the repository.
(In reply to Saro from comment #2) Wow, this was unexpected. Thank you for providing patches. I will give it a try once you got 8.19 up and running :-)
An update: I have moved my repository to a GitHub organization as I plan to upload a few more port projects, such as Elastic's machine learning (ml-cpp) library. New location: https://github.com/portsbuild/elasticsearch Currently, the 8.19.3 distribution is tagged and a binary artifact is readily available (built via GitHub Actions). It's understandable if one does not wish to download an unknown binary, so I will provide the building steps and a port Makefile in a follow-up comment (or see: https://github.com/sarog/freebsd-ports/tree/main/textproc/elasticsearch8). While I have successfully upgraded my ES nodes from 8.15.5 to 8.19.3, I strongly recommend testing this release before rolling out into production! Please note: if you are using Kibana, you may also need to update it to 8.19.x. The port is available here if you want to try it: https://github.com/sarog/freebsd-ports/tree/main/textproc/kibana8 Building Elasticsearch ---------------------- First, please review the code changes: https://github.com/elastic/elasticsearch/compare/v8.19.3...portsbuild:elasticsearch:v8.19.3 Once reviewed, you can build the FreeBSD package on any OS of your choice. When building on FreeBSD, I had to install java/openjdk versions 17 to 23 (inclusive). Running ES 8.19.3 requires openjdk 21+. **NOTE**: the following will build Elasticsearch with a TEST public key (the "license.key" property in the build command below). This means if you have a valid ES (e.g. Enterprise) license key, it will not work with this build. The solution is to build the package with Elastic's production public key, which is easily extracted from a 8.19.3 release (re: x-pack-core-8.19.3.jar). I will apply this change once I can confirm the build works. ## Install the necessary JDKs $ pkg install java/openjdk17 java/openjdk19 java/openjdk20 java/openjdk21 java/openjdk22 java/openjdk23 $ git clone --depth 1 --branch v8.19.3 https://github.com/portsbuild/elasticsearch elasticsearch-8.19.3 $ cd elasticsearch-8.19.3 $ ./gradlew distribution:archives:freebsd-tar:assemble -D"build.snapshot=false" -D"license.key=x-pack/license-tools/src/test/resources/public.key" -Porg.gradle.java.installations.paths=/usr/local/openjdk21,/usr/local/openjdk17,/usr/local/openjdk19,/usr/local/openjdk20,/usr/local/openjdk22,/usr/local/openjdk23 $ mv distribution/archives/freebsd-tar/build/distributions/elasticsearch-8.19.3-freebsd-x86_64.tar.gz /usr/ports/distfiles/ ## Apply the port patch (supplied in a follow-up comment). ## You may want to create a /usr/local/ports and extract the port patch there to avoid conflicts. $ cd /usr/ports/textproc/elasticsearch8 $ make makesum $ make reinstall clean If you are upgrading from a previous version, do not forget to update jvm.options with the properties mentioned in the previous post. On new installs, the port includes the necessary patches to update jvm.options for you. Update rc.conf with the following so ES uses JDK 21: elasticsearch_java_home="/usr/local/openjdk21" Upgrade docs from Elastic: https://www.elastic.co/docs/deploy-manage/upgrade/deployment-or-cluster/self-managed Next up: updating sysutils/beats8 and sysutils/logstash8
Created attachment 263889 [details] Elasticsearch 8.19.3
Created attachment 263987 [details] Elasticsearch 8.19.4 This build includes Elastic's public key, so commercial licenses should technically work (untested as I don't have an Enterprise license).
For Kibana 8.19.4, see bug #289759.
Created attachment 264413 [details] Elasticsearch 8.19.5 Update to 8.19.5
Created attachment 264852 [details] Elasticsearch 8.19.6
Created attachment 265336 [details] Elasticsearch 8.19.7 This release removes the 'shebangfix' from the Makefile as the changes are now done at the source level. FreeBSD test results are also available: https://github.com/portsbuild/elasticsearch/actions/workflows/freebsd-test.yml Currently, only 1 test out of ~500 is failing and I am unsure as to why (re: testSyncWithLinksThrowExceptionWhenDestinationIsNotWritable). Details here: https://github.com/portsbuild/elasticsearch/actions/runs/19247832419/job/55026096980#step:3:48545 Lastly, Elasticsearch 9.2 is now available at Bugfix #290954.
Created attachment 265338 [details] Elasticsearch 8.19.7_1 Forgot to update the PATH in the startup script so bash can be found via env.
Created attachment 265778 [details] patch to update to Elasticsearch 8.19.7_1 ^Triage: reformat as git diff.
(In reply to Mark Linimon from comment #12) FYI, ES 8.19.8 was just released by Elastic. I'll submit a diff patch later today after testing.
Created attachment 265852 [details] Elasticsearch 8.19.8 I hope this patch file format is acceptable!