scan-and-scroll doesn't work from Docker with a ElasticSearch cluster placed outside

Currently I use Docker with an ElasticSearch cluster, which is placed outside the container.
From my docker I manage to create a mapping (so my ip it’s good), and I manage to launch simple request in python language.

def getBodyOfRoot(self, id):
        res = self.es.get(index=self.ES_Index, doc_type=self.ES_Type, id=id)
        return res['_source']

this example works well in my host AND in Docker.

  • Error when running retrain.py during retraining for image classifier based on tensorflow for poets
  • Oh My Zsh install in docker fail
  • Docker Hub - Automatic build on tag with regex match not triggered
  • Building docker image with angular 2, jupyter and typescript
  • Docker Registry and Basic Auth
  • Launching node docker container for debugging from VS Code
  • But when I launch my scan-and-scroll from Docker, I don’t get a response, but from my native OS, I get a response.

    If you have already met this problem, how did you manage to solve it ?

    Thanks in advance.

  • How to keep the docker container up and running?
  • Docker - increase size of the /dev/shm
  • How can I run specific android app automatically by using Docker?
  • Multiple instances of an application
  • How to connect to docker VM (MobyLinux) from windows shell?
  • checkCompilerOptions Error while installing package (littler/Docker)
  • One Solution collect form web for “scan-and-scroll doesn't work from Docker with a ElasticSearch cluster placed outside”

    Try to issue the scan and scroll from your Docker container using cURL:

    curl -XGET http://elastic-search-host:9200/my_index/_search?scroll=1m&search_type=scan&size=10 -d '
    {
        "query": {
            "match" : {
                "title" : "elasticsearch"
            }
        }
    }
    '
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.