Bin/plugin Failing to find org.elasticsearch.plugins.PluginManager

After trying and failing to run elasticsearch/bin/plugin, which would fail
with this:

Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch
/plugins/PluginManager
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.plugins.
PluginManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.elasticsearch.plugins.PluginManager.
Program will exit.

I dug in to see what was being run by echoing the exec line at the end
of elasticsearch/bin/plugin. As a test, I decided to run a stripped down
version of the command, to see whether I could get the usage menu instead
of the error above. Here is the stripped down command:

/usr/bin/java -Xmx64m -Xms16m -Delasticsearch -Des.path.home=/var/local/elasticsearch
-classpath "/var/local/elasticsearch/lib/elasticsearch-0.19.11.jar" org.
elasticsearch.plugins.PluginManager

This command works fine on my linux machine, but not in my Mac vm, running
ubuntu 12.04. I cannot figure it out. This gist shows the command and the
output:

Amiri

--

Hi Amiri,

How did you install ES on your vm box? Also are you sure that
'/var/local/elasticsearch/lib/elasticsearch-0.19.11.jar' file exists?

Martijn

On 1 December 2012 13:28, Amiri Barksdale amiribarksdale@gmail.com wrote:

After trying and failing to run elasticsearch/bin/plugin, which would fail
with this:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/elasticsearch/plugins/PluginManager
Caused by: java.lang.ClassNotFoundException:
org.elasticsearch.plugins.PluginManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.elasticsearch.plugins.PluginManager.
Program will exit.

I dug in to see what was being run by echoing the exec line at the end of
elasticsearch/bin/plugin. As a test, I decided to run a stripped down
version of the command, to see whether I could get the usage menu instead of
the error above. Here is the stripped down command:

/usr/bin/java -Xmx64m -Xms16m -Delasticsearch
-Des.path.home=/var/local/elasticsearch -classpath
"/var/local/elasticsearch/lib/elasticsearch-0.19.11.jar"
org.elasticsearch.plugins.PluginManager

This command works fine on my linux machine, but not in my Mac vm, running
ubuntu 12.04. I cannot figure it out. This gist shows the command and the
output:

gist:a2c4ee4682d5ba7ab80d · GitHub

Amiri

--

--
Met vriendelijke groet,

Martijn van Groningen

--

On Monday, December 3, 2012 4:29:36 AM UTC-8, Martijn v Groningen wrote:

Hi Amiri,

How did you install ES on your vm box? Also are you sure that
'/var/local/elasticsearch/lib/elasticsearch-0.19.11.jar' file exists?

I installed elasticsearch by downloading the binaries from
http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz
and dropping them in /var/local/elasticsearch.

The file exists, and the directory contains

elasticsearch-0.19.11.jar
lucene-analyzers-3.6.1.jar
lucene-memory-3.6.1.jar
snappy-java-1.0.4.1.jar
jna-3.3.0.jar
lucene-core-3.6.1.jar
lucene-queries-3.6.1.jar
log4j-1.2.17.jar
lucene-highlighter-3.6.1.jar
sigar

and that command is only an attempt to force the issue after the normal way
of trying to install a plugin failed:

/var/local/elasticsearch/bin/plugin -install Aconex/elasticsearch-head

Running that command just above produced the same error as at the top of
this gist: https://gist.github.com/cf11a322b31e08d3fc9c

Amiri

--

What are the file permissions of the jars? Perhaps you installed as root
and are running as a different user. Not sure if a normal user can write
into /var/local on a Mac.

BTW, you should be using the forked repo mobz/elasticsearch-head.

Cheers,

Ivan

On Mon, Dec 3, 2012 at 9:45 AM, Amiri Barksdale amiribarksdale@gmail.comwrote:

On Monday, December 3, 2012 4:29:36 AM UTC-8, Martijn v Groningen wrote:

Hi Amiri,

How did you install ES on your vm box? Also are you sure that
'/var/local/elasticsearch/lib/**elasticsearch-0.19.11.jar' file exists?

I installed elasticsearch by downloading the binaries from
http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gzand dropping them in /var/local/elasticsearch.

The file exists, and the directory contains

elasticsearch-0.19.11.jar
lucene-analyzers-3.6.1.jar
lucene-memory-3.6.1.jar
snappy-java-1.0.4.1.jar
jna-3.3.0.jar
lucene-core-3.6.1.jar
lucene-queries-3.6.1.jar
log4j-1.2.17.jar
lucene-highlighter-3.6.1.jar
sigar

and that command is only an attempt to force the issue after the normal
way of trying to install a plugin failed:

/var/local/elasticsearch/bin/plugin -install Aconex/elasticsearch-head

Running that command just above produced the same error as at the top of
this gist: https://gist.github.com/cf11a322b31e08d3fc9c

Amiri

--

--