Can´t reach localhost:9200 - Received Plaintext http - Windows

Did anyone experience the same or has a soluation, what I am doing wrong? I am pretty new to elastic and propably it is easy to solve, but I am kind of at a loss here. I am unable to connect to http://localhost:9200 in the browser IE on OS Windows. It says: Can´t reach this page. The server has restricted/no internet access, does this might do a problem in this case?

cmd is giving me following while trying to connect in the browser via http://localhost:9200 :

[2022-03-02T21:01:32,788][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [SERVERADDRESSNAME] received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/127.0.0.1:9200, remoteAddress=/127.0.0.1:51875}

If I try in with curl this command shown in the install documentation:

curl --cacert C:\ElasticStack\elasticsearch-8.0.1\config\certs\http_ca.crt -u elastic https://localhost:9200

As Answer I am getting:

curl: (60) schannel: CertGetCertificateChain trust error CERT_TRUST_REVOCATION_STATUS_UNKNOWN
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

However if I am using curl with -k infront of the statement:

curl -k --cacert C:\ElasticStack\elasticsearch-8.0.1\config\certs\http_ca.crt -u elastic https://localhost:9200

I am getting in response the normal output, http://localhost:9200 in browser is still not working:

{
  "name" : "SERVERADRESSNAME",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "Ef3aQ3E3Q7-W6WbJaJVeXA",
  "version" : {
    "number" : "8.0.1",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "801d9ccc7c2ee0f2cb121bbe22ab5af77a902372",
    "build_date" : "2022-02-24T13:55:40.601285296Z",
    "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"
}

Side note: In Elasticsearch.yml I had in the beginning network.host: 192.168.0.1, I changed it to 127.0.0.1

Thank you in advance.

Welcome to our community! :smiley:

That means you need to use https instead of http in your URL. So try that.

Ok. I tried that. It allows me to download a json file, which I can see via notepad. With the wanted output.

However if I am running kibana I am getting in my cmd for Elasticsearch the same problem with closing the connection, every second.

[2022-03-03T09:45:36,958][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [SERVERADRESSNAME] received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/127.0.0.1:9200, remoteAddress=/127.0.0.1:63249}

My Kibana start output is: Do I need to install the plugin interactiveSetup or is something wrong with Elasticsearch?

C:\ElasticStack\kibana-8.0.1\bin>kibana.bat
[2022-03-03T09:52:04.645+01:00][INFO ][plugins-service] Plugin "metricsEntities" is disabled.
[2022-03-03T09:52:04.711+01:00][INFO ][http.server.Preboot] http server running at http://localhost:5601
[2022-03-03T09:52:04.750+01:00][INFO ][plugins-system.preboot] Setting up [1] plugins: [interactiveSetup]
[2022-03-03T09:52:04.753+01:00][INFO ][preboot] "interactiveSetup" plugin is holding setup: Validating Elasticsearch connection configuration…
[2022-03-03T09:52:04.790+01:00][INFO ][root] Holding setup until preboot stage is completed.


i Kibana has not been configured.

Go to http://localhost:5601/?code=087761 to get started.

Elasticsearch is installed with all security features enabled by default. So that means that HTTPS is enabled and authentication is enabled and you are shown the password, which I presume you know since you have managed to make calls to Elasticsearch as seen above.

The error you get when you run

curl --cacert C:\ElasticStack\elasticsearch-8.0.1\config\certs\http_ca.crt -u elastic https://localhost:9200

is not from Elasticsearch, but from curl (which is the tool that you use to make the request). It tells you that it cannot check Certificate revocation lists and this is probably because your windows host doesn't have network connectivity. Assuming this is a recent version of curl, you can use --ssl-revoke-best-effort so your command becomes

curl --cacert C:\ElasticStack\elasticsearch-8.0.1\config\certs\http_ca.crt --ssl-revoke-best-effort -u elastic https://localhost:9200

There is a message there that says:

Go to http://localhost:5601/?code=087761 to get started.

Did you do that ? This is all described in our docs, please read through this page and get back to us if you have additional issues

Yes, I know this.

I was able to reach the Link now. The main problem was, when I went to the Link, nothing happend. I got a blank page (IE). I installed Chrome now, so I was able to paste my enrollment-token. Needed to manually configure with Login of Kibana_system user as the button Configure Elastic ran into an yamlexeption.

At the moment I am getting some Errors for plugins. E.g. plugins.fleet TimeoutError: Request timed out at KibanaTransport.request. And plugins.taksManager. I am looking now why that is the case.

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