这是工作,谢谢。我遇到了一个不同的问题。ElasticSearch状态说它是活动的,但我不能连接在http://<publicip>:9200
。我的ElasticSearch日志没有显示任何问题。
这是我在另一个示例中使用的yaml文件:
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
node.data : true
network.host : 0.0.0.0
discovery.seed_hosts : []
cluster.initial_master_nodes : [10.50.11.77]
这是有尾巴的原木
tail -f /var/log/elasticsearch/elasticsearch.log
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
[2022-10-05T23:50:13,021][INFO ][o.e.i.g.DatabaseNodeService] [ip-10-50-11-77] retrieve geoip database [GeoLite2-Country.mmdb] from [.geoip_databases] to [/tmp/geoip-databases/vr34RjMDQHGmLx60I5HrCw/GeoLite2-Country.mmdb.tmp.gz]
[2022-10-05T23:50:13,031][INFO ][o.e.i.g.DatabaseNodeService] [ip-10-50-11-77] retrieve geoip database [GeoLite2-ASN.mmdb] from [.geoip_databases] to [/tmp/geoip-databases/vr34RjMDQHGmLx60I5HrCw/GeoLite2-ASN.mmdb.tmp.gz]
[2022-10-05T23:50:13,038][INFO ][o.e.i.g.DatabaseNodeService] [ip-10-50-11-77] retrieve geoip database [GeoLite2-City.mmdb] from [.geoip_databases] to [/tmp/geoip-databases/vr34RjMDQHGmLx60I5HrCw/GeoLite2-City.mmdb.tmp.gz]
[2022-10-05T23:50:13,234][INFO ][o.e.c.r.a.AllocationService] [ip-10-50-11-77] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[.ds-.logs-deprecation.elasticsearch-default-2022.10.05-000001][0]]]).
[2022-10-05T23:50:13,771][INFO ][o.e.i.g.DatabaseNodeService] [ip-10-50-11-77] successfully reloaded changed geoip database file [/tmp/geoip-databases/vr34RjMDQHGmLx60I5HrCw/GeoLite2-Country.mmdb]
[2022-10-05T23:50:13,906][INFO ][o.e.i.g.DatabaseNodeService] [ip-10-50-11-77] successfully reloaded changed geoip database file [/tmp/geoip-databases/vr34RjMDQHGmLx60I5HrCw/GeoLite2-ASN.mmdb]
[2022-10-05T23:50:14,877][INFO ][o.e.i.g.DatabaseNodeService] [ip-10-50-11-77] successfully reloaded changed geoip database file [/tmp/geoip-databases/vr34RjMDQHGmLx60I5HrCw/GeoLite2-City.mmdb]
这些是来自elasticsearch.log的日志。我不得不删除一些部分,但日志中没有错误或警告。
[2022-10-06T02:57:20,690][INFO ][o.e.n.Node ] [ip-10-50-11-77] node name [ip-10-50-11-77], node ID [vr34RjMDQHGmLx60I5HrCw], cluster name [elasticsearch], roles [transform, data_frozen, master, remote_cluster_client, data, ml, data_content, data_hot, data>
[2022-10-06T02:57:31,042][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [ip-10-50-11-77] [controller/83608] [Main.cc@122] controller (64 bit): Version 7.17.6 (Build ea0305ae2a3b09) Copyright (c) 2022 Elasticsearch BV
[2022-10-06T02:57:33,221][INFO ][o.e.x.s.a.s.FileRolesStore] [ip-10-50-11-77] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2022-10-06T02:57:34,785][INFO ][o.e.i.g.ConfigDatabases ] [ip-10-50-11-77] initialized default databases [[GeoLite2-Country.mmdb, GeoLite2-City.mmdb, GeoLite2-ASN.mmdb]], config databases [[]] and watching [/etc/elasticsearch/ingest-geoip] for changes
[2022-10-06T02:57:34,787][INFO ][o.e.i.g.DatabaseNodeService] [ip-10-50-11-77] initialized database registry, using geoip-databases directory [/tmp/geoip-databases/vr34RjMDQHGmLx60I5HrCw]
[2022-10-06T02:57:35,941][INFO ][o.e.t.NettyAllocator ] [ip-10-50-11-77] creating NettyAllocator with the following configs: [name=elasticsearch_configured, chunk_size=1mb, suggested_max_allocation_size=1mb, factors={es.unsafe.use_netty_default_chunk_and_page_size=>
[2022-10-06T02:57:36,004][INFO ][o.e.i.r.RecoverySettings ] [ip-10-50-11-77] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
[2022-10-06T02:57:36,089][INFO ][o.e.d.DiscoveryModule ] [ip-10-50-11-77] using discovery type [zen] and seed hosts providers [settings]
[2022-10-06T02:57:37,119][INFO ][o.e.g.DanglingIndicesState] [ip-10-50-11-77] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
[2022-10-06T02:57:38,593][INFO ][o.e.n.Node ] [ip-10-50-11-77] initialized
[2022-10-06T02:57:38,593][INFO ][o.e.n.Node ] [ip-10-50-11-77] starting ...
[2022-10-06T02:57:38,621][INFO ][o.e.x.s.c.f.PersistentCache] [ip-10-50-11-77] persistent cache index loaded
[2022-10-06T02:57:38,621][INFO ][o.e.x.d.l.DeprecationIndexingComponent] [ip-10-50-11-77] deprecation component started
[2022-10-06T02:57:38,828][INFO ][o.e.t.TransportService ] [ip-10-50-11-77] publish_address {10.50.11.77:9300}, bound_addresses {0.0.0.0:9300}
[2022-10-06T02:57:39,727][INFO ][o.e.b.BootstrapChecks ] [ip-10-50-11-77] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2022-10-06T02:57:39,783][INFO ][o.e.c.c.Coordinator ] [ip-10-50-11-77] cluster UUID [S6SmAd6RS0SIElyFlQi0WA]
[2022-10-06T02:57:39,990][INFO ][o.e.c.s.MasterService ] [ip-10-50-11-77] elected-as-master ([1] nodes joined)[{ip-10-50-11-77}{vr34RjMDQHGmLx60I5HrCw}{QEB_5uLmSHOn_og6WAgknw}{10.50.11.77}{10.50.11.77:9300}{cdfhilmrstw} elect leader, _BECOME_MASTER_TASK_, _FINISH_EL>
[2022-10-06T02:57:40,126][INFO ][o.e.c.s.ClusterApplierService] [ip-10-50-11-77] master node changed {previous [], current [{ip-10-50-11-77}{vr34RjMDQHGmLx60I5HrCw}{QEB_5uLmSHOn_og6WAgknw}{10.50.11.77}{10.50.11.77:9300}{cdfhilmrstw}]}, term: 26, version: 362, reason: P>
[2022-10-06T02:57:40,237][INFO ][o.e.h.AbstractHttpServerTransport] [ip-10-50-11-77] publish_address {10.50.11.77:9200}, bound_addresses {0.0.0.0:9200}
[2022-10-06T02:57:40,237][INFO ][o.e.n.Node ] [ip-10-50-11-77] started
[2022-10-06T02:57:40,889][INFO ][o.e.l.LicenseService ] [ip-10-50-11-77] license [08a72044-4aef-4bc8-98ff-e43192d4f9ab] mode [basic] - valid
[2022-10-06T02:57:40,891][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [ip-10-50-11-77] Active license is now [BASIC]; Security is disabled
[2022-10-06T02:57:40,891][WARN ][o.e.x.s.s.SecurityStatusChangeListener] [ip-10-50-11-77] Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/ref>
[2022-10-06T02:57:40,903][INFO ][o.e.g.GatewayService ] [ip-10-50-11-77] recovered [8] indices into cluster_state
[2022-10-06T02:57:42,827][INFO ][o.e.c.r.a.AllocationService] [ip-10-50-11-77] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[.ds-.logs-deprecation.elasticsearch-default-2022.10.05-000001][0]]]).
2条答案
按热度按时间1hdlvixo1#
你不能连接到
http://:9200
,你需要提供Elasticsearch正在运行的示例的IP,通过查看你的Elasticsearch yml,它看起来像你的IP是10.50.11.77
,所以你应该尝试http://0.50.11.77:9200
来访问你的Elasticsearch服务器。r8uurelv2#
我通过将AWS安全组源代码更改为
0.0.0.0/0
临时解决了这个问题,并通过更正我的安全组配置永久解决了这个问题。