Elasticsearch system will not start after Nextcloud Update

NethServer Version: 7.9
Module: Elasticsearch

After updating Nextcloud Elasticsearch will not start upon exciting the command " systemctl start elasticsearch" I get the following. " Job for elasticsearch.service failed because the control process exited with error code. See “systemctl status elasticsearch.service” and “journalctl -xe” for details."

““journalctl -xe”” outputs the following


Permission issue on /var/lib/elasticsearch/ or the nodes directory?



Hi Steve

You probably need to uninstall and reinstall the elasticsearch component - versions conflict!

It’s easily done:

/usr/share/elasticsearch/bin/elasticsearch-plugin remove ingest-attachment
/usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment

My 2 cents

Uninstalled the reinstalled no go still same result when trying to start elasticsearch

Post-hint: don’t use screenshot. Paste the output

like this
(</> button on the toolbar).
Less bytes, more readability :wink:


indent preformatted text by 4 spaces[root@wp-files ~]# service elasticsearch restart

Restarting elasticsearch (via systemctl): Job for elasticsearch.service failed because the control process exited with error code. See “systemctl status elasticsearch.service” and “journalctl -xe” for details.
[root@wp-files ~]#

Could this be a java permission issue when I ran the command to install ingest-attachment i got the following.
[=================================================] 100%
@ WARNING: plugin requires additional permissions @

  • java.lang.RuntimePermission accessClassInPackage.sun.java2d.cmm.kcms
  • java.lang.RuntimePermission accessDeclaredMembers
  • java.lang.RuntimePermission getClassLoader
  • java.lang.reflect.ReflectPermission suppressAccessChecks
  • java.security.SecurityPermission createAccessControlContext
    See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
    for descriptions of what these permissions allow and the associated risks.

Continue with installation? [y/N]y
→ Installed ingest-attachment
→ Please restart Elasticsearch to activate any plugins installed


Possible, depending on update level of the individual components…
I’ve had that error too, on occasions, but usually it will run through and the correct version is running later.

My 2 cents

Did you already check permissions?

ls -ld /var/lib/elasticsearch

ok I fixed that problem by running the following

yum remove elastisearch
rm -Rf /usr/share/elasticsearch
rm -Rf /var/lib/elasticsearch
yum -y install elasticsearch
systemctl start elasticsearch
systemctl enable elasticsearch

Elasticsearch starts and is now running however when I enter "sudo -u apache /opt/rh/rh-php73/root/usr/bin/php -d memory_limit=512M /usr/share/nextcloud/occ fulltextsearch:index
An unhandled exception has been thrown:
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
does anybody know a fix for this?

add the apc parameter to the php cli command -d apc.enable_cli=1

sudo -u apache /opt/rh/rh-php73/root/usr/bin/php -d memory_limit=512M -d apc.enable_cli=1 /usr/share/nextcloud/occ fulltextsearch:index

That did it thanks a bunch Marc