Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
younggggger opened this issue Apr 12, 2024 · 24 comments
Assignees
Labels
question Further information is requested

Comments

@younggggger
Copy link

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

@younggggger younggggger added the question Further information is requested label Apr 12, 2024
@KevinHuSh
Copy link
Collaborator

Let me see the log.
docker logs ragflow-mysql

@oreh
Copy link
Contributor

oreh commented Apr 12, 2024

@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
Copy link

vega113 commented Apr 13, 2024

@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
Copy link

SunnyOd commented Apr 15, 2024

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
Copy link

same issue with #329 (comment), any ideas?

@litetoooooom
Copy link

litetoooooom commented Apr 17, 2024

@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+mariafocal 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
Copy link

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
Copy link

Gan-Xing commented May 8, 2024

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
Copy link

devhero commented May 8, 2024

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
Copy link

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
Copy link

oyty commented Jun 11, 2024

image: arm64v8/mysql:8.0-oracle

@Gan-Xing
Copy link

Gan-Xing commented Jun 11, 2024 via email

@ceykmc
Copy link

ceykmc commented Jul 19, 2024

I met the same problem. I run docker logs ragflow-mysql , the log shows:

[ERROR] mysqld: File '/data/application/init.sql' not found (Errcode: 13 - Permission denied)

I change the init.sql (which is in current docker folder) by
chmod 644 ./init.sql
then it worked.

@alanOO7
Copy link

alanOO7 commented Aug 1, 2024

docker logs ragflow-mysql:show
[Warning] Failed to set up SSL because of the following SSL library error: TLS version is invalid ,

what can i do,pls!

@FellowTraveler
Copy link

Having trouble running ragflow on M3 Silicon Mac or even building the docker:
docker build --no-cache -t infiniflow/ragflow:dev -f Dockerfile.arm .

Output:

Dockerfile.arm:7
--------------------
   6 |     COPY requirements_arm.txt /ragflow/requirements.txt
   7 | >>> RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&\
   8 | >>> python -c "import nltk;nltk.download('punkt');nltk.download('wordnet')"
   9 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&python -c \"import nltk;nltk.download('punkt');nltk.download('wordnet')\"" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/fvay1k2wtt4fzbb2yijrj0r2t

@cyx951211
Copy link

是否有解决呀 我也遇到同样的问题了

@HarshitMishra76
Copy link

image: arm64v8/mysql:8.0-oracle

It worked in my case [ MACOS with silicon chip M3]

@FellowTraveler
Copy link

FellowTraveler commented Sep 13, 2024

Fails for me, M3 Mac Max. This was the newest commit last night, but now it's 10 commits old.

Command used: docker build --no-cache -t infiniflow/ragflow:dev -f Dockerfile.arm .

