# What's the cause of this prob and what's the solution

**URL:** <https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086>\
**Category:** Elasticsearch\
**Created:** [August 28, 2022, 9:33am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086 "2022-08-28T09:33:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![morad\_della3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/morad_della3/32/101241_2.png) [@morad\_della3](https://discuss.elastic.co/u/morad_della3)\
**Post date:** [August 28, 2022, 9:33am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/1 "2022-08-28T09:33:24Z")

</div>

what's the cause of this prob and what's the solution when i want to create a token for kibana

```auto
ileged$0(SocketAccess.java:42) ~[?:?]
        at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]
        at org.elasticsearch.xpack.core.common.socket.SocketAccess.doPrivileged(SocketAccess.java:41) ~[?:?]
        at org.elasticsearch.xpack.core.security.CommandLineHttpClient.execute(CommandLineHttpClient.java:178) ~[?:?]
        at org.elasticsearch.xpack.core.security.CommandLineHttpClient.execute(CommandLineHttpClient.java:112) ~[?:?]
        at org.elasticsearch.xpack.security.tool.BaseRunAsSuperuserCommand.checkClusterHealthWithRetries(BaseRunAsSuperuserCommand.java:214) ~[?:?]
        at org.elasticsearch.xpack.security.tool.BaseRunAsSuperuserCommand.execute(BaseRunAsSuperuserCommand.java:127) ~[?:?]
        at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:54) ~[elasticsearch-8.4.0.jar:8.4.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:85) ~[elasticsearch-cli-8.4.0.jar:8.4.0]
        at org.elasticsearch.cli.Command.main(Command.java:50) ~[elasticsearch-cli-8.4.0.jar:8.4.0]
        at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:64) ~[cli-launcher-8.4.0.jar:8.4.0]

ERROR: Failed to determine the health of the cluster.

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 28, 2022, 10:16pm UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/2 "2022-08-28T22:16:53Z")

</div>

Please share more of the log, including the lines before and after this one.

---

<div class="post-metadata">

**Author:** ![morad\_della3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/morad_della3/32/101241_2.png) [@morad\_della3](https://discuss.elastic.co/u/morad_della3)\
**Post date:** [August 31, 2022, 8:51am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/3 "2022-08-31T08:51:27Z")

</div>

```auto
elastic@elastic:/usr/share/elasticsearch/bin$ sudo ./elasticsearch-create-enrollment-token -s kibana
08:48:22.547 [main] WARN org.elasticsearch.common.ssl.DiagnosticTrustManager - failed to establish trust with server at [192.168.43.147]; the server provided a certificate with subject name [CN=elastic], fingerprint [c15aa3d1e42222febed51b84f266dde2453738a9], no keyUsage and extendedKeyUsage [serverAuth]; the session uses cipher suite [TLS_AES_256_GCM_SHA384] and protocol [TLSv1.3]; the certificate has subject alternative names [DNS:localhost,IP:0:0:0:0:0:0:0:1,IP:127.0.0.1,IP:192.168.1.14,IP:fe80:0:0:0:20c:29ff:fe48:9b3e,DNS:elastic]; the certificate is issued by [CN=Elasticsearch security auto-configuration HTTP CA]; the certificate is signed by (subject [CN=Elasticsearch security auto-configuration HTTP CA] fingerprint [68ececcb9f792679272e9d8c6e2b0f5a1cca667e] {trusted issuer}) which is self-issued; the [CN=Elasticsearch security auto-configuration HTTP CA] certificate is trusted in this ssl context ([xpack.security.http.ssl (with trust configuration: Composite-Trust{JDK-trusted-certs,StoreTrustConfig{path=certs/http.p12, password=<non-empty>, type=PKCS12, algorithm=PKIX}})])
java.security.cert.CertificateException: No subject alternative names matching IP address 192.168.43.147 found
        at sun.security.util.HostnameChecker.matchIP(HostnameChecker.java:165) ~[?:?]
        at sun.security.util.HostnameChecker.match(HostnameChecker.java:101) ~[?:?]
        at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:452) ~[?:?]
        at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:426) ~[?:?]
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:238) ~[?:?]
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132) ~[?:?]
        at org.elasticsearch.common.ssl.DiagnosticTrustManager.checkServerTrusted(DiagnosticTrustManager.java:82) ~[?:?]
        at sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1335) ~[?:?]
        at sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1226) ~[?:?]
        at sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1169) ~[?:?]
        at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:396) ~[?:?]
        at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:480) ~[?:?]
        at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:458) ~[?:?]
        at sun.security.ssl.TransportContext.dispatch(TransportContext.java:201) ~[?:?]
        at sun.security.ssl.SSLTransport.decode(SSLTransport.java:172) ~[?:?]
        at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1505) ~[?:?]
        at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1420) ~[?:?]
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455) ~[?:?]
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426) ~[?:?]
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:578) ~[?:?]
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183) ~[?:?]
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:142) ~[?:?]
        at org.elasticsearch.xpack.core.common.socket.SocketAccess.lambda$doPrivileged$0(SocketAccess.java:42) ~[?:?]
        at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]
        at org.elasticsearch.xpack.core.common.socket.SocketAccess.doPrivileged(SocketAccess.java:41) ~[?:?]
        at org.elasticsearch.xpack.core.security.CommandLineHttpClient.execute(CommandLineHttpClient.java:178) ~[?:?]
        at org.elasticsearch.xpack.core.security.CommandLineHttpClient.execute(CommandLineHttpClient.java:112) ~[?:?]
        at org.elasticsearch.xpack.security.tool.BaseRunAsSuperuserCommand.checkClusterHealthWithRetries(BaseRunAsSuperuserCommand.java:214) ~[?:?]
        at org.elasticsearch.xpack.security.tool.BaseRunAsSuperuserCommand.execute(BaseRunAsSuperuserCommand.java:127) ~[?:?]
        at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:54) ~[elasticsearch-8.4.1.jar:8.4.1]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:85) ~[elasticsearch-cli-8.4.1.jar:8.4.1]
        at org.elasticsearch.cli.Command.main(Command.java:50) ~[elasticsearch-cli-8.4.1.jar:8.4.1]
        at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:64) ~[cli-launcher-8.4.1.jar:8.4.1]

