Package Details: elasticsearch 8.17.0-1

Git Clone URL: https://aur.archlinux.org/elasticsearch.git (read-only, click to copy)
Package Base: elasticsearch
Description: Free and Open, Distributed, RESTful Search Engine
Upstream URL: https://www.elastic.co/elasticsearch/
Licenses: custom:Elastic-2.0
Conflicts: elasticsearch-bin, elasticsearch7
Provides: elasticsearch
Submitter: hashworks
Maintainer: ipaqmaster
Last Packager: ipaqmaster
Votes: 11
Popularity: 0.057494
First Submitted: 2022-01-08 16:30 (UTC)
Last Updated: 2024-12-12 16:50 (UTC)

Dependencies (2)

Required by (18)

Sources (9)

Latest Comments

« First ‹ Previous 1 .. 5 6 7 8 9 10 11 12 13 14 Next › Last »

HLFH commented on 2023-01-18 17:00 (UTC) (edited on 2023-01-18 17:01 (UTC) by HLFH)

@elitewurst I updated it to 8.6.0. Installation is now done with precompiled binaries from Elasticsearch itself to avoid overusing the resources and to avoid downtime.

elitewurst commented on 2023-01-18 08:09 (UTC) (edited on 2023-01-18 08:09 (UTC) by elitewurst)

Build fails because https://artifacts-snapshot.elastic.co/ml-cpp/8.5.3-SNAPSHOT/downloads/ml-cpp/ml-cpp-8.5.3-SNAPSHOT-deps.zip returns HTTP 404 not found.

The build error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':x-pack:plugin:ml:explodedBundlePlugin'.
> Could not resolve all task dependencies for configuration ':x-pack:plugin:ml:nativeBundle'.
   > Could not find org.elasticsearch.ml:ml-cpp:8.5.3.
     Searched in the following locations:
       - https://artifacts-snapshot.elastic.co/ml-cpp/8.5.3-SNAPSHOT/downloads/ml-cpp/ml-cpp-8.5.3-SNAPSHOT-deps.zip
     Required by:
         project :x-pack:plugin:ml

The latest ML-CPP release is 8.6.0. The working URL for the file is https://artifacts-snapshot.elastic.co/ml-cpp/8.6.0-SNAPSHOT/downloads/ml-cpp/ml-cpp-8.6.0-SNAPSHOT-deps.zip

