问题复现

[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. daimayuan第三课(哈希,堆)

    1:哈希 建立:拉链法: a:数组 #include <bits/stdc++.h> using namespace std; const int md = 1e9; int h[1000 ...

  2. dpkt 简单应用

    import dpktfrom dpkt.utils import mac_to_str,inet_to_strcap=f'D:/test_pacp/6.pcap'with open(cap,'rb' ...

  3. js 获取html加载的参数?file=123&time=2021

    <script> function GetArgsFromHref(sHref, sArgName) { var args = sHref.split("?"); va ...

  4. 解决spring boot 2.6.4版本循环依赖问题

    引用spring boot 2.6.4 版本 报循环依赖错误 *************************** APPLICATION FAILED TO START ************* ...

  5. Java发送http请求携带token,使用org.nutz

    发送http请求,需要携带token数据,创建Header传输 Header header = Header.create(); header.set("Authorization" ...

  6. Android studio SDK配置

    因为两个月前装过一次Android studio,所以完全按教程走不通. 已有Android studio的情况下,先在configue下配置SDK的位置,这里可能会报一个错,platforms不存在 ...

  7. 03 docker容器镜像基础

    本章内容 1.docker镜像基础 2.docker环境下使用的文件系统 3.registry(仓库) 4.获取镜像 5.制作(生成)并上传镜像 --------------------------- ...

  8. .Net 5.0导出Execl的两种方式

    项目中经常会用到表格的导入导出今天来简绍一下我所了解的两种方式 1.拼接成表格的简单方式直接导出,服务器上不用安装其他程序 可以直接导出 public async Task<FileResult ...

  9. windows安装WinDump

    1.下载软件,放在C盘: WinDump.exehttps://www.winpcap.org/windump/install/default.htmWinPcap_4_1_3.exe(windows ...

  10. virsh虚拟机使用网桥来实现上网

    使用virsh-install安装虚拟机后,虚拟机不可以上网 第一步:主机上配置网桥 cp ifcfg-eno16777736    /tmp/ cp ifcfg-eno16777736  ifcfg ...