ERROR: Failed to determine the health of the cluster.

```

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 31, 2022, 9:07am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/4 "2022-08-31T09:07:44Z")

</div>

Have you got self-signed certificate?

---

<div class="post-metadata">

**Author:** ![morad\_della3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/morad_della3/32/101241_2.png) [@morad\_della3](https://discuss.elastic.co/u/morad_della3)\
**Post date:** [August 31, 2022, 9:09am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/5 "2022-08-31T09:09:27Z")

</div>

i don't know because i'am a new in elasticsearch but i know the certificates in elasticsearch are generated automatically in the elasticsearch.yml we find the xpack are true  
right?

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 31, 2022, 9:11am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/6 "2022-08-31T09:11:01Z")

</div>

Nope, certs are not generated automatically. You have to generate them or get from CA.  
Please share your `elasticsearch.yml` file (using \</\> tag).

---

<div class="post-metadata">

**Author:** ![morad\_della3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/morad_della3/32/101241_2.png) [@morad\_della3](https://discuss.elastic.co/u/morad_della3)\
**Post date:** [August 31, 2022, 9:12am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/7 "2022-08-31T09:12:45Z")

</div>

```auto
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: localhost
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# --------------------------------- Readiness ----------------------------------
# --------------------------------- Readiness ----------------------------------
#
# Enable an unauthenticated TCP readiness endpoint on localhost
#
#readiness.port: 9399
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 31-08-2022 07:24:55
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["elastic"]

# Allow HTTP API connections from anywhere
# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------

