ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: error after docker compose up

Open Alchemistqqqq opened this issue 1 year ago • 0 comments

Describe your problem

After executing this command docker logs -f ragflow-server,I ran into some issues, but after looking through the issues, I made changes to the file.

entrypoint.sh:

#!/bin/bash

/usr/sbin/nginx

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/

PY=/root/miniconda3/envs/py11/bin/python

function task_exe(){ while [ 1 -eq 1 ];do $PY rag/svr/task_executor.py $1 $2; done }

function watch_broker(){ while [ 1 -eq 1 ];do C=ps aux|grep "task_broker.py"|grep -v grep|wc -l; if [ $C -lt 1 ];then $PY rag/svr/task_broker.py & fi sleep 5; done }

function task_bro(){ sleep 180; watch_broker; }

task_bro &

WS=2 for ((i=0;i<WS;i++)) do task_exe $i $WS & done

$PY api/ragflow_server.py

wait;

and docker-compose.yml:

version: '2.2'

include:

  • path: ./docker-compose-base.yml env_file: ./.env

services: ragflow: depends_on: mysql: condition: service_healthy es01: condition: service_healthy image: infiniflow/ragflow:v1.0 container_name: ragflow-server ports:
- ${SVR_HTTP_PORT}:9380 - 80:80 - 443:443 volumes: - ./entrypoint.sh:/ragflow/entrypoint.sh - ./service_conf.yaml:/ragflow/conf/service_conf.yaml - ./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 environment: - TZ=${TIMEZONE} networks: - ragflow restart: always I modified both files to follow the tutorial but the console output looks like this: pytorch_model.bin: 81%|████████ | 1.05G/1.30G [01:54<00:19, 13.3MB/s][WARNING] [2024-04-18 08:59:28,066] [synonym.init] [line:24]: Realtime synonym is disabled, since no redis connection. pytorch_model.bin: 83%|████████▎ | 1.08G/1.30G [01:58<00:22, 9.81MB/s]Traceback (most recent call last): ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 3291, in execute_sql ragflow-server | [WARNING] Load term.freq FAIL! ragflow-server | cursor.execute(sql, params or ()) ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/cursors.py", line 153, in execute ragflow-server | result = self._query(query) ragflow-server | ^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/cursors.py", line 322, in _query ragflow-server | conn.query(q) ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/connections.py", line 558, in query ragflow-server | self._affected_rows = self._read_query_result(unbuffered=unbuffered) ragflow-server | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/connections.py", line 822, in _read_query_result ragflow-server | result.read() ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/connections.py", line 1200, in read ragflow-server | first_packet = self.connection._read_packet() ragflow-server | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/connections.py", line 772, in _read_packet ragflow-server | packet.raise_for_error() ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/protocol.py", line 221, in raise_for_error ragflow-server | err.raise_mysql_exception(self._data) ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/err.py", line 143, in raise_mysql_exception ragflow-server | raise errorclass(errno, errval) ragflow-server | pymysql.err.ProgrammingError: (1146, "Table 'rag_flow.document' doesn't exist") ragflow-server | ragflow-server | During handling of the above exception, another exception occurred: ragflow-server | ragflow-server | Traceback (most recent call last): ragflow-server | File "/ragflow/rag/svr/task_broker.py", line 180, in ragflow-server | dispatch() ragflow-server | File "/ragflow/rag/svr/task_broker.py", line 64, in dispatch ragflow-server | rows = collect(tm) ragflow-server | ^^^^^^^^^^^ ragflow-server | File "/ragflow/rag/svr/task_broker.py", line 38, in collect ragflow-server | docs = DocumentService.get_newly_uploaded(tm) ragflow-server | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 3128, in inner ragflow-server | return fn(*args, **kwargs) ragflow-server | ^^^^^^^^^^^^^^^^^^^ ragflow-server | File "/ragflow/api/db/services/document_service.py", line 101, in get_newly_uploaded ragflow-server | return list(docs.dicts()) ragflow-server | ^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 7243, in iter ragflow-server | self.execute() ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 2011, in inner ragflow-server | return method(self, database, *args, **kwargs) ragflow-server | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 2082, in execute ragflow-server | return self._execute(database) ragflow-server | ^^^^^^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 2255, in _execute ragflow-server | cursor = database.execute(self) ragflow-server | ^^^^^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 3299, in execute ragflow-server | return self.execute_sql(sql, params) ragflow-server | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 3289, in execute_sql ragflow-server | with exception_wrapper: ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 3059, in exit ragflow-server | reraise(new_type, new_type(exc_value, *exc_args), traceback) ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 192, in reraise ragflow-server | raise value.with_traceback(tb) ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/peewee.py", line 3291, in execute_sql ragflow-server | cursor.execute(sql, params or ()) ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/cursors.py", line 153, in execute ragflow-server | result = self._query(query) ragflow-server | ^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/cursors.py", line 322, in _query ragflow-server | conn.query(q) ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/connections.py", line 558, in query ragflow-server | self._affected_rows = self._read_query_result(unbuffered=unbuffered) ragflow-server | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/connections.py", line 822, in _read_query_result ragflow-server | result.read() ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/connections.py", line 1200, in read ragflow-server | first_packet = self.connection._read_packet() ragflow-server | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/connections.py", line 772, in _read_packet ragflow-server | packet.raise_for_error() ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/protocol.py", line 221, in raise_for_error ragflow-server | err.raise_mysql_exception(self._data) ragflow-server | File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/pymysql/err.py", line 143, in raise_mysql_exception ragflow-server | raise errorclass(errno, errval) ragflow-server | peewee.ProgrammingError: (1146, "Table 'rag_flow.document' doesn't exist") ragflow-mysql | 2024-04-18T00:59:30.871704Z 24 [Note] Aborted connection 24 to db: 'rag_flow' user: 'root' host: '172.18.0.6' (Got an error reading communication packets) Can you provide some help? thanks!

Alchemistqqqq avatar Apr 18 '24 01:04 Alchemistqqqq