Can systemctl start elasticsearch but not systemctl enable it

I guess this belongs here since i’m trying to get elasticsearch to start at boot. I get the following error when trying to enable elasticsearch. It starts without issue.

# systemctl enable elasticsearch.service 
Synchronizing state of elasticsearch.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable elasticsearch
ln -sf ../elasticsearch /etc/init.d/rc2.d/S50elasticsearch
ln: failed to create symbolic link '/etc/init.d/rc2.d/S50elasticsearch': No such file or directory

It’s the latest stable version. I had installed version 8.2 at first, but it was incompatible with nextcloud, so I had to purge that install and start over. I don’t know if the problem is related.

Name : elasticsearchEpoch : 0
Version : 7.17.3

Can anyone help with this?

It seems that this product is not from the standard openSUSE OSS repo.

It tries to use /etc/init.d/rc2.d which directory belongs to the old SystemV ways of doing (as the message also says). but in openSUSE that directory is no longer in use and most probably not available anymore.

In other words, your product is not up-to-date with the systemd way of working as used in openSUSE.
Maybe when you create that directory (as root of course), it might do something, but that then will of course be no guarantee for working in the future. It is then more a sort of by-pass.

This is what I suspected. Is there a good workaround? A startup script for the service or maybe a separate systemd service that just says “systemctl start elasticsearch”?

They have a nice installation page: Installing Elasticsearch on Linux Do these instructions work?

So, this happened. There is an executable “elastic search” in /etc/init.d/

I renamed it, ran “systemctl enable elastic search” , and then I restored the name and reboot. The service started and is running without issue.
???

Most people do not like this sort of conclusions without the real computer facts shown. In this case we would like to have seen

ls -l /etc/init.d

(or similar) with the full output. The more because the file name you use seems to contain a blank space, which is not a problem in itself, but often people have problems in handling this correct.

Thanks for the feedback. Users always may want to try first what the maintainers recommend and see whether it works.

Yes, but, “Elasticsearch” seems to be a product with a Server Side Public License (SSPL) – <https://en.wikipedia.org/wiki/Elasticsearch&gt; – meaning, it’s possibly commercial …

ls -l /etc/init.d/elasticsearch-rwxr-x--- 1 root root 3853 Apr 19 04:14 /etc/init.d/elasticsearch

The space is just from my auto type keyboard on my phone.

I’ll check out opensearch. If it can work as a drop in replacement with nextcloud then it sounds great.

And here a CR-LF is missing. :frowning:

But I hope you understand that we want copied/pasted code whenever possible. Human typing is prone to confusing errors and the more when they use “imteligent” devices.

This is the problem in Chromium - there is no line break after the very first line when you paste text. One must always manually add it in the correct place. So basically with Chromium it is impossible to paste multiple lines verbatim.