infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
10.79k stars 1.04k forks source link

[Question]: dependency failed to start: container ragflow-mysql is unhealthy #329

Open younggggger opened 2 months ago

younggggger commented 2 months ago

Describe your problem

WARN[0000] The "ELASTIC_PASSWORD" variable is not set. Defaulting to a blank string. WARN[0000] /mnt/e/gpt/ragflow/docker/docker-compose-base.yml: version is obsolete WARN[0000] /mnt/e/gpt/ragflow/docker/docker-compose.yml: version is obsolete [+] Running 4/4 ✘ Container ragflow-es-01 Error 0.0s ✔ Container ragflow-kibana Running 0.0s ✔ Container ragflow-minio Running 0.0s ✘ Container ragflow-mysql Error 0.0s dependency failed to start: container ragflow-mysql is unhealthy

KevinHuSh commented 2 months ago

Let me see the log. docker logs ragflow-mysql

oreh commented 2 months ago

@younggggger If you are running this in Mac with M1/2 chips, you may replace the mysql:5.7.18 by mariadb:10.5.8

vega113 commented 2 months ago

@younggggger If you are running this in Mac with M1/2 chips, you may replace the mysql:5.7.18 by mariadb:10.5.8

I used mysql:8-oracle. Also, in case you are on M chip and running Colima as docker container, the use the following to update memory settings:

docker-machine ssh
sudo sysctl -w vm.max_map_count=262144
exit
SunnyOd commented 2 months ago

Hi,

Having similar issue here with "ragflow-mysql is unhealthy" error but I'm running linux (fedora) with Nvidia 3090.

When running docker compose up -d:

$ docker compose up -d
WARN[0000] The "ELASTIC_PASSWORD" variable is not set. Defaulting to a blank string. 
WARN[0000] /home/sunil/Codebase/prod/ragflow/docker/docker-compose-base.yml: `version` is obsolete 
WARN[0000] /home/sunil/Codebase/prod/ragflow/docker/docker-compose.yml: `version` is obsolete 
[+] Running 12/12
 ✔ ragflow Pulled                                                                                                                                                                                            180.9s 
   ✔ d66d6a6a3687 Pull complete                                                                                                                                                                                1.3s 
   ✔ a30f5d52b532 Pull complete                                                                                                                                                                              107.5s 
   ✔ 4f4fb700ef54 Pull complete                                                                                                                                                                                0.4s 
   ✔ 110ccc4f20e5 Pull complete                                                                                                                                                                                2.0s 
   ✔ 0472b0534159 Pull complete                                                                                                                                                                                8.0s 
   ✔ fbedf8ff2af0 Pull complete                                                                                                                                                                                2.9s 
   ✔ 9700932a506c Pull complete                                                                                                                                                                                3.5s 
   ✔ 1dfb9884539e Pull complete                                                                                                                                                                                4.1s 
   ✔ 12e671375b5e Pull complete                                                                                                                                                                                5.0s 
   ✔ adf4094c7660 Pull complete                                                                                                                                                                                5.5s 
   ✔ 3dcbe20c3833 Pull complete                                                                                                                                                                                6.1s 
[+] Running 6/6
 ✔ Network docker_ragflow    Created                                                                                                                                                                           0.2s 
 ✔ Container ragflow-es-01   Healthy                                                                                                                                                                          18.1s 
 ✔ Container ragflow-minio   Started                                                                                                                                                                          18.1s 
 ✘ Container ragflow-mysql   Error                                                                                                                                                                            18.1s 
 ✔ Container ragflow-server  Created                                                                                                                                                                           0.1s 
 ✔ Container ragflow-kibana  Started                                                                                                                                                                           0.1s 
dependency failed to start: container ragflow-mysql is unhealthy

Error log:

$ docker logs ragflow-mysql
2024-04-15T09:25:17.666188Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2024-04-15T09:25:17.667292Z 0 [Note] mysqld (mysqld 5.7.18) starting as process 1 ...
2024-04-15T09:25:17.669207Z 0 [Note] InnoDB: PUNCH HOLE support available
2024-04-15T09:25:17.669219Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2024-04-15T09:25:17.669222Z 0 [Note] InnoDB: Uses event mutexes
2024-04-15T09:25:17.669224Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2024-04-15T09:25:17.669225Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2024-04-15T09:25:17.669227Z 0 [Note] InnoDB: Using Linux native AIO
2024-04-15T09:25:17.669619Z 0 [Note] InnoDB: Number of pools: 1
2024-04-15T09:25:17.669701Z 0 [Note] InnoDB: Using CPU crc32 instructions
2024-04-15T09:25:17.671352Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2024-04-15T09:25:17.675994Z 0 [Note] InnoDB: Completed initialization of buffer pool
2024-04-15T09:25:17.677540Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2024-04-15T09:25:17.742968Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2024-04-15T09:25:18.063100Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2024-04-15T09:25:18.063191Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2024-04-15T09:25:18.445079Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2024-04-15T09:25:18.445871Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2024-04-15T09:25:18.445894Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2024-04-15T09:25:18.446492Z 0 [Note] InnoDB: 5.7.18 started; log sequence number 12139872
2024-04-15T09:25:18.446672Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2024-04-15T09:25:18.446819Z 0 [Note] Plugin 'FEDERATED' is disabled.
2024-04-15T09:25:18.538276Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2024-04-15T09:25:18.538308Z 0 [Warning] Failed to set up SSL because of the following SSL library error: TLS version is invalid
2024-04-15T09:25:18.538811Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2024-04-15T09:25:18.538847Z 0 [Note] IPv6 is available.
2024-04-15T09:25:18.538854Z 0 [Note]   - '::' resolves to '::';
2024-04-15T09:25:18.538868Z 0 [Note] Server socket created on IP: '::'.
2024-04-15T09:25:18.788110Z 0 [Note] InnoDB: Buffer pool(s) load completed at 240415 17:25:18
2024-04-15T09:25:18.835438Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2024-04-15T09:25:18.835467Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2024-04-15T09:25:18.835501Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2024-04-15T09:25:18.835523Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2024-04-15T09:25:18.982529Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2024-04-15T09:25:19.647380Z 0 [Note] Event Scheduler: Loaded 0 events
2024-04-15T09:25:19.647569Z 0 [Note] Execution of init_file '/data/application/init.sql' started.
2024-04-15T09:25:19.653176Z 0 [Note] Execution of init_file '/data/application/init.sql' ended.
2024-04-15T09:25:19.653241Z 0 [Note] mysqld: ready for connections.
Version: '5.7.18'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
2024-04-15T09:25:19.653247Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check. 
2024-04-15T09:25:19.653249Z 0 [Note] Beginning of list of non-natively partitioned tables
2024-04-15T09:25:19.688223Z 0 [Note] End of list of non-natively partitioned tables

Any ideas?

Thanks Sunny

LYWang20 commented 2 months ago

same issue with https://github.com/infiniflow/ragflow/issues/329#issuecomment-2056379324, any ideas?

litetoooooom commented 2 months ago

