The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,842 other followers

When the x86 Server JVM.DLL cannot be found

Posted by jpluimers on 2017/02/02

Searching for the below error message didn’t reveal useful results.

Error: missing `server' JVM at `C:\Program Files (x86)\Java\jre1.8.0_111\bin\server\jvm.dll'.
Please install or use the JRE or JDK that contains these missing components.

First the actual solution

[WayBackSetup Elasticsearch | Elasticsearch Reference [5.1] | Elastic provided this solution that was introduced in[WayBackSetup Elasticsearch | Elasticsearch Reference [5.0] | Elastic:

Elasticsearch ships with default configuration for running Elasticsearch on 64-bit server JVMs. If you are using a 32-bit client JVM, you must remove -server from jvm.options and if you are using any 32-bit JVM you should reconfigure the thread stack size from -Xss1m to -Xss320k.

I had a 32-bit JRE installation as browsers usually are 32-bit and that’s what my Java need originated from.

So I edited config\jvm.options with this change:

49a50,51
> ## see https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html
> ## prevent errors like Error: missing `server' JVM at `C:\Program Files (x86)\Java\jre1.8.0_111\bin\server\jvm.dll'.
51c53
< -server
---
> # -server

Note I left out the -Xss1m change out as that entry wasn’t present in config\jvm.options (which is odd, but hey: documentation is always behind on code).

In a server environment, I’d probably not run Elasticsearch on Windows but on Linux and there all my software is x64 so the error should not happen.

Solving the 2 gigabyte memory limit

Immediately after trying this, I got an error about memory size:

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

The reason is that in the same config\jvm.options file, elasticsearch reserves 2 gigabyte of heap space which on either experimental or 32-bit systems is an enormous amount of memory. So I made this change:

22,23c22,25
< -Xms2g
< -Xmx2g
---
> #-Xms2g
> #-Xmx2g
> -Xms1g
> -Xmx1g

Back to my search

The search for elasticsearch “Error: missing server' JVM atC:\Program Files (x86)\Java\” only revealed one result [WayBackSearch Lucene – pointing to [Archive.is as WayBack fails to saveES 5.0 Alpha 3 error on starting up engine – Elasticsearch – Discuss the Elastic Stack with this content:

I have installed ES 5.0.0 Alpha 3 and try to start it up. However, it gives me the following result.

Error: missing `server' JVM at `C:\Program Files (x86)\Java\jre1.8.0_91\bin\server\jvm.dll'.
Please install or use the JRE or JDK that contains these missing components.

It didn’t happen to my another version of ES. Is there any errors for it?

12 DAYS LATER

Hi,

does this work now? This seems to be a problem with Oracle JRE on Windows. The respective page6says:

    jre\bin\server\
        On Microsoft Windows platforms, the JDK includes both
        the Java HotSpot(TM) Server VM and Java HotSpot Client VM.
        However, the Java SE Runtime Environment for Microsoft Windows
        platforms includes only the Java HotSpot Client VM. Those wishing
        to use the Java HotSpot Server VM with the Java SE Runtime
        Environment may copy the JDKs jre\bin\server folder to a 
        bin\server directory in the Java SE Runtime Environment. Software
        vendors may redistribute the Java HotSpot Server VM with their
        redistributions of the Java SE Runtime Environment.

I suggest you just install a JDK. Then you should be fine (or you use the workaround they suggest).

Daniel

Or directly from the [WayBackJRE 8 README:

      bin\server\       On Microsoft Windows platforms, the JDK includes both
                        the Java HotSpot™ Server VM and Java HotSpot 
                        Client VM. However, the Java SE Runtime Environment 
                        for Microsoft Windows platforms includes only the 
                        Java HotSpot Client VM. Those wishing to use the 
                        Java HotSpot Server VM with the Java SE Runtime
                        Environment may copy the JDK's jre\bin\server folder 
                        to a bin\server directory in the Java SE Runtime 
                        Environment. Software vendors may redistribute the 
                        Java HotSpot Server VM with their redistributions of 
                        the Java SE Runtime Environment.

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: