Skip to content

重新pull升级之后创建任务提示错误“Permission denied: 'config.json'” #370

@KnowledegAndAction

Description

@KnowledegAndAction

在PVE中的LXC容器里跑的docker,root账户。

之前能正常运行,正常创建任务(虽然会被反爬)。

最近重新pull了一下后创建任务出错,日志如下:
[WARN tini (7)] Tini is not running as PID 1 and isn't registered as a child subreaper.
ai-goofish-monitor-app | Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
ai-goofish-monitor-app | To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
ai-goofish-monitor-app | 警告:未在 .env 文件中完整设置 OPENAI_BASE_URL 和 OPENAI_MODEL_NAME。AI相关功能可能无法使用。
ai-goofish-monitor-app | 启动新架构应用,端口: 8000
ai-goofish-monitor-app | INFO: Started server process [8]
ai-goofish-monitor-app | INFO: Waiting for application startup.
ai-goofish-monitor-app | 正在启动应用...
ai-goofish-monitor-app | 正在重新加载定时任务...
ai-goofish-monitor-app | 定时任务加载完成
ai-goofish-monitor-app | 调度器已启动
ai-goofish-monitor-app | 应用启动完成
ai-goofish-monitor-app | INFO: Application startup complete.
ai-goofish-monitor-app | INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
ai-goofish-monitor-app | INFO: 192.168.117.20:56095 - "WebSocket /ws" [accepted]
ai-goofish-monitor-app | INFO: connection open
ai-goofish-monitor-app | INFO: 192.168.117.20:56096 - "WebSocket /ws" [accepted]
ai-goofish-monitor-app | INFO: connection open
ai-goofish-monitor-app | INFO: 192.168.117.20:56097 - "GET /tasks HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: connection closed
ai-goofish-monitor-app | INFO: 192.168.117.20:56098 - "WebSocket /ws" [accepted]
ai-goofish-monitor-app | INFO: connection open
ai-goofish-monitor-app | INFO: 192.168.117.20:56099 - "GET /api/accounts HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56097 - "GET /api/tasks HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56097 - "GET /api/accounts HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56102 - "POST /api/accounts HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56102 - "GET /api/accounts HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56102 - "GET /api/results/files HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56103 - "GET /api/tasks HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56103 - "GET /api/tasks HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56103 - "GET /api/settings/ai HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56102 - "GET /api/settings/notifications HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56104 - "GET /api/settings/rotation HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56105 - "GET /api/settings/status HTTP/1.1" 200 OK
ai-goofish-monitor-app | AI测试 - BASE_URL: https://open.bigmodel.cn/api/paas/v4, MODEL: GLM-4.6V
ai-goofish-monitor-app | INFO: 192.168.117.20:56109 - "POST /api/settings/ai/test HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56109 - "PUT /api/settings/ai HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56109 - "GET /api/settings/status HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56109 - "GET /api/tasks HTTP/1.1" 200 OK
ai-goofish-monitor-app | INFO: 192.168.117.20:56110 - "GET /api/accounts HTTP/1.1" 200 OK
ai-goofish-monitor-app | 收到任务生成请求: 华硕 pn51,模式: ai
ai-goofish-monitor-app | 生成的文件路径: prompts/华硕_criteria.txt
ai-goofish-monitor-app | 开始调用AI生成分析标准...
ai-goofish-monitor-app | 正在读取参考文件: prompts/macbook_criteria.txt
ai-goofish-monitor-app | 正在构建发送给AI的指令...
ai-goofish-monitor-app | 正在调用AI生成新的分析标准,请稍候...
ai-goofish-monitor-app | AI已成功生成内容。
ai-goofish-monitor-app | AI生成的分析标准长度: 2163
ai-goofish-monitor-app | 开始保存分析标准到文件: prompts/华硕_criteria.txt
ai-goofish-monitor-app | 新的分析标准已保存到: prompts/华硕_criteria.txt
ai-goofish-monitor-app | 开始创建新任务对象...
ai-goofish-monitor-app | 开始通过 TaskService 创建任务...
ai-goofish-monitor-app | AI任务生成API发生未知错误: [Errno 13] Permission denied: 'config.json'
ai-goofish-monitor-app | Traceback (most recent call last):
ai-goofish-monitor-app | File "/app/src/api/routes/tasks.py", line 134, in generate_task
ai-goofish-monitor-app | task = await service.create_task(task_create)
ai-goofish-monitor-app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ai-goofish-monitor-app | File "/app/src/services/task_service.py", line 27, in create_task
ai-goofish-monitor-app | return await self.repository.save(task)
ai-goofish-monitor-app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ai-goofish-monitor-app | File "/app/src/infrastructure/persistence/json_task_repository.py", line 56, in save
ai-goofish-monitor-app | await self._write_tasks(tasks)
ai-goofish-monitor-app | File "/app/src/infrastructure/persistence/json_task_repository.py", line 71, in _write_tasks
ai-goofish-monitor-app | async with aiofiles.open(self.config_file, 'w', encoding='utf-8') as f:
ai-goofish-monitor-app | File "/opt/venv/lib/python3.11/site-packages/aiofiles/base.py", line 73, in aenter
ai-goofish-monitor-app | return await self
ai-goofish-monitor-app | ^^^^^^^^^^
ai-goofish-monitor-app | File "/opt/venv/lib/python3.11/site-packages/aiofiles/base.py", line 69, in await
ai-goofish-monitor-app | self._obj = yield from self._coro.await()
ai-goofish-monitor-app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ai-goofish-monitor-app | File "/opt/venv/lib/python3.11/site-packages/aiofiles/threadpool/init.py", line 93, in _open
ai-goofish-monitor-app | f = await loop.run_in_executor(executor, cb)
ai-goofish-monitor-app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ai-goofish-monitor-app | File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
ai-goofish-monitor-app | result = self.fn(*self.args, **self.kwargs)
ai-goofish-monitor-app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ai-goofish-monitor-app | PermissionError: [Errno 13] Permission denied: 'config.json'
ai-goofish-monitor-app |
ai-goofish-monitor-app | 已删除失败的文件: prompts/华硕_criteria.txt
ai-goofish-monitor-app | INFO: 192.168.117.20:56119 - "POST /api/tasks/generate HTTP/1.1" 500 Internal Server Error
ai-goofish-monitor-app | INFO: connection closed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions