Doute in Environement path

hi , due to system crash , i reinstall elastic search , elastic search wotking fine , when i try to reinstall shield i add in /etc/environemnt , export ES_JAVA_OPTS="-Des.path.conf=/etc/elasticsearch"
where my elasticsearch.yml file are located in /etc/elasticsearch and my elastic serach installed in /usr/share/elaastic search .

After restart elastic serach , when try to create user it shows the error
bash: bin/shield/esusers: Permission denied
in /etc/elastic search . no shiled folder and configuration missed ..
may i know where i did the mistake , my enviironemnt path setting is correct ?

Hi,

I have a few questions:

  1. Is the bin/shield/esusers script executable?
  2. Did you verify that the environment variable was set properly before installing Shield? You can check with echo $ES_JAVA_OPTS
  3. Does the user you ran bin/shield/esusers with have write permission on the /etc/elasticsearch directory?

Environment path echo $ES_JAVA_OPTS
-Des.path.conf=/etc/elasticsearch

Then , esusers are executable only , when i try to execute i got an error

./esusers

Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch/common/cli/CliTool
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.cli.CliTool
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358

i am running as root user only so problem in permission ...i have an doute that may be environment is correct and no shield folder found in /etc/elasticsearch

It looks like the Shield script is having issues finding the necessary classes. Does the /usr/share/elasticsearch/lib/elasticsearch-*.jar file exist?

yes .
elasticsearch-1.3.9.jar file available in /usr/share/elasticsearch/lib/

Otherwise , can i uninstall completely shield and reinstall it again ..can u give proper remove command and
environment path

Ok, the version of elasticsearch is probably the issue. Shield only works with Elasticsearch 1.4.2+ and I'd recommend moving to Elasticsearch 1.6 with Shield 1.3.

If you must use an older version of Elasticsearch, then Shield 1.1 is compatible with Elasticsearch 1.4.x.

ok , i have an doute ..i am using couchbase elasticsearch plugin 2.0 , wheather this support elastic search 1.4 ?

or

i am using elasticsearch 1.3 with couchbase plugin 2.0 , which version is shield compatibility for this ?

Are you using this plugin https://github.com/couchbaselabs/elasticsearch-transport-couchbase ? If so, then take a look at their readme, it describes the versions of elasticsearch that it is compatible with.

Also, Shield is not compatible with Elasticsearch 1.3.