kibana连接ES显示Cannot connect to the Elasticsearch clusterSee the Kibana logs for details and try reloa

首先你能看到我这篇文章,而且报错描述也一样,那么恭喜你就能解决这个问题!!!
在这里插入图片描述
是不是和你的一样!!!
在确认一下Kibana的日志信息!!!


{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["status","plugin:rollup@7.4.2","info"],"pid":6,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["status","plugin:remote_clusters@7.4.2","info"],"pid":6,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["status","plugin:cross_cluster_replication@7.4.2","info"],"pid":6,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["status","plugin:file_upload@7.4.2","info"],"pid":6,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["status","plugin:snapshot_restore@7.4.2","info"],"pid":6,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["info","monitoring","kibana-monitoring"],"pid":6,"message":"Starting monitoring stats collection"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["status","plugin:maps@7.4.2","info"],"pid":6,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["reporting","warning"],"pid":6,"message":"Generating a random key for xpack.reporting.encryptionKey. To prevent pending reports from failing on restart, please set xpack.reporting.encryptionKey in kibana.yml"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["status","plugin:reporting@7.4.2","info"],"pid":6,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["status","plugin:spaces@7.4.2","error"],"pid":6,"state":"red","message":"Status changed from yellow to red - [parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb]: [circuit_breaking_exception] [parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb], with { bytes_wanted=124171416 & bytes_limit=123273216 & durability=\"PERMANENT\" }","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["fatal","root"],"pid":6,"message":"{ [circuit_breaking_exception] [parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb], with { bytes_wanted=124171416 & bytes_limit=123273216 & durability=\"PERMANENT\" } :: {\"path\":\"/.kibana_task_manager\",\"query\":{},\"statusCode\":429,\"response\":\"{\\\"error\\\":{\\\"root_cause\\\":[{\\\"type\\\":\\\"circuit_breaking_exception\\\",\\\"reason\\\":\\\"[parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb]\\\",\\\"bytes_wanted\\\":124171416,\\\"bytes_limit\\\":123273216,\\\"durability\\\":\\\"PERMANENT\\\"}],\\\"type\\\":\\\"circuit_breaking_exception\\\",\\\"reason\\\":\\\"[parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb]\\\",\\\"bytes_wanted\\\":124171416,\\\"bytes_limit\\\":123273216,\\\"durability\\\":\\\"PERMANENT\\\"},\\\"status\\\":429}\"}\n    at respond (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)\n    at checkRespForFailure (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)\n    at HttpConnector.<anonymous> (/usr/share/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)\n    at IncomingMessage.wrapper (/usr/share/kibana/node_modules/elasticsearch/node_modules/lodash/lodash.js:4929:19)\n    at IncomingMessage.emit (events.js:194:15)\n    at endReadableNT (_stream_readable.js:1103:12)\n    at process._tickCallback (internal/process/next_tick.js:63:19)\n  status: 429,\n  displayName: 'TooManyRequests',\n  message:\n   '[parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb]: [circuit_breaking_exception] [parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb], with { bytes_wanted=124171416 & bytes_limit=123273216 & durability=\"PERMANENT\" }',\n  path: '/.kibana_task_manager',\n  query: {},\n  body:\n   { error:\n      { root_cause: [Array],\n        type: 'circuit_breaking_exception',\n        reason:\n         '[parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb]',\n        bytes_wanted: 124171416,\n        bytes_limit: 123273216,\n        durability: 'PERMANENT' },\n     status: 429 },\n  statusCode: 429,\n  response:\n   '{\"error\":{\"root_cause\":[{\"type\":\"circuit_breaking_exception\",\"reason\":\"[parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb]\",\"bytes_wanted\":124171416,\"bytes_limit\":123273216,\"durability\":\"PERMANENT\"}],\"type\":\"circuit_breaking_exception\",\"reason\":\"[parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb]\",\"bytes_wanted\":124171416,\"bytes_limit\":123273216,\"durability\":\"PERMANENT\"},\"status\":429}',\n  toString: [Function],\n  toJSON: [Function],\n  isBoom: true,\n  isServer: true,\n  data: null,\n  output:\n   { statusCode: 500,\n     payload:\n      { message: 'An internal server error occurred',\n        statusCode: 500,\n        error: 'Internal Server Error' },\n     headers: {} },\n  reformat: [Function],\n  [Symbol(SavedObjectsClientErrorCode)]: 'SavedObjectsClient/generalError' }"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["info","plugins-system"],"pid":6,"message":"Stopping all plugins."}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["info","plugins","data"],"pid":6,"message":"Stopping plugin"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["info","plugins","translations"],"pid":6,"message":"Stopping plugin"}
{"type":"log","@timestamp":"2020-07-14T12:37:18Z","tags":["info","plugins","security"],"pid":6,"message":"Stopping plugin"}

 FATAL  [circuit_breaking_exception] [parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb], with { bytes_wanted=124171416 & bytes_limit=123273216 & durability="PERMANENT" } :: {"path":"/.kibana_task_manager","query":{},"statusCode":429,"response":"{\"error\":{\"root_cause\":[{\"type\":\"circuit_breaking_exception\",\"reason\":\"[parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb]\",\"bytes_wanted\":124171416,\"bytes_limit\":123273216,\"durability\":\"PERMANENT\"}],\"type\":\"circuit_breaking_exception\",\"reason\":\"[parent] Data too large, data for [<http_request>] would be [124171416/118.4mb], which is larger than the limit of [123273216/117.5mb], real usage: [124171416/118.4mb], new bytes reserved: [0/0b], usages [request=0/0b, fielddata=1273/1.2kb, in_flight_requests=0/0b, accounting=29950/29.2kb]\",\"bytes_wanted\":124171416,\"bytes_limit\":123273216,\"durability\":\"PERMANENT\"},\"status\":429}"}

看看你的kibana中有没有图中圈起来的报错信息
在这里插入图片描述
问题分析!!!
这就是ES的容量不够导致的熔断,导致Kibana连接ES连接不上,但是这里单独使用Posman去测试ES居然是正常显示的!!!
在这里插入图片描述

解决方案
要么你自己想办法把ES的最大容量改大!
要么就重启ES改大容量

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 18
    评论
好的,下面是安装 ElasticsearchKibana,并且使用证书连接 Elasticsearch 的步骤: 1. 安装 Elasticsearch 执行以下命令: ``` sudo yum install -y java-1.8.0-openjdk-devel sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch sudo vi /etc/yum.repos.d/elasticsearch.repo ``` 在 elasticsearch.repo 文件中添加以下内容: ``` [elasticsearch-7.x] name=Elasticsearch repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md ``` 保存并退出文件,然后执行以下命令安装 Elasticsearch: ``` sudo yum install -y elasticsearch ``` 2. 配置 Elasticsearch 打开 Elasticsearch 配置文件 /etc/elasticsearch/elasticsearch.yml,设置以下参数: ``` cluster.name: my-cluster node.name: my-node-1 network.host: 0.0.0.0 http.port: 9200 xpack.security.enabled: true xpack.security.http.ssl.enabled: true xpack.security.http.ssl.key: /etc/elasticsearch/elasticsearch.key xpack.security.http.ssl.certificate: /etc/elasticsearch/elasticsearch.crt xpack.security.transport.ssl.enabled: true xpack.security.transport.ssl.key: /etc/elasticsearch/elasticsearch.key xpack.security.transport.ssl.certificate: /etc/elasticsearch/elasticsearch.crt ``` 保存并退出文件,然后执行以下命令启动 Elasticsearch: ``` sudo systemctl enable elasticsearch sudo systemctl start elasticsearch ``` 3. 安装 Kibana 执行以下命令: ``` sudo vi /etc/yum.repos.d/kibana.repo ``` 在 kibana.repo 文件中添加以下内容: ``` [kibana-7.x] name=Kibana repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md ``` 保存并退出文件,然后执行以下命令安装 Kibana: ``` sudo yum install -y kibana ``` 4. 配置 Kibana 打开 Kibana 配置文件 /etc/kibana/kibana.yml,设置以下参数: ``` server.port: 5601 server.host: "0.0.0.0" elasticsearch.hosts: ["https://localhost:9200"] elasticsearch.username: "kibana" elasticsearch.password: "kibanapassword" elasticsearch.ssl.certificateAuthorities: [ "/etc/kibana/ca.crt" ] elasticsearch.ssl.verificationMode: certificate ``` 保存并退出文件,然后执行以下命令启动 Kibana: ``` sudo systemctl enable kibana sudo systemctl start kibana ``` 5. 生成证书 执行以下命令生成证书: ``` cd /etc/elasticsearch sudo /usr/share/elasticsearch/bin/elasticsearch-certutil cert -out elasticsearch.zip sudo unzip elasticsearch.zip sudo mv elasticsearch /etc/kibana/ sudo chown -R kibana:kibana /etc/kibana/elasticsearch ``` 6. 配置权限 执行以下命令给 kibana 用户赋予访问 Elasticsearch 的权限: ``` sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto ``` 运行上述命令后,会生成一个密码列表,将其中的 kibana 用户的密码记录下来。 7. 配置防火墙规则 执行以下命令打开 5601 和 9200 端口: ``` sudo firewall-cmd --zone=public --add-port=5601/tcp --permanent sudo firewall-cmd --zone=public --add-port=9200/tcp --permanent sudo firewall-cmd --reload ``` 至此,ElasticsearchKibana 安装和配置完成,并且 Kibana 使用证书连接 Elasticsearch

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 18
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序员劝退师-TAO

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值