(ragflow_env) ragflow % git branch -va
* main                  db0606e feat: Wrap the searched chunk with a Popover #2247 (#2398)
  remotes/origin/HEAD   -> origin/main
  remotes/origin/main   db0606e feat: Wrap the searched chunk with a Popover #2247 (#2398)
  remotes/origin/poetry cc06404 refine API request data processing (#1031)
(ragflow_env) ragflow % 
(ragflow_env) ragflow % docker build --no-cache -t infiniflow/ragflow:dev -f Dockerfile.arm .
[+] Building 482.5s (10/25)                                                                                                                        docker:desktop-linux
 => [internal] load build definition from Dockerfile.arm                                                                                                           0.0s
 => => transferring dockerfile: 1.12kB                                                                                                                             0.0s
 => [internal] load metadata for docker.io/library/python:3.11                                                                                                     1.3s
 => [auth] library/python:pull token for registry-1.docker.io                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                  0.0s
 => => transferring context: 2B                                                                                                                                    0.0s
 => [ 1/20] FROM docker.io/library/python:3.11@sha256:157a371e60389919fe4a72dff71ce86eaa5234f59114c23b0b346d0d02c74d39                                             1.4s
 => => resolve docker.io/library/python:3.11@sha256:157a371e60389919fe4a72dff71ce86eaa5234f59114c23b0b346d0d02c74d39                                               0.0s
 => => sha256:157a371e60389919fe4a72dff71ce86eaa5234f59114c23b0b346d0d02c74d39 9.08kB / 9.08kB                                                                     0.0s
 => => sha256:f27891af48811b79573d713822bee97319e84cf3b38449bc5b666e605bf2824f 2.33kB / 2.33kB                                                                     0.0s
 => => sha256:7243e6bb9b092dc29c4ab8e7f67da33e928237d9fc7d65e162da46562eba3217 5.99kB / 5.99kB                                                                     0.0s
 => => sha256:29b316cac89edec4279d1d6caad85db049d9829d39f822057c73475a99520ece 22.63MB / 22.63MB                                                                   0.9s
 => => sha256:e1860d8ed6fad5e624ec09eb3d3f1b59bbf78b1750f47810b9107977cb3c316f 251B / 251B                                                                         0.4s
 => => extracting sha256:29b316cac89edec4279d1d6caad85db049d9829d39f822057c73475a99520ece                                                                          0.5s
 => => extracting sha256:e1860d8ed6fad5e624ec09eb3d3f1b59bbf78b1750f47810b9107977cb3c316f                                                                          0.0s
 => [internal] load build context                                                                                                                                  0.0s
 => => transferring context: 55.63kB                                                                                                                               0.0s
 => [ 2/20] WORKDIR /ragflow                                                                                                                                       0.1s
 => [ 3/20] COPY requirements_arm.txt /ragflow/requirements.txt                                                                                                    0.0s
 => [ 4/20] RUN pip install nltk --default-timeout=10000                                                                                                           3.9s
 => ERROR [ 5/20] RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&python -c "import nltk;nltk.download(  475.7s 

[redacted for brevity]

473.5 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
473.5 
473.5 [notice] A new release of pip is available: 24.0 -> 24.2
473.5 [notice] To update, run: pip install --upgrade pip
475.3 Traceback (most recent call last):
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/corpus/util.py", line 84, in __load
475.3     root = nltk.data.find(f"{self.subdir}/{zip_name}")
475.3            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/data.py", line 579, in find
475.3     raise LookupError(resource_not_found)
475.3 LookupError: 
475.3 **********************************************************************
475.3   Resource wordnet not found.
475.3   Please use the NLTK Downloader to obtain the resource:
475.3 
475.3   >>> import nltk
475.3   >>> nltk.download('wordnet')
475.3   
475.3   For more information see: https://www.nltk.org/data.html
475.3 
475.3   Attempted to load corpora/wordnet.zip/wordnet/
475.3 
475.3   Searched in:
475.3     - '/root/nltk_data'
475.3     - '/usr/local/nltk_data'
475.3     - '/usr/local/share/nltk_data'
475.3     - '/usr/local/lib/nltk_data'
475.3     - '/usr/share/nltk_data'
475.3     - '/usr/local/share/nltk_data'
475.3     - '/usr/lib/nltk_data'
475.3     - '/usr/local/lib/nltk_data'
475.3 **********************************************************************
475.3 
475.3 
475.3 During handling of the above exception, another exception occurred:
475.3 
475.3 Traceback (most recent call last):
475.3   File "<string>", line 1, in <module>
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/__init__.py", line 153, in <module>
475.3     from nltk.translate import *
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/translate/__init__.py", line 24, in <module>
475.3     from nltk.translate.meteor_score import meteor_score as meteor
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/translate/meteor_score.py", line 14, in <module>
475.3     from nltk.stem.api import StemmerI
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/stem/__init__.py", line 34, in <module>
475.3     from nltk.stem.wordnet import WordNetLemmatizer
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/stem/wordnet.py", line 13, in <module>
475.3     class WordNetLemmatizer:
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/stem/wordnet.py", line 48, in WordNetLemmatizer
475.3     morphy = wn.morphy
475.3              ^^^^^^^^^
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/corpus/util.py", line 120, in __getattr__
475.3     self.__load()
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/corpus/util.py", line 86, in __load
475.3     raise e
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/corpus/util.py", line 81, in __load
475.3     root = nltk.data.find(f"{self.subdir}/{self.__name}")
475.3            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
475.3   File "/usr/local/lib/python3.11/site-packages/nltk/data.py", line 579, in find
475.3     raise LookupError(resource_not_found)
475.3 LookupError: 
475.3 **********************************************************************
475.3   Resource wordnet not found.
475.3   Please use the NLTK Downloader to obtain the resource:
475.3 
475.3   >>> import nltk
475.3   >>> nltk.download('wordnet')
475.3   
475.3   For more information see: https://www.nltk.org/data.html
475.3 
475.3   Attempted to load corpora/wordnet
475.3 
475.3   Searched in:
475.3     - '/root/nltk_data'
475.3     - '/usr/local/nltk_data'
475.3     - '/usr/local/share/nltk_data'
475.3     - '/usr/local/lib/nltk_data'
475.3     - '/usr/share/nltk_data'
475.3     - '/usr/local/share/nltk_data'
475.3     - '/usr/lib/nltk_data'
475.3     - '/usr/local/lib/nltk_data'
475.3 **********************************************************************
475.3 
------
Dockerfile.arm:11
--------------------
  10 |     
  11 | >>> RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&\
  12 | >>> python -c "import nltk;nltk.download('punkt');nltk.download('wordnet')"
  13 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&python -c \"import nltk;nltk.download('punkt');nltk.download('wordnet')\"" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/38y58hbjshxgqy17pkz8gkj7o
(ragflow_env) ragflow % 

@yuzhichang
Copy link
Member

@FellowTraveler We've published multi-arch image ragflow:dev-slim. Here's how we build it: https://github.com/infiniflow/ragflow/blob/main/docs/guides/develop/build_docker_image.md

@yuzhichang yuzhichang self-assigned this Sep 28, 2024
@raymond-infinitecode
Copy link

I ended up removing the following files

sudo rm /var/lib/docker/volumes/docker_mysql_data/_data/ib_logfile0
sudo rm /var/lib/docker/volumes/docker_mysql_data/_data/ib_logfile1

then mysql started without issue

@yuzhichang
Copy link
Member

We published v0.12.0. Please have a try.

@WhiteByeBye
Copy link

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

As of today, November 17, 2024, the issue still persists in the latest dev version of Windows/WSL. After a painful struggle, I was able to resolve the problem thanks to your response. MANY THANKS!!!

@Gan-Xing
Copy link

Gan-Xing commented Nov 17, 2024 via email

@charleshuangruo
Copy link

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

Finally solved the issue. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests