Error while loading shared libraries: libjli.so

When I try to start an instance of Elasticsearch 7, I get this error. Some backstory, I am running on port 443 instead of 9200. Previous versions worked fine after running sudo setcap 'CAP_NET_BIND_SERVICE=+eip' /usr/lib/jvm/default-java/bin/java. But it looks like elasticsearch 7 (when installed through apt-get) is running an internal version of java located /usr/share/elasticsearch/jdk/bin/java. Therefore running sudo setcap 'CAP_NET_BIND_SERVICE=+eip' /usr/share/elasticsearch/jdk/bin/java causes the error "/usr/share/elasticsearch/jdk/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory".

Seems to run fine when running on 9200, but I need it to run on 443.

Was able to figure it out.

Had to:
cd /etc/ld.so.conf.d/
sudo vim java.conf
and add /usr/share/elasticsearch/jdk/lib
sudo ldconfig

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.