本文介绍了无法在Shield Elasticsearch中添加管理员 - [错误]找不到或加载主类org.elasticsearch.shield.authc.esusers.tool.ESUsersTool的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试Shield作为我的Kibana和Elasticsearch的安全措施。在Mac OS X上运行10.9.5



遵循。管理安装盾。由于我的弹性搜索自动运行,我跳过步骤2(启动弹性搜索)。



对于第3步,我尝试添加一个管理员。在我的终端上执行以下命令。 bin / shield / esusers useradd admin -p password -r admin



不幸的是我收到这个错误。

以下是我采取的其他步骤。


  1. 双重检查
  2. 在添加用户之前手动启动弹性搜索

  3. 根据文档尝试了各种不同的命令。
    bin / shield / esusers useradd admin -r admin
    bin / shield / esusers useradd es_admin -r admin

  4. 使用sudo转发这些命令

生成相同的错误。似乎也不能在google上找到问题。

解决方案

必须重新启动节点,因为添加了新的Java类(来自Shield插件),Elasticsearch后面的JVM需要重新加载这些类。它只能在重新启动时才能执行此操作。



删除该过程并重新启动,或使用 curl -XPOSThttp:// localhost:9200 / _shutdown关闭集群。



此外,需要在集群中的所有节点上安装Shield插件。


I am trying out Shield as a security measure for my Kibana and Elasticsearch. Running on Mac OS X 10.9.5

Followed the documentation from Elastic. Managed to install Shield. Since my Elasticsearch is running automatically, I skipped step 2(start elasticsearch).

For step 3, I tried adding an admin. Ran this following command on my terminal. bin/shield/esusers useradd admin -p password -r admin.

Unfortunately I'm getting this error.

Below are the additional steps I took.

  1. Double checked that the bin/shield esusers path existed and all.
  2. Manually starting elasticsearch before adding users
  3. Tried a variety of different commands based on the documentation.bin/shield/esusers useradd admin -r admin andbin/shield/esusers useradd es_admin -r admin
  4. Ran those commands with sudo

Same error generated. Can't seem to find the problem on google as well. Not really sure what I'm missing here as the documentation seems pretty straightforward.

解决方案

You must restart the node because new Java classes were added to it (from the Shield plugin) and the JVM behind Elasticsearch needs to reload those classes. It can only do that if you restart it.

Kill the process and start it up again, or use curl -XPOST "http://localhost:9200/_shutdown" to shut the cluster down.

Also, the Shield plugin needs to be installed on all the nodes in the cluster.

这篇关于无法在Shield Elasticsearch中添加管理员 - [错误]找不到或加载主类org.elasticsearch.shield.authc.esusers.tool.ESUsersTool的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-20 16:19