```

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 31, 2022, 9:18am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/8 "2022-08-31T09:18:35Z")

</div>

> [@morad\_della3](#):
>
> `#node.name: node-1`

This should be enabled and set with unique name for each node.

> [@morad\_della3](#):
>
> `network.host: localhost`

Here you should use your server IP address.

> [@morad\_della3](#):
>
> `#discovery.seed_hosts: ["host1", "host2"]`

Here should be your nodes addresses (or information about single node).

> [@morad\_della3](#):
>
> `http.host: 0.0.0.0`

Why?

> [@morad\_della3](#):
>
> ```auto
> xpack.security.http.ssl:
> enabled: true
> keystore.path: certs/http.p12
> 
> ```

> [@morad\_della3](#):
>
> ```auto
> xpack.security.transport.ssl:
> enabled: true
> verification_mode: certificate
> keystore.path: certs/transport.p12
> truststore.path: certs/transport.p12
> 
> ```

How did you get those \*.p12 files?  
[Docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/certutil.html) are here.

---

<div class="post-metadata">

**Author:** ![morad\_della3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/morad_della3/32/101241_2.png) [@morad\_della3](https://discuss.elastic.co/u/morad_della3)\
**Post date:** [August 31, 2022, 9:25am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/9 "2022-08-31T09:25:17Z")

</div>

for this i think that i'am in a single node i mean i installed elasticsearch and kibana to run in single node i don't need to did it

> [@morad\_della3](#):
>
> #node.name: node-1

and this there are automatically installed when i install elasticsearch i thnik that you don't know about the latest versions

> [@morad\_della3](#):
>
> ```auto
> xpack.security.http.ssl:
> enabled: true
> keystore.path: certs/http.p12
> 
> ```

> [@morad\_della3](#):
>
> ```auto
> xpack.security.transport.ssl:
> enabled: true
> verification_mode: certificate
> keystore.path: certs/transport.p12
> truststore.path: certs/transport.p12
> 
> ```

AND for this it's also automatically when i installed elasticsearch

> [@morad\_della3](#):
>
> http.host: 0.0.0.0

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 31, 2022, 9:30am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/10 "2022-08-31T09:30:30Z")

</div>

> [@morad\_della3](#):
>
> and this there are automatically installed when i install elasticsearch i thnik that you don't know about the latest versions

I don't understand what you write about.

> [@morad\_della3](#):
>
> AND for this it's also automatically when i installed elasticsearch

And you can't change those? That would be... well... interesting.

---

<div class="post-metadata">

**Author:** ![morad\_della3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/morad_della3/32/101241_2.png) [@morad\_della3](https://discuss.elastic.co/u/morad_della3)\
**Post date:** [August 31, 2022, 10:03am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/11 "2022-08-31T10:03:54Z")

</div>

you see i told you that the certificates are autmatically configured when i start elastic

> **[Start the Elastic Stack with security enabled automatically | Elasticsearch...](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-stack-security.html)**

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 31, 2022, 10:28am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/12 "2022-08-31T10:28:12Z")

</div>

It's going to be easier to assist you if you can keep the topic to the one subject. If you have fixed the disk space issue it would be easier to go to your other topic on the certificates.

---

<div class="post-metadata">

**Author:** ![morad\_della3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/morad_della3/32/101241_2.png) [@morad\_della3](https://discuss.elastic.co/u/morad_della3)\
**Post date:** [August 31, 2022, 10:32am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/13 "2022-08-31T10:32:13Z")

</div>

the disk space of yesterday i deleted the machines before i know the response from you today thanks but installed a new machine and i installed elastic and kibana and when i try to create token and also to change the password of elastic user i find this error i don't know what's the reason of it it's my first time when i see it i installed elastic before but i don't find it

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 28, 2022, 10:32am UTC](https://discuss.elastic.co/t/whats-the-cause-of-this-prob-and-whats-the-solution/313086/14 "2022-09-28T10:32:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
