Cannot Open Shared Object File

(Colton) #1

I am trying to start Elasticsearch on a Linux machine and keep getting the response:

/opt/cust/suite/javabin/jre/bin/java: error while loading shared libraries: cannot open shared object file: No such file or directory

When I locate it shows it:

[serv_act@test1 bin]$ locate

Java home is set as well:

[serv_act@test1 bin]$ printenv JAVA_HOME

(Colton) #2

Does anyone from the Elastic team have any ideas?

(David Pilato) #3

Sounds like a bad installation of Java, may be...
Try to install a JDK instead of JRE in case it helps.

If you don't succeed, please share which exact OS and version you are using.

(Colton) #4

[osiserv_act@test1 ~]$ uname -a
Linux test1 2.6.32-696.10.2.el6.x86_64 #1 SMP Sun Sep 10 11:10:44 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

I previously had Elasticsearch running on the server with the Java version we have installed. The server was recently restarted and elasticsearch and elasticsearch-env no longer run. Both of them return with the same issue "error while loading shared libraries".

I am thinking that maybe there is environment variables that have been changed without my knowledge. Could this be possible? If so, what should they look like?


(David Pilato) #5

May be. I don't remember.

But now the question seems a bit quite different. You are not just starting Elasticsearch on a Linux machine but more you upgraded from version X to version Y and that does not work anymore. Am I right saying that?

(Colton) #6

No the version was not updated. The server was accidentally hard shut down while running the Elastic Stack (Elasticsearch, Logstash, Kibana). Upon powering it back up Elasticsearch produces the error message

(David Pilato) #7

I see.

I have no idea. How did you install elasticsearch the first time? Which package did you choose?
Which version it is?

(Colton) #8

I believe I downloaded the .tar package. I extracted the files to a folder and run the elasticsearch file from the bin folder. I never actually install it as a service for our use case.

We are using version Elastic Stack 6.2.3

(David Pilato) #9

That does not sound like a good way to install elasticsearch for something else than development.

May be do it again and try the 6.2.4 (which I don't believe will change anything).

(Colton) #10

We are still in the development stage of this project. If I may ask, why is this a bad idea?

Also, I upgraded to 6.2.4 and I am still running into the same issue.

(David Pilato) #11

Because you probably would like to run it as a service.
So install it with all the builtin startup/stop scripts.
Deb or rpm depending on your system.

(Colton) #12

I am trying to implement it into my software tree and keep all of the Elastic stack files in one location instead of having them install to predetermined locations.

(David Pilato) #13

Can you then just do a simple test?

Download the zip version from
Unzip it anywhere in a tmp dir
Then just run


(Colton) #14

Just ran it and still have the same issue

(David Pilato) #15

Can you run:

/opt/cust/suite/javabin/jre/java -version

(Colton) #16

After talking with someone internal we were able to solve the problem. This is how we did it:

  1. Added /opt/cust/suite/javabin/jre/lib/amd64, where is located, to /etc/
  2. Ran the command /sbin/ldconfig

@dadoonet You were correct that it was a broken Java. It must have broken in the restart/hard shutdown. Thank you for your help I appreciate it!

(system) #17

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