aravindputrevu / app-search-flask-app Goto Github PK
View Code? Open in Web Editor NEWThis is an example of a Python Flask app with Elasticsearch/ Elastic App Search with respective Python Clients
License: Apache License 2.0
This is an example of a Python Flask app with Elasticsearch/ Elastic App Search with respective Python Clients
License: Apache License 2.0
Hello,
I'm getting a "worker failed to boot" message after doing a "docker-compose up". This is occuring both on a Mac M1 Air running Docker version 20.10.8 and on Ubuntu Linux (18.04) also running Docker version 20.10.8
py38) qt02537@MacBook-Air ~/local/repos/learn/21Q3/GH/app-search-flask-app (main) [0|0]
16:29:35$ docker-compose up
Creating network "app-search-flask-app_default" with the default driver
Building appsearchpython
[+] Building 7.3s (12/12) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 487B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 365B 0.0s
=> [internal] load metadata for docker.io/library/python:3.8-slim-buster 1.2s
=> => resolve docker.io/library/python:3.8-slim-buster@sha256:7e732593f25983fa7d4b2d54444be4a785f2397c1cf2f815d2e3638337eee012 0.0s
=> => sha256:7e732593f25983fa7d4b2d54444be4a785f2397c1cf2f815d2e3638337eee012 1.86kB / 1.86kB 0.0s
=> => sha256:1d55a9981355e092edf17f540f50e411e81d1e395c78db8a4b7ced7a0ed75d63 1.37kB / 1.37kB 0.0s
=> => sha256:73fa96eb8286383c31e15c0981274d66b6a6075c339077a276c63fc742df01cb 7.68kB / 7.68kB 0.0s
=> => sha256:d10c227306ce3db344a8399cbc02bbf0dcb36519318efbde3c6027c00be8b40e 25.91MB / 25.91MB 1.5s
=> => sha256:aad96106aab0aa4d2e85bc421e45dea37832a50df28c81761db013ab47d07cf6 2.64MB / 2.64MB 1.8s
=> => sha256:cdc12f6ea53164b2605aff7aae7bf496fbbc09e66676f77af95a8c978a183d60 10.73MB / 10.73MB 1.6s
=> => sha256:77a86593011654ad7917842d3e6b216ad90db7762a5ccb00e8a764a87b7f7b81 231B / 231B 2.0s
=> => extracting sha256:d10c227306ce3db344a8399cbc02bbf0dcb36519318efbde3c6027c00be8b40e 0.8s
=> => sha256:32f90365e0f909b9014563a56532a8b3d3000068f89965fdf009968081d03123 2.64MB / 2.64MB 1.8s
=> => extracting sha256:aad96106aab0aa4d2e85bc421e45dea37832a50df28c81761db013ab47d07cf6 0.1s
=> => extracting sha256:cdc12f6ea53164b2605aff7aae7bf496fbbc09e66676f77af95a8c978a183d60 0.3s
=> => extracting sha256:77a86593011654ad7917842d3e6b216ad90db7762a5ccb00e8a764a87b7f7b81 0.0s
=> => extracting sha256:32f90365e0f909b9014563a56532a8b3d3000068f89965fdf009968081d03123 0.2s
=> [internal] load build context 0.4s
=> => transferring context: 6.76MB 0.4s
=> [2/6] ADD requirements.txt . 0.0s
=> [3/6] RUN python -m pip install -r requirements.txt 2.6s
=> [4/6] WORKDIR /app 0.0s
=> [5/6] ADD . /app 0.0s
=> [6/6] RUN useradd appuser && chown -R appuser /app 0.2s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:da27c25547bf9def885af1544b382e7a1891b32f0427fb7f52a01051e8696251 0.0s
=> => naming to docker.io/library/appsearchpython 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
WARNING: Image for service appsearchpython was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating app-search-flask-app_appsearchpython_1 ... done
Attaching to app-search-flask-app_appsearchpython_1
appsearchpython_1 | [2021-09-04 20:30:59 +0000] [1] [INFO] Starting gunicorn 20.0.4
appsearchpython_1 | [2021-09-04 20:30:59 +0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)
appsearchpython_1 | [2021-09-04 20:30:59 +0000] [1] [INFO] Using worker: sync
appsearchpython_1 | [2021-09-04 20:30:59 +0000] [10] [INFO] Booting worker with pid: 10
appsearchpython_1 | [2021-09-04 20:31:00 +0000] [10] [ERROR] Exception in worker process
appsearchpython_1 | File "<frozen importlib._bootstrap_external>", line 843, in exec_module
appsearchpython_1 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
appsearchpython_1 | File "/app/main.py", line 11, in <module>
appsearchpython_1 | client = AppSearch(
appsearchpython_1 | File "/usr/local/lib/python3.8/site-packages/elastic_enterprise_search/client/_base.py", line 69, in __init__
appsearchpython_1 | self.transport = (transport_class or Transport)(hosts, **kwargs)
appsearchpython_1 | File "/usr/local/lib/python3.8/site-packages/elastic_transport/transport.py", line 182, in __init__
appsearchpython_1 | self.set_connections(hosts)
appsearchpython_1 | File "/usr/local/lib/python3.8/site-packages/elastic_transport/transport.py", line 222, in set_connections
appsearchpython_1 | connections = list(zip(connections, hosts))
appsearchpython_1 | File "/usr/local/lib/python3.8/site-packages/elastic_transport/transport.py", line 218, in _create_connection
appsearchpython_1 | return self.connection_class(**kwargs)
appsearchpython_1 | File "/usr/local/lib/python3.8/site-packages/elastic_transport/connection/http_urllib3.py", line 176, in __init__
appsearchpython_1 | self.pool = pool_class(
appsearchpython_1 | File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 183, in __init__
appsearchpython_1 | ConnectionPool.__init__(self, host, port)
appsearchpython_1 | File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 76, in __init__
**appsearchpython_1 | raise LocationValueError("No host specified.")
appsearchpython_1 | urllib3.exceptions.LocationValueError: No host specified.
appsearchpython_1 | [2021-09-04 20:31:00 +0000] [10] [INFO] Worker exiting (pid: 10)
appsearchpython_1 | [2021-09-04 20:31:00 +0000] [1] [INFO] Shutting down: Master
appsearchpython_1 | [2021-09-04 20:31:00 +0000] [1] [INFO] Reason: Worker failed to boot.
app-search-flask-app_appsearchpython_1 exited with code 3**
Please advise.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.