elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.94k stars 24.74k forks source link

v8.1.3 first start get error #86169

Closed zhengpq closed 2 years ago

zhengpq commented 2 years ago

Elasticsearch Version

8.1.3

Installed Plugins

No response

Java Version

_bundled_12.0.1

OS Version

macOS 11.6.5

Problem Description

After installing elasticsearch-8.1.3 by default, the first time i start it, it get error, here it the step

install

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.1.3-darwin-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.1.3-darwin-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-8.1.3-darwin-x86_64.tar.gz.sha512 
tar -xzf elasticsearch-8.1.3-darwin-x86_64.tar.gz
cd elasticsearch-8.1.3/ 

the i start it by './bin/elasticsearch', here it the error:

[2022-04-26T14:46:02,864][INFO ][o.e.c.r.a.AllocationService] [PAKIZHENG-MC1] current.health="RED" message="Cluster health status changed from [YELLOW] to [RED] (reason: [auto-create])." previous.health="YELLOW" reason="auto-create"
[2022-04-26T14:46:08,247][INFO ][o.e.x.s.InitialNodeSecurityAutoConfiguration] [PAKIZHENG-MC1] HTTPS has been configured with automatically generated certificates, and the CA's hex-encoded SHA-256 fingerprint is [19b8c031af2445c81ad5deb72c711d8eaa8af3616cf600923f781eb1c4a1fd49]
[2022-04-26T14:46:08,249][INFO ][o.e.x.s.s.SecurityIndexManager] [PAKIZHENG-MC1] security index does not exist, creating [.security-7] with alias [.security]
[2022-04-26T14:46:08,258][INFO ][o.e.x.s.e.InternalEnrollmentTokenGenerator] [PAKIZHENG-MC1] Will not generate node enrollment token because node is only bound on localhost for transport and cannot connect to nodes from other hosts
[2022-04-26T14:46:08,287][INFO ][o.e.c.m.MetadataCreateIndexService] [PAKIZHENG-MC1] [.security-7] creating index, cause [api], templates [], shards [1]/[0]
[2022-04-26T14:46:08,318][INFO ][o.e.x.s.s.SecurityIndexManager] [PAKIZHENG-MC1] security index does not exist, creating [.security-7] with alias [.security]
[2022-04-26T14:47:08,337][ERROR][o.e.x.s.e.InternalEnrollmentTokenGenerator] [PAKIZHENG-MC1] Failed to create enrollment token when generating API key
org.elasticsearch.action.UnavailableShardsException: [.security-7][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[.security-7][0]] containing [index {[.security][jCCeZIABdRg8Rm5axM6d], source[{"doc_type":"api_key","creation_time":1650955568306,"expiration_time":1650957368306,"api_key_invalidated":false,"api_key_hash":"{PBKDF2}10000$0lEVux8SynUJ+aJpn/jjTCSgu8CxNJMkgs53ryIJ9Ho=$Fj+/xWmifb35DGvBQiHhqy8I4fxs/8WRVn5yh7PByP4=","role_descriptors":{"create_enrollment_token":{"cluster":["cluster:admin/xpack/security/enroll/kibana"],"indices":[],"applications":[],"run_as":[],"metadata":{},"type":"role"}},"limited_by_role_descriptors":{"superuser":{"cluster":["all"],"indices":[{"names":["*"],"privileges":["all"],"allow_restricted_indices":false},{"names":["*"],"privileges":["monitor","read","view_index_metadata","read_cross_cluster"],"allow_restricted_indices":true}],"applications":[{"application":"*","privileges":["*"],"resources":["*"]}],"run_as":["*"],"metadata":{"_reserved":true},"type":"role"}},"name":"enrollment_token_API_key_iyCeZIABdRg8Rm5axM6c","version":8010399,"metadata_flattened":null,"creator":{"principal":"_xpack_security","full_name":null,"email":null,"metadata":{},"realm":"__attach","realm_type":"__attach"}}]}] blocking until refresh]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retryBecauseUnavailable(TransportReplicationAction.java:1076) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.doRun(TransportReplicationAction.java:872) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$2.onTimeout(TransportReplicationAction.java:1031) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:345) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:263) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:651) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:717) [elasticsearch-8.1.3.jar:8.1.3]
    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-04-26T14:47:29,154][WARN ][o.e.c.r.a.DiskThresholdMonitor] [PAKIZHENG-MC1] high disk watermark [90%] exceeded on [G9KHpr4HSDSFl6pa1uwWgg][PAKIZHENG-MC1][/Users/pakizheng/Work/elasticsearch/elasticsearch-8.1.3/data] free: 43.2gb[9.2%], shards will be relocated away from this node; currently relocating away shards totalling [0] bytes; the node is expected to continue to exceed the high disk watermark when these relocations are complete
