-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Bug]: error #13718
Description
Self Checks
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report (Language Policy).
- Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
- Please do not modify this template :) and fill in all the required fields.
RAGFlow workspace code commit ID
2345678
RAGFlow image version
v0.24.0
Other environment information
2026-03-20 13:31:59,134 WARNING 47321 SECURITY WARNING: Using auto-generated SECRET_KEY.
ragflow-gpu-1 | 2026-03-20 13:31:59,141 INFO 47321 GET http://es01:9200/ [status:200 duration:0.005s]
ragflow-gpu-1 | 2026-03-20 13:31:59,144 INFO 47321 HEAD http://es01:9200/ [status:200 duration:0.002s]
ragflow-gpu-1 | 2026-03-20 13:31:59,145 INFO 47321 Use Elasticsearch http://es01:9200 as the doc engine.
ragflow-gpu-1 | 2026-03-20 13:31:59,145 INFO 47321 Elasticsearch http://es01:9200 is healthy.
ragflow-gpu-1 | 2026-03-20 13:31:59,146 INFO 47321 Use Elasticsearch http://es01:9200 as the doc engine.
ragflow-gpu-1 | 2026-03-20 13:31:59,146 INFO 47321 Elasticsearch http://es01:9200 is healthy.
ragflow-gpu-1 | 2026-03-20 13:31:59,157 WARNING 47321 Load term.freq FAIL!
ragflow-gpu-1 | 2026-03-20 13:31:59,172 WARNING 47321 Realtime synonym is disabled, since no redis connection.
ragflow-gpu-1 | 2026-03-20 13:31:59,188 WARNING 47321 Load term.freq FAIL!
ragflow-gpu-1 | 2026-03-20 13:31:59,199 WARNING 47321 Realtime synonym is disabled, since no redis connection.
ragflow-gpu-1 | Warning: Failed to import module wencai: No module named 'pywencai'
ragflow-gpu-1 | Traceback (most recent call last):
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3322, in execute_sql
ragflow-gpu-1 | cursor.execute(sql, params or ())
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
ragflow-gpu-1 | result = self._query(query)
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
ragflow-gpu-1 | conn.query(q)
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 575, in query
ragflow-gpu-1 | self._affected_rows = self._read_query_result(unbuffered=unbuffered)
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 826, in _read_query_result
ragflow-gpu-1 | result.read()
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1203, in read
ragflow-gpu-1 | first_packet = self.connection._read_packet()
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 782, in _read_packet
ragflow-gpu-1 | packet.raise_for_error()
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
ragflow-gpu-1 | err.raise_mysql_exception(self._data)
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
ragflow-gpu-1 | raise errorclass(errno, errval)
ragflow-gpu-1 | pymysql.err.ProgrammingError: (1146, "Table 'rag_flow.user' doesn't exist")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/ragflow/admin/server/admin_server.py", line 67, in <module>
init_default_admin()
File "/ragflow/admin/server/auth.py", line 77, in init_default_admin
users = UserService.query(is_superuser=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3159, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/user_service.py", line 66, in query
return super().query(cols=cols, reverse=reverse, order_by=order_by, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3159, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/common_service.py", line 69, in query
return cls.model.query(cols=cols, reverse=reverse, order_by=order_by, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/db_models.py", line 209, in query
return [query_record for query_record in query_records]
^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 7287, in __iter__
self.execute()
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2036, in inner
return method(self, database, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2107, in execute
return self._execute(database)
^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2280, in _execute
cursor = database.execute(self)
^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3330, in execute
return self.execute_sql(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/db_models.py", line 252, in execute_sql
return super().execute_sql(sql, params, commit)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3320, in execute_sql
with __exception_wrapper__:
^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3088, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 196, in reraise
raise value.with_traceback(tb)
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3322, in execute_sql
cursor.execute(sql, params or ())
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 575, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 826, in _read_query_result
result.read()
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1203, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 782, in _read_packet
packet.raise_for_error()
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
I deployed a brand new v0.24.0 version of Ragflow, but I keep encountering the above error. I am not reusing any data from a previous version — this is a completely fresh deployment.
Below is my docker-compose configuration:include:
- ./docker-compose-base.yml
# To ensure that the container processes the locally modified `service_conf.yaml.template` instead of the one included in its image, you need to mount the local `service_conf.yaml.template` to the container.
services:
ragflow-cpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- cpu
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-<flag>.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
ragflow-gpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- gpu
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-<flag>.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# executor:
# depends_on:
# mysql:
# condition: service_healthy
# image: ${RAGFLOW_IMAGE}
# volumes:
# - ./ragflow-logs:/ragflow/logs
# - ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
# env_file: .env
# entrypoint: "/ragflow/entrypoint_task_executor.sh 1 3"
# networks:
# - ragflow
# restart: unless-stopped
# # https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# # If you're using Docker Desktop, the --add-host flag is optional. This flag makes sure that the host's internal IP gets exposed to the Prometheus container.
# extra_hosts:
# - "host.docker.internal:host-gateway"
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]Actual behavior
2026-03-20 13:31:59,134 WARNING 47321 SECURITY WARNING: Using auto-generated SECRET_KEY.
ragflow-gpu-1 | 2026-03-20 13:31:59,141 INFO 47321 GET http://es01:9200/ [status:200 duration:0.005s]
ragflow-gpu-1 | 2026-03-20 13:31:59,144 INFO 47321 HEAD http://es01:9200/ [status:200 duration:0.002s]
ragflow-gpu-1 | 2026-03-20 13:31:59,145 INFO 47321 Use Elasticsearch http://es01:9200 as the doc engine.
ragflow-gpu-1 | 2026-03-20 13:31:59,145 INFO 47321 Elasticsearch http://es01:9200 is healthy.
ragflow-gpu-1 | 2026-03-20 13:31:59,146 INFO 47321 Use Elasticsearch http://es01:9200 as the doc engine.
ragflow-gpu-1 | 2026-03-20 13:31:59,146 INFO 47321 Elasticsearch http://es01:9200 is healthy.
ragflow-gpu-1 | 2026-03-20 13:31:59,157 WARNING 47321 Load term.freq FAIL!
ragflow-gpu-1 | 2026-03-20 13:31:59,172 WARNING 47321 Realtime synonym is disabled, since no redis connection.
ragflow-gpu-1 | 2026-03-20 13:31:59,188 WARNING 47321 Load term.freq FAIL!
ragflow-gpu-1 | 2026-03-20 13:31:59,199 WARNING 47321 Realtime synonym is disabled, since no redis connection.
ragflow-gpu-1 | Warning: Failed to import module wencai: No module named 'pywencai'
ragflow-gpu-1 | Traceback (most recent call last):
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3322, in execute_sql
ragflow-gpu-1 | cursor.execute(sql, params or ())
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
ragflow-gpu-1 | result = self._query(query)
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
ragflow-gpu-1 | conn.query(q)
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 575, in query
ragflow-gpu-1 | self._affected_rows = self._read_query_result(unbuffered=unbuffered)
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 826, in _read_query_result
ragflow-gpu-1 | result.read()
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1203, in read
ragflow-gpu-1 | first_packet = self.connection._read_packet()
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 782, in _read_packet
ragflow-gpu-1 | packet.raise_for_error()
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
ragflow-gpu-1 | err.raise_mysql_exception(self._data)
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
ragflow-gpu-1 | raise errorclass(errno, errval)
ragflow-gpu-1 | pymysql.err.ProgrammingError: (1146, "Table 'rag_flow.user' doesn't exist")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/ragflow/admin/server/admin_server.py", line 67, in
init_default_admin()
File "/ragflow/admin/server/auth.py", line 77, in init_default_admin
users = UserService.query(is_superuser=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3159, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/user_service.py", line 66, in query
return super().query(cols=cols, reverse=reverse, order_by=order_by, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3159, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/common_service.py", line 69, in query
return cls.model.query(cols=cols, reverse=reverse, order_by=order_by, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/db_models.py", line 209, in query
return [query_record for query_record in query_records]
^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 7287, in iter
self.execute()
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2036, in inner
return method(self, database, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2107, in execute
return self._execute(database)
^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2280, in _execute
cursor = database.execute(self)
^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3330, in execute
return self.execute_sql(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/db_models.py", line 252, in execute_sql
return super().execute_sql(sql, params, commit)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3320, in execute_sql
with exception_wrapper:
^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3088, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 196, in reraise
raise value.with_traceback(tb)
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3322, in execute_sql
cursor.execute(sql, params or ())
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 575, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 826, in _read_query_result
result.read()
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1203, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 782, in _read_packet
packet.raise_for_error()
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
I deployed a brand new v0.24.0 version of Ragflow, but I keep encountering the above error. I am not reusing any data from a previous version — this is a completely fresh deployment.
Below is my docker-compose configuration:include:
- ./docker-compose-base.yml
To ensure that the container processes the locally modified service_conf.yaml.template instead of the one included in its image, you need to mount the local service_conf.yaml.template to the container.
services:
ragflow-cpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- cpu
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
ragflow-gpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- gpu
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
executor:
depends_on:
mysql:
condition: service_healthy
image: ${RAGFLOW_IMAGE}
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
env_file: .env
entrypoint: "/ragflow/entrypoint_task_executor.sh 1 3"
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you're using Docker Desktop, the --add-host flag is optional. This flag makes sure that the host's internal IP gets exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
Expected behavior
2026-03-20 13:31:59,134 WARNING 47321 SECURITY WARNING: Using auto-generated SECRET_KEY.
ragflow-gpu-1 | 2026-03-20 13:31:59,141 INFO 47321 GET http://es01:9200/ [status:200 duration:0.005s]
ragflow-gpu-1 | 2026-03-20 13:31:59,144 INFO 47321 HEAD http://es01:9200/ [status:200 duration:0.002s]
ragflow-gpu-1 | 2026-03-20 13:31:59,145 INFO 47321 Use Elasticsearch http://es01:9200 as the doc engine.
ragflow-gpu-1 | 2026-03-20 13:31:59,145 INFO 47321 Elasticsearch http://es01:9200 is healthy.
ragflow-gpu-1 | 2026-03-20 13:31:59,146 INFO 47321 Use Elasticsearch http://es01:9200 as the doc engine.
ragflow-gpu-1 | 2026-03-20 13:31:59,146 INFO 47321 Elasticsearch http://es01:9200 is healthy.
ragflow-gpu-1 | 2026-03-20 13:31:59,157 WARNING 47321 Load term.freq FAIL!
ragflow-gpu-1 | 2026-03-20 13:31:59,172 WARNING 47321 Realtime synonym is disabled, since no redis connection.
ragflow-gpu-1 | 2026-03-20 13:31:59,188 WARNING 47321 Load term.freq FAIL!
ragflow-gpu-1 | 2026-03-20 13:31:59,199 WARNING 47321 Realtime synonym is disabled, since no redis connection.
ragflow-gpu-1 | Warning: Failed to import module wencai: No module named 'pywencai'
ragflow-gpu-1 | Traceback (most recent call last):
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3322, in execute_sql
ragflow-gpu-1 | cursor.execute(sql, params or ())
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
ragflow-gpu-1 | result = self._query(query)
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
ragflow-gpu-1 | conn.query(q)
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 575, in query
ragflow-gpu-1 | self._affected_rows = self._read_query_result(unbuffered=unbuffered)
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 826, in _read_query_result
ragflow-gpu-1 | result.read()
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1203, in read
ragflow-gpu-1 | first_packet = self.connection._read_packet()
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 782, in _read_packet
ragflow-gpu-1 | packet.raise_for_error()
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
ragflow-gpu-1 | err.raise_mysql_exception(self._data)
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
ragflow-gpu-1 | raise errorclass(errno, errval)
ragflow-gpu-1 | pymysql.err.ProgrammingError: (1146, "Table 'rag_flow.user' doesn't exist")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/ragflow/admin/server/admin_server.py", line 67, in
init_default_admin()
File "/ragflow/admin/server/auth.py", line 77, in init_default_admin
users = UserService.query(is_superuser=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3159, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/user_service.py", line 66, in query
return super().query(cols=cols, reverse=reverse, order_by=order_by, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3159, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/common_service.py", line 69, in query
return cls.model.query(cols=cols, reverse=reverse, order_by=order_by, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/db_models.py", line 209, in query
return [query_record for query_record in query_records]
^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 7287, in iter
self.execute()
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2036, in inner
return method(self, database, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2107, in execute
return self._execute(database)
^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2280, in _execute
cursor = database.execute(self)
^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3330, in execute
return self.execute_sql(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/db_models.py", line 252, in execute_sql
return super().execute_sql(sql, params, commit)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3320, in execute_sql
with exception_wrapper:
^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3088, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 196, in reraise
raise value.with_traceback(tb)
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3322, in execute_sql
cursor.execute(sql, params or ())
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 575, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 826, in _read_query_result
result.read()
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1203, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 782, in _read_packet
packet.raise_for_error()
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
I deployed a brand new v0.24.0 version of Ragflow, but I keep encountering the above error. I am not reusing any data from a previous version — this is a completely fresh deployment.
Below is my docker-compose configuration:include:
- ./docker-compose-base.yml
To ensure that the container processes the locally modified service_conf.yaml.template instead of the one included in its image, you need to mount the local service_conf.yaml.template to the container.
services:
ragflow-cpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- cpu
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
ragflow-gpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- gpu
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
executor:
depends_on:
mysql:
condition: service_healthy
image: ${RAGFLOW_IMAGE}
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
env_file: .env
entrypoint: "/ragflow/entrypoint_task_executor.sh 1 3"
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you're using Docker Desktop, the --add-host flag is optional. This flag makes sure that the host's internal IP gets exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
Steps to reproduce
2026-03-20 13:31:59,134 WARNING 47321 SECURITY WARNING: Using auto-generated SECRET_KEY.
ragflow-gpu-1 | 2026-03-20 13:31:59,141 INFO 47321 GET http://es01:9200/ [status:200 duration:0.005s]
ragflow-gpu-1 | 2026-03-20 13:31:59,144 INFO 47321 HEAD http://es01:9200/ [status:200 duration:0.002s]
ragflow-gpu-1 | 2026-03-20 13:31:59,145 INFO 47321 Use Elasticsearch http://es01:9200 as the doc engine.
ragflow-gpu-1 | 2026-03-20 13:31:59,145 INFO 47321 Elasticsearch http://es01:9200 is healthy.
ragflow-gpu-1 | 2026-03-20 13:31:59,146 INFO 47321 Use Elasticsearch http://es01:9200 as the doc engine.
ragflow-gpu-1 | 2026-03-20 13:31:59,146 INFO 47321 Elasticsearch http://es01:9200 is healthy.
ragflow-gpu-1 | 2026-03-20 13:31:59,157 WARNING 47321 Load term.freq FAIL!
ragflow-gpu-1 | 2026-03-20 13:31:59,172 WARNING 47321 Realtime synonym is disabled, since no redis connection.
ragflow-gpu-1 | 2026-03-20 13:31:59,188 WARNING 47321 Load term.freq FAIL!
ragflow-gpu-1 | 2026-03-20 13:31:59,199 WARNING 47321 Realtime synonym is disabled, since no redis connection.
ragflow-gpu-1 | Warning: Failed to import module wencai: No module named 'pywencai'
ragflow-gpu-1 | Traceback (most recent call last):
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3322, in execute_sql
ragflow-gpu-1 | cursor.execute(sql, params or ())
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
ragflow-gpu-1 | result = self._query(query)
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
ragflow-gpu-1 | conn.query(q)
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 575, in query
ragflow-gpu-1 | self._affected_rows = self._read_query_result(unbuffered=unbuffered)
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 826, in _read_query_result
ragflow-gpu-1 | result.read()
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1203, in read
ragflow-gpu-1 | first_packet = self.connection._read_packet()
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 782, in _read_packet
ragflow-gpu-1 | packet.raise_for_error()
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
ragflow-gpu-1 | err.raise_mysql_exception(self._data)
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
ragflow-gpu-1 | raise errorclass(errno, errval)
ragflow-gpu-1 | pymysql.err.ProgrammingError: (1146, "Table 'rag_flow.user' doesn't exist")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/ragflow/admin/server/admin_server.py", line 67, in <module>
init_default_admin()
File "/ragflow/admin/server/auth.py", line 77, in init_default_admin
users = UserService.query(is_superuser=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3159, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/user_service.py", line 66, in query
return super().query(cols=cols, reverse=reverse, order_by=order_by, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3159, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/common_service.py", line 69, in query
return cls.model.query(cols=cols, reverse=reverse, order_by=order_by, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/db_models.py", line 209, in query
return [query_record for query_record in query_records]
^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 7287, in __iter__
self.execute()
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2036, in inner
return method(self, database, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2107, in execute
return self._execute(database)
^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2280, in _execute
cursor = database.execute(self)
^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3330, in execute
return self.execute_sql(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/db_models.py", line 252, in execute_sql
return super().execute_sql(sql, params, commit)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3320, in execute_sql
with __exception_wrapper__:
^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3088, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 196, in reraise
raise value.with_traceback(tb)
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3322, in execute_sql
cursor.execute(sql, params or ())
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 575, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 826, in _read_query_result
result.read()
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1203, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 782, in _read_packet
packet.raise_for_error()
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
I deployed a brand new v0.24.0 version of Ragflow, but I keep encountering the above error. I am not reusing any data from a previous version — this is a completely fresh deployment.
Below is my docker-compose configuration:include:
- ./docker-compose-base.yml
# To ensure that the container processes the locally modified `service_conf.yaml.template` instead of the one included in its image, you need to mount the local `service_conf.yaml.template` to the container.
services:
ragflow-cpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- cpu
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-<flag>.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
ragflow-gpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- gpu
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-<flag>.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# executor:
# depends_on:
# mysql:
# condition: service_healthy
# image: ${RAGFLOW_IMAGE}
# volumes:
# - ./ragflow-logs:/ragflow/logs
# - ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
# env_file: .env
# entrypoint: "/ragflow/entrypoint_task_executor.sh 1 3"
# networks:
# - ragflow
# restart: unless-stopped
# # https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# # If you're using Docker Desktop, the --add-host flag is optional. This flag makes sure that the host's internal IP gets exposed to the Prometheus container.
# extra_hosts:
# - "host.docker.internal:host-gateway"
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]Additional information
2026-03-20 13:31:59,134 WARNING 47321 SECURITY WARNING: Using auto-generated SECRET_KEY.
ragflow-gpu-1 | 2026-03-20 13:31:59,141 INFO 47321 GET http://es01:9200/ [status:200 duration:0.005s]
ragflow-gpu-1 | 2026-03-20 13:31:59,144 INFO 47321 HEAD http://es01:9200/ [status:200 duration:0.002s]
ragflow-gpu-1 | 2026-03-20 13:31:59,145 INFO 47321 Use Elasticsearch http://es01:9200 as the doc engine.
ragflow-gpu-1 | 2026-03-20 13:31:59,145 INFO 47321 Elasticsearch http://es01:9200 is healthy.
ragflow-gpu-1 | 2026-03-20 13:31:59,146 INFO 47321 Use Elasticsearch http://es01:9200 as the doc engine.
ragflow-gpu-1 | 2026-03-20 13:31:59,146 INFO 47321 Elasticsearch http://es01:9200 is healthy.
ragflow-gpu-1 | 2026-03-20 13:31:59,157 WARNING 47321 Load term.freq FAIL!
ragflow-gpu-1 | 2026-03-20 13:31:59,172 WARNING 47321 Realtime synonym is disabled, since no redis connection.
ragflow-gpu-1 | 2026-03-20 13:31:59,188 WARNING 47321 Load term.freq FAIL!
ragflow-gpu-1 | 2026-03-20 13:31:59,199 WARNING 47321 Realtime synonym is disabled, since no redis connection.
ragflow-gpu-1 | Warning: Failed to import module wencai: No module named 'pywencai'
ragflow-gpu-1 | Traceback (most recent call last):
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3322, in execute_sql
ragflow-gpu-1 | cursor.execute(sql, params or ())
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
ragflow-gpu-1 | result = self._query(query)
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
ragflow-gpu-1 | conn.query(q)
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 575, in query
ragflow-gpu-1 | self._affected_rows = self._read_query_result(unbuffered=unbuffered)
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 826, in _read_query_result
ragflow-gpu-1 | result.read()
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1203, in read
ragflow-gpu-1 | first_packet = self.connection._read_packet()
ragflow-gpu-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 782, in _read_packet
ragflow-gpu-1 | packet.raise_for_error()
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
ragflow-gpu-1 | err.raise_mysql_exception(self._data)
ragflow-gpu-1 | File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
ragflow-gpu-1 | raise errorclass(errno, errval)
ragflow-gpu-1 | pymysql.err.ProgrammingError: (1146, "Table 'rag_flow.user' doesn't exist")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/ragflow/admin/server/admin_server.py", line 67, in
init_default_admin()
File "/ragflow/admin/server/auth.py", line 77, in init_default_admin
users = UserService.query(is_superuser=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3159, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/user_service.py", line 66, in query
return super().query(cols=cols, reverse=reverse, order_by=order_by, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3159, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/common_service.py", line 69, in query
return cls.model.query(cols=cols, reverse=reverse, order_by=order_by, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/db_models.py", line 209, in query
return [query_record for query_record in query_records]
^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 7287, in iter
self.execute()
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2036, in inner
return method(self, database, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2107, in execute
return self._execute(database)
^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 2280, in _execute
cursor = database.execute(self)
^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3330, in execute
return self.execute_sql(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/db_models.py", line 252, in execute_sql
return super().execute_sql(sql, params, commit)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3320, in execute_sql
with exception_wrapper:
^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3088, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 196, in reraise
raise value.with_traceback(tb)
File "/ragflow/.venv/lib/python3.12/site-packages/peewee.py", line 3322, in execute_sql
cursor.execute(sql, params or ())
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 575, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 826, in _read_query_result
result.read()
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 1203, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/connections.py", line 782, in _read_packet
packet.raise_for_error()
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "/ragflow/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
I deployed a brand new v0.24.0 version of Ragflow, but I keep encountering the above error. I am not reusing any data from a previous version — this is a completely fresh deployment.
Below is my docker-compose configuration:include:
- ./docker-compose-base.yml
To ensure that the container processes the locally modified service_conf.yaml.template instead of the one included in its image, you need to mount the local service_conf.yaml.template to the container.
services:
ragflow-cpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- cpu
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
ragflow-gpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- gpu
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]