Howto connect Kibana 8 with ES8?

Hello!
Es is running with:
128 [::ffff:127.0.0.1]:9200 : users:(("java",pid=43127,fd=463))
LISTEN 0 128 [::1]:9200 [::]:* users:(("java",pid=43127,fd=462))
LISTEN 0 128 [::ffff:14.168.178.75]:9300 : users:(("java",pid=43127,fd=459))

Is this OK? Do I connect Kibana to port 9200 oder 9300?

curl -k -XGET https://127.0.0.1:9200/_cluster/health?pretty=true
{
"error" : {
"root_cause" : [
{
"type" : "security_exception",
"reason" : "missing authentication credentials for REST request [/_cluster/health?pretty=true]",
"header" : {
"WWW-Authenticate" : [
"Basic realm="security" charset="UTF-8"",
"Bearer realm="security"",
"ApiKey"
]
}
}
],
"type" : "security_exception",
"reason" : "missing authentication credentials for REST request [/_cluster/health?pretty=true]",
"header" : {
"WWW-Authenticate" : [
"Basic realm="security" charset="UTF-8"",
"Bearer realm="security"",
"ApiKey"
]
}
},
"status" : 401
}

Which user?

Best
Edwin

now it works with -u elastic:password: status is green
(127.0.0.1:9200) with https

but I am getting: {"error":"no handler found for uri [/_xpack/security/_authenticate?pretty.]

Now I know, that kibana has to connect with port 9200, but only port 127.0.0.1 is listening ...

network.host: has no effect with ES 8.x?

What is the output of:

curl -u elastic:password https://localhost:9200/

{
"name" : "host1",
"cluster_name" : "cluster-one",
"cluster_uuid" : "qeIDf5-rTKeG9NMNFX-Raw",
"version" : {
"number" : "8.0.0",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "1b6a7ece17463df5ff54a3e135889aa1161",
"build_date" : "2022-02-03T16:47:57.507843096Z",
"build_snapshot" : false,
"lucene_version" : "9.0.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}

Are you able to run the same/similar command from the Kibana machine?
Also please use the latest 8.1.3.

no, because the ES host is only listening on localhost.
127.0.0.1:9200
kibana is running on a different host

Did you set network.host? What does your elasticsearch.yml file look like?

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

Yes, I set network.host

But the host is not listening on this IP, only 127.0.0.1

# ---------------------------------- Network -----------------------------------

# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:

network.host: 14.168.178.75 
#

http.port: 9200

[o.e.h.AbstractHttpServerTransport]: publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}

Did you restart the node?
Is that the full elasticsearch.yml file?

I had no changes to do. The rest is standard ... node name, path etc.
(my oldest es is version Elasticsearch-2.4.2) this one is listening to the public address)

the old one looks better:

tcp        0      0 49.42.145.147:9200      :::*                    LISTEN      1385/java
network.host: 14.168.178.75 seems to be not working with ES 8.0

Could you restart the Elasticsearch node?
And share the full logs here?

Are you sure you modified the right elasticsearch.yml file?

now port 9200 is accessible