Unhandled exception when cannot connect to Docker daemon
When trying to create an agent with Docker not running the following exception arises. At least I assume the problem is with the Docker.
Error response from daemon: Get "https://placeholder/v2/": dial tcp: lookup placeholder on 192.168.0.1:53: no such host
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 66b064e6af24, create initial tables
INFO [alembic.runtime.migration] Running upgrade 66b064e6af24 -> be6dbedc8603, Add depends_on feature
INFO: Will watch for changes in these directories: ['/app']
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO: Started reloader process [1] using WatchFiles
INFO: Started server process [25]
INFO: Waiting for application startup.
INFO: Application startup complete.
{"name":"testagent","event":"Creating Agent","level":"debug","timestamp":"2024-01-29T12:24:09.288501Z"}
{"name":"testagent","event":"Installing agent","level":"info","timestamp":"2024-01-29T12:24:09.288595Z"}
INFO: 127.0.0.1:55806 - "POST /agents/create/git/ HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__
await super().__call__(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 24, in __call__
await responder(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 44, in __call__
await self.app(scope, receive, self.send_with_gzip)
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 83, in __call__
await self.app(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/app/.venv/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
raise e
File "/app/.venv/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
await self.app(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 292, in app
content = await serialize_response(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 155, in serialize_response
raise ResponseValidationError(
fastapi.exceptions.ResponseValidationError: 4 validation errors:
{'type': 'missing', 'loc': ('response', 'id'), 'msg': 'Field required', 'input': {'exception': RuntimeError(b'Traceback (most recent call last):\n File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main\n return _run_code(code, main_globals, None,\n File "/usr/lib/python3.10/runpy.py", line 86, in _run_code\n exec(code, run_globals)\n File "/usr/lib/python3.10/site-packages/pip/__main__.py", line 9, in <module>\n if sys.path[0] in ("", os.getcwd()):\nFileNotFoundError: [Errno 2] No such file or directory\n')}, 'url': 'https://errors.pydantic.dev/2.5/v/missing'}
{'type': 'missing', 'loc': ('response', 'name'), 'msg': 'Field required', 'input': {'exception': RuntimeError(b'Traceback (most recent call last):\n File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main\n return _run_code(code, main_globals, None,\n File "/usr/lib/python3.10/runpy.py", line 86, in _run_code\n exec(code, run_globals)\n File "/usr/lib/python3.10/site-packages/pip/__main__.py", line 9, in <module>\n if sys.path[0] in ("", os.getcwd()):\nFileNotFoundError: [Errno 2] No such file or directory\n')}, 'url': 'https://errors.pydantic.dev/2.5/v/missing'}
{'type': 'missing', 'loc': ('response', 'role'), 'msg': 'Field required', 'input': {'exception': RuntimeError(b'Traceback (most recent call last):\n File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main\n return _run_code(code, main_globals, None,\n File "/usr/lib/python3.10/runpy.py", line 86, in _run_code\n exec(code, run_globals)\n File "/usr/lib/python3.10/site-packages/pip/__main__.py", line 9, in <module>\n if sys.path[0] in ("", os.getcwd()):\nFileNotFoundError: [Errno 2] No such file or directory\n')}, 'url': 'https://errors.pydantic.dev/2.5/v/missing'}
{'type': 'missing', 'loc': ('response', 'type'), 'msg': 'Field required', 'input': {'exception': RuntimeError(b'Traceback (most recent call last):\n File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main\n return _run_code(code, main_globals, None,\n File "/usr/lib/python3.10/runpy.py", line 86, in _run_code\n exec(code, run_globals)\n File "/usr/lib/python3.10/site-packages/pip/__main__.py", line 9, in <module>\n if sys.path[0] in ("", os.getcwd()):\nFileNotFoundError: [Errno 2] No such file or directory\n')}, 'url': 'https://errors.pydantic.dev/2.5/v/missing'}