@younggggger If you are running this in Mac with M1/2 chips, you may replace the mysql:5.7.18 by `mariadb:10.5.8

I followed your prompts to modify the configuration of mysql as follows.

image

but,

ragflow-mysql | 2024-04-17 17:45:46+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.8+maria~focal started. ragflow-mysql | 2024-04-17 17:45:46 0 [Note] mysqld (mysqld 10.5.8-MariaDB-1:10.5.8+maria~focal) starting as process 1 ... ragflow-mysql | 2024-04-17 17:45:46 0 [Note] InnoDB: Using Linux native AIO ragflow-mysql | 2024-04-17 17:45:46 0 [Note] InnoDB: Uses event mutexes ragflow-mysql | 2024-04-17 17:45:46 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 ragflow-mysql | 2024-04-17 17:45:46 0 [Note] InnoDB: Number of pools: 1 ragflow-mysql | 2024-04-17 17:45:46 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions ragflow-mysql | 2024-04-17 17:45:46 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) ragflow-mysql | 2024-04-17 17:45:46 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728 ragflow-mysql | 2024-04-17 17:45:46 0 [Note] InnoDB: Completed initialization of buffer pool ragflow-mysql | 2024-04-17 17:45:46 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). ragflow-mysql | 2024-04-17 17:45:46 0 [ERROR] InnoDB: Invalid flags 0x4800 in ./ibdata1 ragflow-mysql | 2024-04-17 17:45:46 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption ragflow-mysql | 2024-04-17 17:45:46 0 [Note] InnoDB: Starting shutdown...

Leonardo123-ui commented 1 month ago

WARN[0000] The "ELASTIC_PASSWORD" variable is not set. Defaulting to a blank string. [+] Running 3/5 ⠼ Network docker_ragflow Created 21.5s ✘ Container ragflow-mysql Error 1.5s ✔ Container ragflow-es-01 Healthy 21.3s ! es01 Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. 0.0s ⠹ Container ragflow-server Created 21.2s dependency failed to start: container ragflow-mysql is unhealthy

I have the same question

Gan-Xing commented 1 month ago

image [+] Running 12/12 ✔ Network docker_ragflow Created 0.0s ✔ Volume "docker_mysql_data" Created 0.0s ✔ Volume "docker_minio_data" Created 0.0s ✔ Volume "docker_redis_data" Created 0.0s ✔ Volume "docker_esdata01" Created 0.0s ✘ Container ragflow-mysql Error 0.8s ✔ Container ragflow-es-01 Healthy 0.8s ✔ Container ragflow-redis Started 0.8s ✔ Container ragflow-minio Started 0.8s ! mysql The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.0s ✔ Container ragflow-server Created 0.1s ! ragflow The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.0s dependency failed to start: container ragflow-mysql is unhealthy (base) ganxing@ganxingdeMacBook-Air docker %

macbook-air 2020 M1,can't run it

devhero commented 1 month ago

In docker-compose-base.yml I've changed these params:

to optimize memory consumption:

image: mysql:8.0

to wait until db is ready I exagerated these:

interval: 20s
timeout: 20s
retries: 20

finally:

mysql:
    image: mysql:8.0 # <--------
    container_name: ragflow-mysql
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
      - TZ=${TIMEZONE}
    command:
      --max_connections=1000
      --character-set-server=utf8mb4
      --collation-server=utf8mb4_general_ci
      --default-authentication-plugin=caching_sha2_password # <-------- not shure if this change is usefull
      --tls_version="TLSv1.2,TLSv1.3"
      --init-file /data/application/init.sql
    ports:
      - ${MYSQL_PORT}:3306
    volumes:
      - mysql_data:/var/lib/mysql
      - ./init.sql:/data/application/init.sql
    networks:
      - ragflow
    healthcheck:
      test: ["CMD", "mysqladmin" ,"ping", "-uroot", "-p${MYSQL_PASSWORD}"]
      interval: 20s # <--------
      timeout: 20s # <--------
      retries: 20 # <--------
    restart: always
zczc12343 commented 1 month ago

WARN[0000] The "ELASTIC_PASSWORD" variable is not set. Defaulting to a blank string. [+] Running 0/5 ⠧ minio Pulling 1.7s ⠧ redis Pulling 1.7s ⠧ mysql Pulling 1.7s ⠧ ragflow Pulling 1.7s ⠧ es01 Pulling 1.7s error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH, out: `` what can i do

oyty commented 3 weeks ago

image: arm64v8/mysql:8.0-oracle

Gan-Xing commented 3 weeks ago

来信已收到。谢谢。——此为自动回复。Votre courrier est bien re?0?4u,merci.//C'est une réponse automatique.Your e-mail has been received,thanks.//This is an automatic reply.