(https://discuss.elastic.co/t/es-build-failure-resolve-all-task-dependencies/322823/2)

HLFH commented on 2022-12-29 18:33 (UTC) (edited on 2022-12-29 18:52 (UTC) by HLFH)

@aszswaz I cannot say gradle has been particularly stable with elasticsearch.
The PKGBUILD has been fixed. Thanks for your suggestions.

@mailme_gx the systemd unit has been updated regarding the timeout.

@gth gradle was updated then downgraded. Best to keep makedepends=('jdk17-openjdk') for the time being as you said :p
At least for elasticsearch 8.5.3 until gradle is updated again.

@chovy Fixed with the current update.

HLFH commented on 2022-12-29 18:24 (UTC)

I updated elasticsearch to 8.5.3 and I have fixed the PKGBUILD.

aszswaz commented on 2022-12-25 14:24 (UTC)

When I installed this package, I encountered two problems:

  1. Unable to run gradle with JDK 19
  2. A dependency of elasticsearch 8.5.2 needs to be downloaded from the elastic server, but the elastic server has no related resources
  3. In the script, the elasticsearch bundled JDK soft link was created incorrectly, and the soft link still points to JDK 17 instead of JDK 19.

I modified some scripts to temporarily solve the above problems:

# Maintainer: Gaspard d'Hautefeuille <gaspard@dhautefeuille.eu>
# Contributor: Justin Kromlinger <hashworks@archlinux.org>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Marcello "mererghost" Rocha <https://github.com/mereghost>

pkgname=elasticsearch
pkgver=8.5.3
pkgrel=1
pkgdesc="Distributed RESTful search engine built on top of Lucene"
arch=('x86_64')
url="https://www.elastic.co/products/elasticsearch"
license=('custom:SSPL+Elastic-2.0')
depends=('jdk19-openjdk' 'systemd' 'libxml2')
makedepends=('jdk17-openjdk')
source=(
  $pkgname-$pkgver.tar.gz::"https://github.com/elastic/elasticsearch/archive/v${pkgver}.tar.gz"
  elasticsearch.service
  elasticsearch@.service
  elasticsearch-keystore.service
  elasticsearch-keystore@.service
  elasticsearch-sysctl.conf
  elasticsearch-user.conf
  elasticsearch-tmpfile.conf
  elasticsearch.default
  remove-systemd-distribution-check.patch
  remove-systemd-package-check.patch
)
b2sums=('b058aea27dd2b3c8c072fe80d2d16102297efd3f684d88b9fd608d119dbaeff2dd2f961a4aa42c948bf66780a0b28f5fea65907804486eadedfbd02458670d79'
        'a3196d747b35510261d921996f3eb8ddcabf4d0093d36829d020722926a2b89588fd2e033bf0eecb21d8727fecac67465ee697bd009cab578f7e7e0d8429c0b2'
        'de3e45081e9f4d75c47b2d2ea4c9faabb0499153914c940faf055f34a823df1e4d244041520686fe6e6dabdb01520c3c48c9382613aeeadc3f5376bf0d1c367d'
        '48a332da75e1d8c7624a5948c4b145ad6ec6aca7ed2da31802920fa99490cc99a354e06d635b8937217404bcb99302f8d95b7af99d6af8e3227e39cdb80fa3cd'
        '91ca815aa29f619e74b8d735af234705aed7254e4ecdde5248ab2a971a6b13e4c3897ed54933b2d68d3f16c266cd20d6ce14377f988199c367c39b892ddf5bca'
        '5690e288a5d288931094db9e1532737b641d9852c2dc5cf45c2853e20c6ab013b1cf056f2cd325ad0703c2075dac7bd16c99c7f1ba202f5d94aac336508f7417'
        '21cc254940924675bd24e07f6af1f58c89530abfb075637279798bdbba80772c6a4659361e9e8e58a5b2a5ffb21e55e40c91a270ff10da5ab467f63ce34e9f76'
        'b54cc37b1e5b4f054fc14d3112bee2cbad1ba48f7f15364366473753767fa74f38874da35083f9f7d840286052d3da970cdcf509569aa8b5fff39e4941959678'
        'f346ba285e045e3982da1841adc8625ebf1a662882d20a7c69bd76911782e1bdf30883b16dffe32cd2355349738b9b6c275b9ff6b11dfdd7fd56b509bcd19c31'
        '67790af829e62fdb224b8725e64757c592d34690fd726a1ccd654621ccf973b732e1032bcd046c724ecd20ab5d0ba76067af081fdf483f87283df907fc8745f8'
        '1b03079b6937c9c2d5bf23f43a82870e38d62515e08a20f1300999c06fbe66deb8f3b8c6274807aa805cd464801cb56bf0aab356093319b89b2ceac08ed43ab9')

backup=('etc/elasticsearch/elasticsearch.yml'
        'etc/elasticsearch/log4j2.properties'
        'etc/elasticsearch/jvm.options'
        'etc/default/elasticsearch')

prepare() {
  cd $pkgname-$pkgver
  patch -Np1 -i "$srcdir"/remove-systemd-distribution-check.patch
  patch -Np1 -i "$srcdir"/remove-systemd-package-check.patch
}

build() {
  cd $pkgname-$pkgver
  export PATH=/usr/lib/jvm/`archlinux-java get`/bin:$PATH
  export GRADLE_OPTS="-Dbuild.snapshot=false -Dlicense.key=x-pack/plugin/core/snapshot.key"
  export JAVA_HOME='/usr/lib/jvm/java-17-openjdk'
  ./gradlew :modules:systemd:assemble
  ./gradlew :distribution:archives:linux-tar:assemble
}

package() {
  cd $pkgname-$pkgver

  install -dm755 "$pkgdir"/{usr/share,var/lib,var/log}/elasticsearch
  install -dm755 "$pkgdir"/usr/bin

  tar xf distribution/archives/linux-tar/build/distributions/elasticsearch-$pkgver-*linux-x86_64.tar.gz \
      --strip 1 -C "$pkgdir"/usr/share/elasticsearch
  rm -r "$pkgdir"/usr/share/elasticsearch/{jdk,logs}

  install -dm755 "$pkgdir"/etc
  echo 'xpack.security.enabled: false' >> "$pkgdir"/usr/share/elasticsearch/config/elasticsearch.yml
  echo 'path.data: /var/lib/elasticsearch' >> "$pkgdir"/usr/share/elasticsearch/config/elasticsearch.yml
  mv "$pkgdir"/usr/share/elasticsearch/config "$pkgdir"/etc/elasticsearch
  chmod 2750 "$pkgdir"/etc/elasticsearch

  for bin in "$pkgdir"/usr/share/elasticsearch/bin/*; do
    ln -sT /usr/share/elasticsearch/bin/$(basename $bin) "$pkgdir"/usr/bin/$(basename $bin)
  done

  ln -s /etc/elasticsearch "$pkgdir"/usr/share/elasticsearch/config
  ln -s /var/log/elasticsearch "$pkgdir"/usr/share/elasticsearch/logs
  ln -s /usr/lib/jvm/java-19-openjdk "$pkgdir"/usr/share/elasticsearch/jdk

  install -Dm644 "$srcdir"/elasticsearch.service "$pkgdir"/usr/lib/systemd/system/elasticsearch.service
  install -Dm644 "$srcdir"/elasticsearch@.service "$pkgdir"/usr/lib/systemd/system/elasticsearch@.service
  install -Dm644 "$srcdir"/elasticsearch-keystore.service "$pkgdir"/usr/lib/systemd/system/elasticsearch-keystore.service
  install -Dm644 "$srcdir"/elasticsearch-keystore@.service "$pkgdir"/usr/lib/systemd/system/elasticsearch-keystore@.service
  install -Dm644 "$srcdir"/elasticsearch-user.conf "$pkgdir"/usr/lib/sysusers.d/elasticsearch.conf
  install -Dm644 "$srcdir"/elasticsearch-tmpfile.conf "$pkgdir"/usr/lib/tmpfiles.d/elasticsearch.conf
  install -Dm644 "$srcdir"/elasticsearch-sysctl.conf "$pkgdir"/usr/lib/sysctl.d/elasticsearch.conf
  install -Dm644 "$srcdir"/elasticsearch.default "$pkgdir"/etc/default/elasticsearch

  cp -r distribution/build/outputs/default/modules/systemd "$pkgdir"/usr/share/elasticsearch/modules/

  sed -i '2iJAVA_HOME=/usr/lib/jvm/default-runtime' "$pkgdir"/usr/share/elasticsearch/bin/elasticsearch-env
  sed -i 's/ES_BUNDLED_JDK=true/ES_BUNDLED_JDK=false/g' "$pkgdir"/usr/share/elasticsearch/bin/elasticsearch-env

  install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

aszswaz commented on 2022-12-25 12:17 (UTC)

In the packaging script, there is a problem with one line of code:

ln -s /usr/lib/jvm/java-17-openjdk "$pkgdir"/usr/share/elasticsearch/jdk

JDK 19 is written in the dependency, and the path of JDK 19 should be "/usr/lib/jvm/java-19-openjdk"

mailme_gx commented on 2022-12-15 02:39 (UTC)

I can confirm to build the package I needed java-17-openJDK as the latest version (19) gave the same error.

I also upgraded to ES 8.5.3 and the service failed to start due to timeouts, I noticed the error

elasticsearch.service: Got notification message from PID 180914, but reception only permitted for main PID 180853

adding the below to the [Service] section of the file /usr/lib/systemd/system/elasticsearch.service resolved this and now its build and runs fine

NotifyAccess=all
TimeoutStartSec=60

Hope this helps.

gth commented on 2022-12-06 10:29 (UTC)

I had the same error with java-19-openjdk. For me it worked using the java-17-openjdk: sudo archlinux-java set java-17-openjdk

Maybe this has something to do with a missing gradle compatiblity with java-18-openjdk: https://github.com/gradle/gradle/issues/20372

At least on my machine it seems like gradle version 7.5.1 is used and this version should not be compatible with java-19 according to the upper link.

HLFH commented on 2022-12-05 10:45 (UTC) (edited on 2022-12-05 17:05 (UTC) by HLFH)

@chovy Did you try removing the cache? https://github.com/elastic/elasticsearch/issues/91264
Normally, the bug you are mentioning is no longer present in version 8.5.2.

chovy commented on 2022-12-04 12:41 (UTC)

Still getting it ith 19:

==> Starting build()...
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Could not open cp_settings generic class cache for settings file '/home/ettinger/.cache/yay/elasticsearch/src/elasticsearch-8.5.2/settings.gradle' (/home/ettinger/.gradle/caches/7.5.1/scripts/5to744it9kqg1iod85bp73rh8).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: elasticsearch