[2022-04-26T14:47:32,914][ERROR][o.e.i.g.GeoIpDownloader  ] [PAKIZHENG-MC1] error downloading geoip database [GeoLite2-ASN.mmdb]
org.elasticsearch.action.UnavailableShardsException: [.geoip_databases][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[.geoip_databases][0]] containing [index {[.geoip_databases][GeoLite2-ASN.mmdb_0_1650955562338], source[n/a, actual length: [1mb], max length: 2kb]}]]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retryBecauseUnavailable(TransportReplicationAction.java:1076) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.doRun(TransportReplicationAction.java:872) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$2.onTimeout(TransportReplicationAction.java:1031) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:345) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:263) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:651) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:717) ~[elasticsearch-8.1.3.jar:8.1.3]
    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-04-26T14:47:38,325][ERROR][o.e.x.s.InitialNodeSecurityAutoConfiguration] [PAKIZHENG-MC1] Failed to generate credentials for the elastic built-in superuser
org.elasticsearch.action.UnavailableShardsException: [.security-7][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[.security-7][0]] containing [index {[.security][reserved-user-elastic], source[{"password":"W9dXVmw+FgJsNuA5m5vV","enabled":true,"type":"reserved-user"}]}] and a refresh]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retryBecauseUnavailable(TransportReplicationAction.java:1076) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.doRun(TransportReplicationAction.java:872) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$2.onTimeout(TransportReplicationAction.java:1031) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:345) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:263) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:651) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:717) [elasticsearch-8.1.3.jar:8.1.3]
    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) [?:?]

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Elasticsearch security features have been automatically configured!
✅ Authentication is enabled and cluster connections are encrypted.

❌ Unable to auto-generate the password for the elastic built-in superuser.

ℹ️  HTTP CA certificate SHA-256 fingerprint:
  19b8c031af2445c81ad5deb72c711d8eaa8af3616cf600923f781eb1c4a1fd49

❌ Unable to generate an enrollment token for Kibana instances, try invoking `bin/elasticsearch-create-enrollment-token -s kibana`.

ℹ️  Configure other nodes to join this cluster:
• On this node:
  ⁃ Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.
  ⁃ Uncomment the transport.host setting at the end of config/elasticsearch.yml.
  ⁃ Restart Elasticsearch.
• On other nodes:
  ⁃ Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[2022-04-26T14:48:33,421][ERROR][o.e.i.g.GeoIpDownloader  ] [PAKIZHENG-MC1] error downloading geoip database [GeoLite2-City.mmdb]
org.elasticsearch.action.UnavailableShardsException: [.geoip_databases][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[.geoip_databases][0]] containing [index {[.geoip_databases][GeoLite2-City.mmdb_0_1650955652921], source[n/a, actual length: [1mb], max length: 2kb]}]]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retryBecauseUnavailable(TransportReplicationAction.java:1076) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.doRun(TransportReplicationAction.java:872) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$2.onTimeout(TransportReplicationAction.java:1031) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:345) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:263) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:651) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:717) ~[elasticsearch-8.1.3.jar:8.1.3]
    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-04-26T14:48:59,164][WARN ][o.e.c.r.a.DiskThresholdMonitor] [PAKIZHENG-MC1] high disk watermark [90%] exceeded on [G9KHpr4HSDSFl6pa1uwWgg][PAKIZHENG-MC1][/Users/pakizheng/Work/elasticsearch/elasticsearch-8.1.3/data] free: 43.2gb[9.2%], shards will be relocated away from this node; currently relocating away shards totalling [0] bytes; the node is expected to continue to exceed the high disk watermark when these relocations are complete
[2022-04-26T14:49:33,935][ERROR][o.e.i.g.GeoIpDownloader  ] [PAKIZHENG-MC1] error downloading geoip database [GeoLite2-Country.mmdb]
org.elasticsearch.action.UnavailableShardsException: [.geoip_databases][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[.geoip_databases][0]] containing [index {[.geoip_databases][GeoLite2-Country.mmdb_0_1650955713423], source[n/a, actual length: [1mb], max length: 2kb]}]]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.retryBecauseUnavailable(TransportReplicationAction.java:1076) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.doRun(TransportReplicationAction.java:872) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) [elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$2.onTimeout(TransportReplicationAction.java:1031) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:345) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:263) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:651) ~[elasticsearch-8.1.3.jar:8.1.3]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:717) ~[elasticsearch-8.1.3.jar:8.1.3]
    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) [?:?]

i did not do any config, just start it by default

Steps to Reproduce

install elasticserach on Mac, then start it

Logs (if relevant)

No response

zhengpq commented 2 years ago
image

the java version of my mac

pquentin commented 2 years ago

Thanks very much for your interest in Elasticsearch.

This appears to be a user question, and we'd like to direct these kinds of things to the forums. If you can stop by there, we'd appreciate it. This allows us to use GitHub for verified bug reports, feature requests, and pull requests.

There's an active community in the forums that should be able to help get an answer to your question. As such, I hope you don't mind that I close this.

e3e6 commented 2 years ago

Got the same issue today

aniketdubey07 commented 7 months ago

@zhengpq Got he same issue. How did you solve this? @e3e6 How did you solve this?