Home > OS >  Unable to cUrl docker container
Unable to cUrl docker container

Time:01-20

I am following the tutorial enter image description here

When I issue the cUrl on 127.0.0.2.9200, I see the response

curl 127.0.0.2:9200

StatusCode        : 200
StatusDescription : OK
Content           : {
                      "name" : "-dsoNEx",
                      "cluster_name" : "docker-cluster",
                      "cluster_uuid" : "UzUGppOxQ5ePcxLNB49HvA",
                      "version" : {
                        "number" : "6.3.2",
                        "build_flavor" : "default",
                        "build_type" : "ta...
RawContent        : HTTP/1.1 200 OK
                    Content-Length: 494
                    Content-Type: application/json; charset=UTF-8

                    {
                      "name" : "-dsoNEx",
                      "cluster_name" : "docker-cluster",
                      "cluster_uuid" : "UzUGppOxQ5ePcxLNB49HvA",
                      "vers...
Forms             : {}
Headers           : {[Content-Length, 494], [Content-Type, application/json; charset=UTF-8]}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 494

CodePudding user response:

Connecting to 0.0.0.0 does not make any sense, as it is not the address of your device. The 0.0.0.0:9200->9200/tcp output from docker means that the service is listening on all interfaces (i.e., 0.0.0.0). Thus you can connect via 127.0.0.1 or your public IP address from your network card, for instance.

  • Related