bricky icon indicating copy to clipboard operation
bricky copied to clipboard

Error on docker compose up

Open gabazureus opened this issue 1 year ago • 5 comments

Hello!

First of all, awesome project! Thank you!

I am running this on Ubuntu 22.04.

I have created an .env file inside the "api" directory with this configuration image

And then I entered inside the "api" folder, and tried to run "docker compose up", and got these errors:

$ sudo docker compose up
[+] Running 2/0
 ⠿ Container bricky-app-1  Created                                                                                    0.0s
 ⠿ Container bricky-api-1  Created                                                                                    0.0s
Attaching to bricky-api-1, bricky-app-1
bricky-app-1  | 
bricky-app-1  | > [email protected] start
bricky-app-1  | > next start
bricky-app-1  | 
bricky-app-1  | ready - started server on 0.0.0.0:3000, url: http://localhost:3000
bricky-api-1  | INFO:haystack.telemetry:Telemetry has been disabled.
bricky-api-1  | DEBUG:haystack.pipelines.base:Running node 'File` with input: {'root_node': 'File', 'params': None, 'node_id': 'File'}
bricky-api-1  | DEBUG:haystack.pipelines.base:Running node 'MarkdownConverter` with input: {'root_node': 'File', 'params': {}, 'node_id': 'MarkdownConverter'}
bricky-api-1  | DEBUG:haystack.pipelines.base:Exception while running node 'MarkdownConverter' with input {'root_node': 'File', 'params': {}, 'node_id': 'MarkdownConverter'}
bricky-api-1  | Traceback (most recent call last):
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/haystack/pipelines/base.py", line 530, in run
bricky-api-1  |     node_output, stream_id = self._run_node(node_id, node_input)
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/haystack/pipelines/base.py", line 457, in _run_node
bricky-api-1  |     return self.graph.nodes[node_id]["component"]._dispatch_run(**node_input)
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/base.py", line 201, in _dispatch_run
bricky-api-1  |     return self._dispatch_run_general(self.run, **kwargs)
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/base.py", line 245, in _dispatch_run_general
bricky-api-1  |     output, stream = run_method(**run_inputs, **run_params)
bricky-api-1  | TypeError: BaseConverter.run() missing 1 required positional argument: 'file_paths'
bricky-api-1  | 
bricky-api-1  | The above exception was the direct cause of the following exception:
bricky-api-1  | 
bricky-api-1  | Traceback (most recent call last):
bricky-api-1  |   File "/opt/venv/bin/uvicorn", line 8, in <module>
bricky-api-1  |     sys.exit(main())
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
bricky-api-1  |     return self.main(*args, **kwargs)
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
bricky-api-1  |     rv = self.invoke(ctx)
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
bricky-api-1  |     return ctx.invoke(self.callback, **ctx.params)
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
bricky-api-1  |     return __callback(*args, **kwargs)
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/uvicorn/main.py", line 404, in main
bricky-api-1  |     run(
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/uvicorn/main.py", line 569, in run
bricky-api-1  |     server.run()
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/uvicorn/server.py", line 60, in run
bricky-api-1  |     return asyncio.run(self.serve(sockets=sockets))
bricky-api-1  |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
bricky-api-1  |     return loop.run_until_complete(main)
bricky-api-1  |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
bricky-api-1  |     return future.result()
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/uvicorn/server.py", line 67, in serve
bricky-api-1  |     config.load()
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/uvicorn/config.py", line 477, in load
bricky-api-1  |     self.loaded_app = import_from_string(self.app)
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
bricky-api-1  |     module = importlib.import_module(module_str)
bricky-api-1  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
bricky-api-1  |     return _bootstrap._gcd_import(name[level:], package, level)
bricky-api-1  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
bricky-api-1  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
bricky-api-1  |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
bricky-api-1  |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
bricky-api-1  |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
bricky-api-1  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
bricky-api-1  |   File "/home/appuser/./main.py", line 28, in <module>
bricky-api-1  |     index_pipe.ensure_index()
bricky-api-1  |   File "/home/appuser/./pipelines/indexing.py", line 57, in ensure_index
bricky-api-1  |     self.pipeline.run(file_paths=files_to_index)
bricky-api-1  |   File "/opt/venv/lib/python3.10/site-packages/haystack/pipelines/base.py", line 535, in run
bricky-api-1  |     raise Exception(
bricky-api-1  | Exception: Exception while running node 'MarkdownConverter': BaseConverter.run() missing 1 required positional argument: 'file_paths'
bricky-api-1  | Enable debug logging to see the data that was passed when the pipeline failed.
bricky-api-1 exited with code 1

I can access localhost:3000, but I get this error when I do:

bricky-app-1  | Warning: For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'yarn add sharp', and Next.js will use it automatically for Image Optimization.
bricky-app-1  | Read more: https://nextjs.org/docs/messages/sharp-missing-in-production
bricky-app-1  | TypeError: fetch failed
bricky-app-1  |     at Object.fetch (node:internal/deps/undici/undici:14152:11)
bricky-app-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
bricky-app-1  |     at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/chat.js:16:22)
bricky-app-1  |     at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:363:9)
bricky-app-1  |     at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:487:9)
bricky-app-1  |     at async Object.fn (/app/node_modules/next/dist/server/next-server.js:749:37)
bricky-app-1  |     at async Router.execute (/app/node_modules/next/dist/server/router.js:253:36)
bricky-app-1  |     at async NextNodeServer.run (/app/node_modules/next/dist/server/base-server.js:384:29)
bricky-app-1  |     at async NextNodeServer.handleRequest (/app/node_modules/next/dist/server/base-server.js:322:20) {
bricky-app-1  |   cause: Error: getaddrinfo EAI_AGAIN api
bricky-app-1  |       at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
bricky-app-1  |     errno: -3001,
bricky-app-1  |     code: 'EAI_AGAIN',
bricky-app-1  |     syscall: 'getaddrinfo',
bricky-app-1  |     hostname: 'api'
bricky-app-1  |   }
bricky-app-1  | }

I can't access localhost:8000/docs

Am I doing something wrong? Thanks!

gabazureus avatar Feb 10 '23 13:02 gabazureus