问题复现

[root@es2 tools]# ps -ef | grep elasticsearch
9200 22693 1 1 09:31 ? 00:04:54 /usr/bin/java -Xms16g -Xmx16g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/etc/elasticsearch -Des.distribution.flavor=default -Des.distribution.type=rpm -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid -d
9200 22718 22693 0 09:31 ? 00:00:00 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
root 24589 22397 0 14:22 pts/0 00:00:00 grep elasticsearch
[root@es2 ~]# cd /usr/share/elasticsearch/plugins/search-guard-6/tools/
[root@es2 tools]# ./sgadmin.sh \
> -cd ../sgconfig/ \
> -icl -nhnv -cacert /etc/elasticsearch/root-ca.pem \
> -cert /etc/elasticsearch/kirk.pem \
> -key /etc/elasticsearch/kirk-key.pem \
> --accept-red-cluster
WARNING: JAVA_HOME not set, will use /usr/bin/java
Search Guard Admin v6
Will connect to localhost:9300
ERR: Seems there is no Elasticsearch running on localhost:9300 - Will exit

解决方案

带上一个参数(-h):

-h <当前节点主机名>

./sgadmin.sh \
-h 172.15.3.17 \
-cd ../sgconfig/ \
-icl -nhnv -cacert /etc/elasticsearch/root-ca.pem \
-cert /etc/elasticsearch/kirk.pem \
-key /etc/elasticsearch/kirk-key.pem \
--accept-red-cluster
[root@es2 ~]# cd /usr/share/elasticsearch/plugins/search-guard-6/tools/
[root@es1 tools]# ./sgadmin.sh \
> -h 172.15.3.xx \
> -cd ../sgconfig/ \
> -icl -nhnv -cacert /etc/elasticsearch/root-ca.pem \
> -cert /etc/elasticsearch/kirk.pem \
> -key /etc/elasticsearch/kirk-key.pem \
> --accept-red-cluster
WARNING: JAVA_HOME not set, will use /usr/bin/java
Search Guard Admin v6
Will connect to 172.15.3.xx:9300 ... done
Elasticsearch Version: 6.4.1
Search Guard Version: 6.4.1-24.3
Connected as CN=kirk,OU=client,O=client,L=test,C=de
Contacting elasticsearch cluster 'elasticsearch' ...
Clustername: sdc_elastic
Clusterstate: GREEN
Number of nodes: 3
Number of data nodes: 3
searchguard index already exists, so we do not need to create one.
Populate config from /usr/share/elasticsearch/plugins/search-guard-6/sgconfig
Will update 'sg/config' with ../sgconfig/sg_config.yml
SUCC: Configuration for 'config' created or updated
Will update 'sg/roles' with ../sgconfig/sg_roles.yml
SUCC: Configuration for 'roles' created or updated
Will update 'sg/rolesmapping' with ../sgconfig/sg_roles_mapping.yml
SUCC: Configuration for 'rolesmapping' created or updated
Will update 'sg/internalusers' with ../sgconfig/sg_internal_users.yml
SUCC: Configuration for 'internalusers' created or updated
Will update 'sg/actiongroups' with ../sgconfig/sg_action_groups.yml
SUCC: Configuration for 'actiongroups' created or updated
Done with success

X 文献

