Skip to content

[BUG] quick-start.sh 运行失败 #29

@Sha-of-Lazy

Description

@Sha-of-Lazy

Description

When running the ./quick-start.sh script on a fresh deployment (or after a restart), the process fails during the Docker Compose stage. Specifically, the frontend container is marked as unhealthy, preventing the project from starting.

Additionally, the database initialization logs indicate a potential logic issue where skills cannot be loaded because no superuser/user exists in the database yet.

Environment

  • OS: CentOS 7 (or relevant Linux Distro)
  • Docker Version: 28.2.2
  • Docker Compose Version: build
  • Deployment Method: ./quick-start.sh

Steps to Reproduce

  1. Run ./quick-start.sh.
  2. Select y when prompted to restart services.
  3. Observe the database initialization logs.
  4. Wait for the frontend container to attempt to start.

Error Logs

1. Database Initialization Issue:

2026-02-25 03:31:03 | INFO | Scanning for skills in: /app/skills
2026-02-25 03:31:03 | WARNING | No superuser found. Trying to find any user for skill ownership.
2026-02-25 03:31:03 | ERROR | No users found in database. Cannot assign skill ownership. Skipping skill loading.

2. Frontend Failure:

Creating joysafeter-backend    ... done
ERROR: for frontend  Container "a803190301d1" is unhealthy.
ERROR: Encountered errors while bringing up the project.

check the docker logs of a803190301d1:

Process SpawnProcess-221:
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/local/lib/python3.12/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/app/.venv/lib/python3.12/site-packages/uvicorn/_subprocess.py", line 80, in subprocess_started
    target(sockets=sockets)
  File "/app/.venv/lib/python3.12/site-packages/uvicorn/supervisors/multiprocess.py", line 64, in target
    return self.real_target(sockets)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/uvicorn/server.py", line 67, in run
    return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
  File "/app/.venv/lib/python3.12/site-packages/uvicorn/server.py", line 71, in serve
    await self._serve(sockets)
  File "/app/.venv/lib/python3.12/site-packages/uvicorn/server.py", line 78, in _serve
    config.load()
  File "/app/.venv/lib/python3.12/site-packages/uvicorn/config.py", line 439, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/uvicorn/importer.py", line 19, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/app/app/main.py", line 15, in <module>
    from app.api import api_router
  File "/app/app/api/__init__.py", line 9, in <module>
    from .v1 import api_router as api_v1_router
  File "/app/app/api/v1/__init__.py", line 13, in <module>
    from .copilot_deepagents import router as copilot_deepagents_router
  File "/app/app/api/v1/copilot_deepagents.py", line 22, in <module>
    from app.core.copilot.action_types import CopilotRequest
  File "/app/app/core/copilot/__init__.py", line 36, in <module>
    from app.core.copilot.agent import get_copilot_agent
  File "/app/app/core/copilot/agent.py", line 16, in <module>
    from app.core.copilot.tools import get_copilot_tools, set_current_graph_context, set_preloaded_models
  File "/app/app/core/copilot/tools/__init__.py", line 43, in <module>
    from app.core.tools.buildin.research_tools import tavily_search
  File "/app/app/core/tools/buildin/research_tools.py", line 18, in <module>
    tavily_client = TavilyClient() if TavilyClient else None
                    ^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/tavily/tavily.py", line 20, in __init__
    raise MissingAPIKeyError()
tavily.errors.MissingAPIKeyError: No API key provided. Please provide the api_key attribute or set the TAVILY_API_KEY environment variable.
INFO:     Waiting for child process [595]
INFO:     Child process [595] died
INFO:     Waiting for child process [596]
INFO:     Child process [596] died

Potential Root Cause Analysis

  1. Dependency Loop: The frontend health check might be failing because it cannot reach the backend, or the backend is not fully operational due to the failed skill loading.
  2. Missing Initial User: The db-init script expects at least one user to exist to assign "Skill ownership," but since it's a new install, the database is empty. This prevents the core "Skills" from being populated.
  3. Frontend Health Check Timeout: The health check for the frontend might be too aggressive or the environment variables (like API URLs) are not being correctly resolved during the first start.

Expected Behavior

  1. The db-init script should probably create a default superuser if none exists before loading skills.
  2. All containers, including frontend, should pass health checks and reach a running state.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions