I've been following both the short and long version of the documentation in installing Shield. However, I can't seem to be able to add any users as I'm getting the below error.
Error: Could not find or load main class org.elasticsearch.shield.authc.esusers.tool.ESUsersTool
Below are the exact steps I took in installing Shield
Created .profile file in home which included export ES_JAVA_OPTS="-Des.path.conf=/etc/elasticsearch"
Ran source .profile and verified the path by running echo $ES_JAVA_OPTS
Ran brew info elasticsearch and identified the ES home directory
In ES home, installed both the license and shield with commands bin/plugin -i elasticsearch/license/latest followed by bin/plugin -i elasticsearch/shield/latest
Restarted ES by first running brew info elasticsearch to get the commands to unload and reload ES
Opened localhost:9200 on my browser, authentication required
Ran bin/shield/esusers useradd admin -r admin to add and admin.
This was where I'm getting the mentioned error. Repeated this steps couple of times both on my Mac and Ubuntu. Not too sure where the problem is as my technical knowledge is quite limited plus there seem to be no such post about this particular error anywhere on google.
Is there a reason to use linuxbrew over the official elasticsearch debian repositories? I think you've got the installation steps correct to work with those packages on linux and on Mac, you could use the tar/zip file.
Just that early on, I was told that Homebrew makes installation much more easier. Thus, I just try to use Homebrew whenever possible. Didn't know that there would be inconsistency in installation.
I will try to study the ES formula and see if I can somewhat figure out where the libraries are located.
I manage to solve this problem, thus able to configure elasticserch and kibana with the shield plugin.
Linuxbrew was definitely the one messing up with the installations here. Stupid me for using that in Ubuntu.
So, what I did was uninstall the whole thing and install back elasticsearch & kibana using the apt-get command. From there it was all smooth sailing, referring to the documentation and some tutorials to get Shield running.
For me using Homebrew on Mac, the Shield plugins got installed in /usr/local/var/lib/elasticsearch/plugins, so I had to tweak the ES_CLASSPATH as follows:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.