[ElasticSearch]#解决问题#修改Search Guard密码时 报错:ERR: Seems there is no Elasticsearch running on localhost:9300 - Will exit的更多相关文章

  1. mysql忘记root密码或报错:ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘xx‘

    有的时候忘记了root密码或其他用户的密码,登录的时候报错:ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ' ...

  2. 密码正确 mysql无法登陆 red7.3 上安装mysql5.6后登录报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passswd :yes)

    集群需要mysql存储元数据,就在前几天还运行好好的,突然就进不去了......还是太菜,遇到的bug少. 引起这种故障的原因有很多......第一个坑比较多,大部分用户也就用第一个就可以解决问题,我 ...

  3. MySQL忘记密码,或:root密码重置报错:mysqladmin: connect to server at 'localhost' failed的解决方案

    MySQL root密码重置报错:mysqladmin: connect to server at 'localhost' failed的解决方案   1  登陆失败,mysqladmin修改密码失败 ...

  4. Linux下登陆MySQL时遇到报错"RROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) "

    前言 作者在2021-07-21时遇到 linux下登陆MySQL时遇到报错"RROR 1045 (28000): Access denied for user 'root'@'localh ...

  5. linux下, 再次遇到使用thinkphp的模板标签时,报错used undefined function \Think\Template\simplexml_load_string() 是因为没有安装 php-xml包

    linux下, 使用thinkphp的模板标签,如 eq, gt, volist defined, present , empty等 标签时, 报错: used undefined function ...

  6. WPF加载Winform窗体时 报错:子控件不能为顶级窗体

    一.wpf项目中引用WindowsFormsIntegration和System.Windows.Forms 二.Form1.Designer.cs 的 partial class Form1 设置为 ...

  7. mysql修改后启动my.cnf报错Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).

    mysql中文乱码解决 mysql修改my.cnf后启动报错Starting MySQL... ERROR! The server quit without updating PID file (/v ...

  8. mysql执行update报错 Err] 1055 - 'information_schema.PROFILING.SEQ' isn't in GROUP BY

    mysql执行update报错 Err] 1055 - 'information_schema.PROFILING.SEQ' isn't in GROUP BY 今天开发的同事发来如下错误信息,最最简 ...

  9. 当用命令导入csv文件时提示错误[Err] 1290 - The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

        安装之后没有my.ini配置文件怎么办,因为自己安装的是zip压缩版的mysql,所以再5.7之后就没有my.ini配置文件,所以有时候需要去自己创建一个叫my.ini的配置文件,但是特别 要 ...

  10. Vmware出现报错The VMware Authorization Service is not running.之后无法上网解决

    今天一大早开VMware,启动ubuntu时出现了报错The VMware Authorization Service is not running,服务Authorization没有运行. 这之前一 ...

随机推荐

  1. 线程池使用、countDownLatch、以及数据库批量插入 添加配置优化插入与计算

    //新建线程池ThreadPoolExecutor cpuThreadPoolExecutor = ThreadUtil.getCpuThreadPoolExecutor(); //使用Countdo ...

  2. python题mhy

    def save(s): f=open("test.txt","wt") f.write(s["name"]+"\n") ...

  3. 如何简单使用Git

    Git基本功能 Git基本功能 在具体介绍Git能做什么之前,先来了解下Git里的四个角色: workspace: 本地的工作空间. index:缓存区域,临时保存本地改动. local reposi ...

  4. linux 串口查看信息

    查看串口是否可用,可以对串口发送数据比如对com1口,echo helloworld >/dev/ttyS0 [root@H3LINUX90 ~]# echo helloworld >/d ...

  5. cadence-ADE反相器仿真

    Cadence-ADE仿真 连接电路 鼠标移至schematic绘制区域,单击放置inv i键继续添加gnd, vdc(3.3V), vpulse(0-3.3V,Period 1us,Pulse wi ...

  6. kvm虚拟机添加在线快照

    1-1.创建默认快照--一般为一串数字 virsh snapshot-create 虚拟机名称 1-2.创建自定义名称快照 virsh snapshot-create-as 虚拟机名称 快照名称 2. ...

  7. 3-XSS漏洞

    1.XSS原理 跨站脚本攻击是一种针对网站应用程序的安全漏洞攻击技术,是代码注入的一种.它允许恶意用户将代码注入网页,其他用户在浏览网页时会受到影响.恶意用户利用xss代码攻击成功后,可能得到很高的权 ...

  8. centos7搭建kafka

    一.安装 java8 yum install java-1.8.0-openjdk.x86_64 yum install java-1.8.0-openjdk-devel.x86_64 二.安装 Zo ...

  9. 泛型 ? extends E ? super E的区别

    package cn.itcast.generic; import java.util.ArrayList;import java.util.Collection; public class Supp ...

  10. 联想拯救者R9000P风扇拉满加强散热的方法

    管软可以开野兽模式,但是风扇还不是最猛的.锻炼的时候为了保护硬件,牺牲风扇和噪音吧,方法如下:下载 RWEverything运行RW.exe点击笔记本图标+EC文字的图案 修改:B0+0D对应的数据, ...