数据库账号是超级账号,早上临时复现的环境含部分日志,皆是按照步骤来
16G运行内存,报迁移失败,部分表没有
mysql> select user();
+---------------------------+
| user() |
+---------------------------+
| centenary2@xxxxxx |
+---------------------------+
1 row in set (0.07 sec)
mysql> use gz;
Database changed
mysql> select database();
+------------+
| database() |
+------------+
| gz |
+------------+
1 row in set (0.14 sec)
mysql> show tables;
+-----------------------------------+
| Tables_in_gz |
+-----------------------------------+
| account_integrates |
| accounts |
| alembic_version |
| api_based_extensions |
| api_requests |
| api_tokens |
| app_annotation_hit_histories |
| app_annotation_settings |
| app_dataset_joins |
| app_model_configs |
| apps |
| celery_taskmeta |
| celery_tasksetmeta |
| conversations |
| data_source_api_key_auth_bindings |
| data_source_oauth_bindings |
| dataset_collection_bindings |
| dataset_keyword_tables |
| dataset_permissions |
| dataset_process_rules |
| dataset_queries |
| dataset_retriever_resources |
| datasets |
| dify_setups |
| document_segments |
| documents |
| embeddings |
| end_users |
| external_knowledge_apis |
| external_knowledge_bindings |
| installed_apps |
| invitation_codes |
| load_balancing_model_configs |
| message_agent_thoughts |
| message_chains |
| message_feedbacks |
| message_files |
| operation_logs |
| pinned_conversations |
| provider_model_settings |
| provider_models |
| provider_orders |
| providers |
| recommended_apps |
| saved_messages |
| sites |
| tag_bindings |
| tags |
| tenant_account_joins |
| tenant_default_models |
| tenant_preferred_model_providers |
| tenants |
| tidb_auth_bindings |
| tool_api_providers |
| tool_builtin_providers |
| tool_conversation_variables |
| tool_files |
| tool_label_bindings |
| tool_model_invokes |
| tool_providers |
| tool_workflow_providers |
| trace_app_config |
| upload_files |
| whitelists |
| workflow_app_logs |
| workflow_conversation_variables |
| workflow_node_executions |
| workflow_runs |
| workflows |
+-----------------------------------+
69 rows in set (0.14 sec)
mysql> show grants;
+------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for centenary2@% |
+------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALTER, CREATE, DELETE, DROP, INSERT, UPDATE, SELECT, INDEX, CREATE VIEW, SHOW VIEW, ALTER ROUTINE, CREATE ROUTINE ON *.* TO 'centenary2' |
+------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.07 sec)
docker logs -f docker-api-1 日志
nohup: 忽略输入
Running migrations
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
/app/api/.venv/lib/python3.12/site-packages/tencentcloud/hunyuan/v20230901/models.py:5585: SyntaxWarning: invalid escape sequence '\_'
"""function名称,只能包含a-z,A-Z,0-9,\_或-
/app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:44: SyntaxWarning: invalid escape sequence '\.'
re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._%\-]+)", re.U)
/app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:46: SyntaxWarning: invalid escape sequence '\s'
re_skip_default = re.compile("(\r\n|\s)", re.U)
/app/api/.venv/lib/python3.12/site-packages/jieba/finalseg/__init__.py:78: SyntaxWarning: invalid escape sequence '\.'
re_skip = re.compile("([a-zA-Z0-9]+(?:\.\d+)?%?)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:16: SyntaxWarning: invalid escape sequence '\.'
re_skip_detail = re.compile("([\.0-9]+|[a-zA-Z0-9]+)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:17: SyntaxWarning: invalid escape sequence '\.'
re_han_internal = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._]+)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:18: SyntaxWarning: invalid escape sequence '\s'
re_skip_internal = re.compile("(\r\n|\s)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:21: SyntaxWarning: invalid escape sequence '\.'
re_num = re.compile("[\.0-9]+")
2024-12-04 09:18:45.964 INFO [pre_load_builtin_providers_cache] [font_manager.py:1578] - generated new fontManager
Preparing database migration...
Database migration skipped
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
[2024-12-04 09:19:19 +0000] [1] [INFO] Starting gunicorn 22.0.0
[2024-12-04 09:19:19 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
[2024-12-04 09:19:19 +0000] [1] [INFO] Using worker: gevent
[2024-12-04 09:19:19 +0000] [40] [INFO] Booting worker with pid: 40
机器人运行后新增
2024-12-04 09:54:08.188 ERROR [Dummy-2] [completion.py:147] - internal server error.
Traceback (most recent call last):
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
cursor.execute(statement, parameters)
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 825, in _read_query_result
result.read()
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1199, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 775, in _read_packet
packet.raise_for_error()
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, "Table 'gz.messages' doesn't exist")
。。。。。。。
sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1146, "Table 'gz.messages' doesn't exist")
[SQL: INSERT INTO messages (id, app_id, model_provider, model_id, override_model_configs, conversation_id, inputs, query, message, message_tokens, message_uni
t_price, message_price_unit, answer, answer_tokens, answer_unit_price, answer_price_unit, parent_message_id, provider_response_latency, total_price, currency,
status, error, message_metadata, invoke_from, from_source, from_end_user_id, from_account_id, workflow_run_id) VALUES (%(id)s, %(app_id)s, %(model_provider)s
, %(model_id)s, %(override_model_configs)s, %(conversation_id)s, %(inputs)s, %(query)s, %(message)s, %(message_tokens)s, %(message_unit_price)s, %(message_pri
ce_unit)s, %(answer)s, %(answer_tokens)s, %(answer_unit_price)s, %(answer_price_unit)s, %(parent_message_id)s, %(provider_response_latency)s, %(total_price)s,
%(currency)s, %(status)s, %(error)s, %(message_metadata)s, %(invoke_from)s, %(from_source)s, %(from_end_user_id)s, %(from_account_id)s, %(workflow_run_id)s)]
[parameters: {'id': '373861f7-b668-489e-95cc-79c1b1f35b49', 'app_id': 'cfb99d2e-4db0-4f1c-aea6-82208eae5537', 'model_provider': 'tongyi', 'model_id': 'qwen-tu
rbo-2024-11-01', 'override_model_configs': '{"pre_prompt": "", "retriever_resource": {"enabled": true}, "completion_prompt_config": {}, "opening_statement": "
", "user_input_form": [], "agent_mo ... (1203 characters truncated) ... ble": true, "retrieval_model": "multiple", "datasets": {"datasets": [{"dataset": {"ena
bled": true, "id": "11c4d3db-9c82-44d9-8d6a-c6fba4bb36c1"}}]}}}', 'conversation_id': '60f534be-5851-4b26-9d5d-a82be36b0b2c', 'inputs': '{}', 'query': '请介绍
一下 OceanBase 的向量功能', 'message': '""', 'message_tokens': 0, 'message_unit_price': 0, 'message_price_unit': 0, 'answer': '', 'answer_tokens': 0, 'answer_unit_price': 0, 'answer_price_unit': 0, 'parent_message_id': None, 'provider_response_latency': 0, 'total_price': 0, 'currency': 'USD', 'status': 'normal', 'error': None, 'message_metadata': None, 'invoke_from': 'debugger', 'from_source': 'console', 'from_end_user_id': None, 'from_account_id': '7e79f1bf-fdb6-443c-9ed6-0a0ab06aa957', 'workflow_run_id': None}]
。。。。。。
werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
docker logs -f docker-worker-1 日志
nohup: 忽略输入
Running migrations
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
/app/api/.venv/lib/python3.12/site-packages/tencentcloud/hunyuan/v20230901/models.py:5585: SyntaxWarning: invalid escape sequence '\_'
"""function名称,只能包含a-z,A-Z,0-9,\_或-
/app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:44: SyntaxWarning: invalid escape sequence '\.'
re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._%\-]+)", re.U)
/app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:46: SyntaxWarning: invalid escape sequence '\s'
re_skip_default = re.compile("(\r\n|\s)", re.U)
/app/api/.venv/lib/python3.12/site-packages/jieba/finalseg/__init__.py:78: SyntaxWarning: invalid escape sequence '\.'
re_skip = re.compile("([a-zA-Z0-9]+(?:\.\d+)?%?)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:16: SyntaxWarning: invalid escape sequence '\.'
re_skip_detail = re.compile("([\.0-9]+|[a-zA-Z0-9]+)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:17: SyntaxWarning: invalid escape sequence '\.'
re_han_internal = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._]+)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:18: SyntaxWarning: invalid escape sequence '\s'
re_skip_internal = re.compile("(\r\n|\s)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:21: SyntaxWarning: invalid escape sequence '\.'
re_num = re.compile("[\.0-9]+")
2024-12-04 09:18:45.962 INFO [pre_load_builtin_providers_cache] [font_manager.py:1578] - generated new fontManager
Preparing database migration...
Starting database migration.
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 01d6889832f7, snapshot
ERROR [root] Failed to execute database migration
Traceback (most recent call last):
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
cursor.execute(statement, parameters)
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 825, in _read_query_result
result.read()
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1199, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 775, in _read_packet
packet.raise_for_error()
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "/app/api/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1142, "REFERENCES command denied to user 'centenary2'@'%' for table 'conversations'")
。。。。。。。。
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1050, "Table 'account_integrates' already exists")
[SQL:
CREATE TABLE account_integrates (
id CHAR(36) NOT NULL,
account_id CHAR(36) NOT NULL,
provider VARCHAR(16) NOT NULL,
open_id VARCHAR(255) NOT NULL,
encrypted_token VARCHAR(255) NOT NULL,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
CONSTRAINT account_integrate_pkey PRIMARY KEY (id),
CONSTRAINT unique_account_provider UNIQUE (account_id, provider),
CONSTRAINT unique_provider_open_id UNIQUE (provider, open_id)
)
]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
/app/api/.venv/lib/python3.12/site-packages/celery/platforms.py:829: SecurityWarning: You're running the worker with superuser privileges: this is
absolutely not recommended!
。。。。。。。