问题复现

[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. vue创建项目的命令

    一.首先下载node环境 二.全局安装vue-cli cnpm i -g @vue/cli 这里一定要注意是vue/cli,而不是vue-cli 三.新建文件夹,打开cmd命令 1.vue creat ...

  2. js 数组对象中每一项对象属性比较大小与计算数组对象属性和

    // 数组对象排序方法   export function compare(property) {       return function (a, b) {         const value ...

  3. AXI4_LITE总线vivado2019.1官方模板源码(verilog实现)

    AXI lite总线读写时序 1. AXI_SLAVE源码 `timescale 1 ns / 1 ps module myip_v1_0_S00_AXI # ( // Users to add pa ...

  4. 如何找到并使用makecert.exe

    如果安装visual studio 后,visual studio command  仍然无法识别 makecert.exe 命令. 则需要手动安装 Windows Software Developm ...

  5. 面向对象ooDay7

    .精华笔记: 1)成员内部类: 应用率不高 1.1)类中套类,外面的称为外部类,里面的称为内部类 1.2)内部类通常只服务于外部类,对外不具备可见性 1.3)内部类对象通常在外部类中创建 1.4)内部 ...

  6. python——pkl文件

    pkl文件是python里面保存文件的一种格式,如果直接打开会显示一堆序列化的东西. cPickle在python3中更名为pickle 使用方式如下: import pickle as p shop ...

  7. oracle中的!=与<>和^=

    oracle中的!=与<>和^=!= . <>.^= 三个符号都表示"不等于"的意思,在逻辑上没有本质区别但是要主义的是三个符号在表达"不等于&q ...

  8. ASP.NET的MVC模式中分布页和布局页的使用

    大概描述一下,分布页是布局页的一部分,分布页就相当于小图标,布局页就相当于PPT模板,PPT模板可以加入一些小图标(分布页),你只需要改改内容就好,视图创建的时候要选择包含布局页的 首先,去Contr ...

  9. Eclipse's Patching Codes Automatically

    如何把等号左边的赋值等式补齐? 想把queryRunner.query(conn, sql,new BeanListHandler<>(type), params); 的等号左边代码(返回 ...

  10. 关于UPD章节学习的一些感想

    课程看到了UDP, 首先了解UDP的原理模型. 服务端,首先是实例QUdpSocket,也就是UDP套接字,然后,需要绑定.绑定一个任意IP地址,分为IPV4和IPV6.自行选择课程中讲解时绑定的是I ...