You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I start the docker container, I get an error message Failed loading pipeline component 'Retriever'. See the stacktrace above for more information.
And after that, it gives the following stack trace when the /query endpoint is called
⠿ Container haystack-haystack-api-1 Created 0.0s
Attaching to haystack-haystack-api-1
haystack-haystack-api-1 | /opt/venv/lib/python3.10/site-packages/elasticsearch/connection/http_urllib3.py:275: DeprecationWarning: HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.
haystack-haystack-api-1 | return response.status, response.getheaders(), raw_data
haystack-haystack-api-1 | 04/24/2023 05:58:23 AM Using devices: CPU - Number of GPUs: 0
haystack-haystack-api-1 | 04/24/2023 05:58:23 AM Init retriever using embeddings of model flax-sentence-embeddings/all_datasets_v3_mpnet-base
haystack-haystack-api-1 | 04/24/2023 05:58:24 AM Error loading query pipeline from /opt/pipelines/faq.yaml.
haystack-haystack-api-1 | Failed loading pipeline component 'Retriever'. See the stacktrace above for more information.
haystack-haystack-api-1 |
haystack-haystack-api-1 | /opt/venv/lib/python3.10/site-packages/jsonschema/validators.py:282: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.18.0.2', 45230), raddr=('192.168.65.2', 9200)>
haystack-haystack-api-1 | for k, v in applicable_validators(_schema):
haystack-haystack-api-1 | ResourceWarning: Enable tracemalloc to get the object allocation traceback
haystack-haystack-api-1 | 04/24/2023 05:58:24 AM Error loading indexing pipeline from /opt/pipelines/faq.yaml.
haystack-haystack-api-1 | Cannot find any pipeline with name 'indexing' declared in the YAML file. Existing pipelines: ['query']
haystack-haystack-api-1 |
haystack-haystack-api-1 | 04/24/2023 05:58:24 AM Indexing Pipeline is not setup. File Upload API will not be available.
haystack-haystack-api-1 | INFO: Started server process [1]
haystack-haystack-api-1 | INFO: Waiting for application startup.
haystack-haystack-api-1 | INFO: Application startup complete.
haystack-haystack-api-1 | INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
haystack-haystack-api-1 | INFO: 172.18.0.1:47914 - "POST /query HTTP/1.1" 500 Internal Server Error
haystack-haystack-api-1 | ERROR: Exception in ASGI application
haystack-haystack-api-1 | Traceback (most recent call last):
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 429, in run_asgi
haystack-haystack-api-1 | result = await app( # type: ignore[func-returns-value]
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
haystack-haystack-api-1 | return await self.app(scope, receive, send)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/fastapi/applications.py", line 276, in __call__
haystack-haystack-api-1 | await super().__call__(scope, receive, send)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
haystack-haystack-api-1 | await self.middleware_stack(scope, receive, send)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
haystack-haystack-api-1 | raise exc
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
haystack-haystack-api-1 | await self.app(scope, receive, _send)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in __call__
haystack-haystack-api-1 | await self.app(scope, receive, send)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
haystack-haystack-api-1 | raise exc
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
haystack-haystack-api-1 | await self.app(scope, receive, sender)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
haystack-haystack-api-1 | raise e
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
haystack-haystack-api-1 | await self.app(scope, receive, send)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
haystack-haystack-api-1 | await route.handle(scope, receive, send)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
haystack-haystack-api-1 | await self.app(scope, receive, send)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
haystack-haystack-api-1 | response = await func(request)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app
haystack-haystack-api-1 | raw_response = await run_endpoint_function(
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/fastapi/routing.py", line 165, in run_endpoint_function
haystack-haystack-api-1 | return await run_in_threadpool(dependant.call, **values)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
haystack-haystack-api-1 | return await anyio.to_thread.run_sync(func, *args)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
haystack-haystack-api-1 | return await get_asynclib().run_sync_in_worker_thread(
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
haystack-haystack-api-1 | return await future
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
haystack-haystack-api-1 | result = context.run(func, *args)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/rest_api/controller/search.py", line 57, in query
haystack-haystack-api-1 | result = _process_request(query_pipeline, request)
haystack-haystack-api-1 | File "/opt/venv/lib/python3.10/site-packages/rest_api/controller/search.py", line 65, in _process_request
haystack-haystack-api-1 | result = pipeline.run(query=request.query, params=params, debug=request.debug)
haystack-haystack-api-1 | AttributeError: 'NoneType' object has no attribute 'run'
Here is my docker-compose file
services:
haystack-api:
image: "deepset/haystack:cpu"
volumes:
- .:/opt/pipelines
ports:
- 8000:8000
restart: on-failure
environment:
- DOCUMENTSTORE_PARAMS_HOST=host.docker.internal
- PIPELINE_YAML_PATH=/opt/pipelines/faq.yaml
- TOKENIZERS_PARALLELISM=false
# Uncomment the following line to customise how much time (in seconds) a worker can spend serving a request
# before it times out. This should include the time required to cache the models and setup the pipelines.
# - GUNICORN_CMD_ARGS="--timeout=3000"
the elastic search is run outside in localhost.
And my pipeline yml file is as follows,
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When I start the docker container, I get an error message
Failed loading pipeline component 'Retriever'. See the stacktrace above for more information.
And after that, it gives the following stack trace when the /query endpoint is called
Here is my docker-compose file
the elastic search is run outside in localhost.
And my pipeline yml file is as follows,
Also, when I cloned Haystack and manually ran the rest API without docker, it worked without an issue.
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions