django elasticsearch error inside docker using docker-compose while building index











up vote
0
down vote

favorite












docker-compose.yml



version: "3"

services:
rango_api:
container_name: rango
build: ./
command: python manage.py runserver 0.0.0.0:8000
command: python manage.py search_index --rebuild
working_dir: /usr/src/rango_api
environment:
REDIS_URI: redis://redis:6379
ports:
- "8000:8000"
volumes:
- ./:/usr/src/rango_api
links:
- redis
- elasticsearch


#redis
redis:
image: redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- "6379:6379"

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.0
ports:
- "9200:9200"
- "9300:9300"


django settings.py elastic search connection



ELASTICSEARCH_DSL = {
'default': {
'hosts': 'elasticsearch:9200'
},
}


errors:



    rango            | Are you sure you want to delete the 'posts' indexes? [n/Y]: Traceback (most recent call last):
rango | File "manage.py", line 15, in <module>
rango | execute_from_command_line(sys.argv)
rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
rango | utility.execute()
rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
rango | self.fetch_command(subcommand).run_from_argv(self.argv)
rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
rango | self.execute(*args, **cmd_options)
rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
rango | output = self.handle(*args, **options)
rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 134, in handle
rango | self._rebuild(models, options)
rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 111, in _rebuild
rango | if not self._delete(models, options):
rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 100, in _delete
rango | "the '{}' indexes? [n/Y]: ".format(", ".join(index_names)))
rango | EOFError: EOF when reading a line


i am trying elastci search with django inside docker using docker-compose.
but in elastci search while building index it is asking yes or no.
how can i manage this problem.



please have look.



Thanks..










share|improve this question


























    up vote
    0
    down vote

    favorite












    docker-compose.yml



    version: "3"

    services:
    rango_api:
    container_name: rango
    build: ./
    command: python manage.py runserver 0.0.0.0:8000
    command: python manage.py search_index --rebuild
    working_dir: /usr/src/rango_api
    environment:
    REDIS_URI: redis://redis:6379
    ports:
    - "8000:8000"
    volumes:
    - ./:/usr/src/rango_api
    links:
    - redis
    - elasticsearch


    #redis
    redis:
    image: redis
    environment:
    - ALLOW_EMPTY_PASSWORD=yes
    ports:
    - "6379:6379"

    elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.5.0
    ports:
    - "9200:9200"
    - "9300:9300"


    django settings.py elastic search connection



    ELASTICSEARCH_DSL = {
    'default': {
    'hosts': 'elasticsearch:9200'
    },
    }


    errors:



        rango            | Are you sure you want to delete the 'posts' indexes? [n/Y]: Traceback (most recent call last):
    rango | File "manage.py", line 15, in <module>
    rango | execute_from_command_line(sys.argv)
    rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    rango | utility.execute()
    rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    rango | self.fetch_command(subcommand).run_from_argv(self.argv)
    rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
    rango | self.execute(*args, **cmd_options)
    rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
    rango | output = self.handle(*args, **options)
    rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 134, in handle
    rango | self._rebuild(models, options)
    rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 111, in _rebuild
    rango | if not self._delete(models, options):
    rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 100, in _delete
    rango | "the '{}' indexes? [n/Y]: ".format(", ".join(index_names)))
    rango | EOFError: EOF when reading a line


    i am trying elastci search with django inside docker using docker-compose.
    but in elastci search while building index it is asking yes or no.
    how can i manage this problem.



    please have look.



    Thanks..










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      docker-compose.yml



      version: "3"

      services:
      rango_api:
      container_name: rango
      build: ./
      command: python manage.py runserver 0.0.0.0:8000
      command: python manage.py search_index --rebuild
      working_dir: /usr/src/rango_api
      environment:
      REDIS_URI: redis://redis:6379
      ports:
      - "8000:8000"
      volumes:
      - ./:/usr/src/rango_api
      links:
      - redis
      - elasticsearch


      #redis
      redis:
      image: redis
      environment:
      - ALLOW_EMPTY_PASSWORD=yes
      ports:
      - "6379:6379"

      elasticsearch:
      image: docker.elastic.co/elasticsearch/elasticsearch:6.5.0
      ports:
      - "9200:9200"
      - "9300:9300"


      django settings.py elastic search connection



      ELASTICSEARCH_DSL = {
      'default': {
      'hosts': 'elasticsearch:9200'
      },
      }


      errors:



          rango            | Are you sure you want to delete the 'posts' indexes? [n/Y]: Traceback (most recent call last):
      rango | File "manage.py", line 15, in <module>
      rango | execute_from_command_line(sys.argv)
      rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
      rango | utility.execute()
      rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
      rango | self.fetch_command(subcommand).run_from_argv(self.argv)
      rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
      rango | self.execute(*args, **cmd_options)
      rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
      rango | output = self.handle(*args, **options)
      rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 134, in handle
      rango | self._rebuild(models, options)
      rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 111, in _rebuild
      rango | if not self._delete(models, options):
      rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 100, in _delete
      rango | "the '{}' indexes? [n/Y]: ".format(", ".join(index_names)))
      rango | EOFError: EOF when reading a line


      i am trying elastci search with django inside docker using docker-compose.
      but in elastci search while building index it is asking yes or no.
      how can i manage this problem.



      please have look.



      Thanks..










      share|improve this question













      docker-compose.yml



      version: "3"

      services:
      rango_api:
      container_name: rango
      build: ./
      command: python manage.py runserver 0.0.0.0:8000
      command: python manage.py search_index --rebuild
      working_dir: /usr/src/rango_api
      environment:
      REDIS_URI: redis://redis:6379
      ports:
      - "8000:8000"
      volumes:
      - ./:/usr/src/rango_api
      links:
      - redis
      - elasticsearch


      #redis
      redis:
      image: redis
      environment:
      - ALLOW_EMPTY_PASSWORD=yes
      ports:
      - "6379:6379"

      elasticsearch:
      image: docker.elastic.co/elasticsearch/elasticsearch:6.5.0
      ports:
      - "9200:9200"
      - "9300:9300"


      django settings.py elastic search connection



      ELASTICSEARCH_DSL = {
      'default': {
      'hosts': 'elasticsearch:9200'
      },
      }


      errors:



          rango            | Are you sure you want to delete the 'posts' indexes? [n/Y]: Traceback (most recent call last):
      rango | File "manage.py", line 15, in <module>
      rango | execute_from_command_line(sys.argv)
      rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
      rango | utility.execute()
      rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
      rango | self.fetch_command(subcommand).run_from_argv(self.argv)
      rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
      rango | self.execute(*args, **cmd_options)
      rango | File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
      rango | output = self.handle(*args, **options)
      rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 134, in handle
      rango | self._rebuild(models, options)
      rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 111, in _rebuild
      rango | if not self._delete(models, options):
      rango | File "/usr/local/lib/python3.6/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 100, in _delete
      rango | "the '{}' indexes? [n/Y]: ".format(", ".join(index_names)))
      rango | EOFError: EOF when reading a line


      i am trying elastci search with django inside docker using docker-compose.
      but in elastci search while building index it is asking yes or no.
      how can i manage this problem.



      please have look.



      Thanks..







      django docker elasticsearch






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 at 16:04









      soubhagya

      457




      457





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53378521%2fdjango-elasticsearch-error-inside-docker-using-docker-compose-while-building-ind%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53378521%2fdjango-elasticsearch-error-inside-docker-using-docker-compose-while-building-ind%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          Refactoring coordinates for Minecraft Pi buildings written in Python