ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Bug]: Registration and login are unresponsive,ragflow-es-01 container keep restarting on macmini m4

Open weigeloveu opened this issue 10 months ago • 8 comments

Is there an existing issue for the same bug?

  • [x] I have checked the existing issues.

RAGFlow workspace code commit ID

4694604

RAGFlow image version

v0.16.0-63-g7b5d8312

Other environment information

macmini m4
os version:15.3.1

Actual behavior

Registration and login are unresponsive,ragflow-es-01 container keep restarting i have readed this and follow all step by step,but cant help https://github.com/infiniflow/ragflow/issues/4696 https://github.com/baiyin/baiyin.github.io/blob/main/_posts/2024-12-27-Steps-to-Set-Up-RagFlow-on-macOS.md

Expected behavior

No response

Steps to reproduce

git clone https://github.com/infiniflow/ragflow.git
cd ragflow/
pip3 install huggingface_hub nltk
python3 download_deps.py
vi docker/.env
line84:RAGFLOW_IMAGE=infiniflow/ragflow:v0.16.0
line126 :MACOS=1
docker build -f Dockerfile.deps -t infiniflow/ragflow_deps .
docker build -f Dockerfile -t infiniflow/ragflow:nightly .
docker compose -f docker/docker-compose-macos.yml up -d

Additional information

2025-02-18 12:44:59,629 INFO     217 RAGFlow version: v0.16.0-63-g7b5d8312 full
2025-02-18 12:44:59,629 INFO     217 project base: /ragflow
2025-02-18 12:44:59,630 INFO     217 Current configs, from /ragflow/conf/service_conf.yaml:
	ragflow: {'host': '0.0.0.0', 'http_port': 9380}
	mysql: {'name': 'rag_flow', 'user': 'root', 'password': '********', 'host': 'mysql', 'port': 3306, 'max_connections': 100, 'stale_timeout': 30}
	minio: {'user': 'rag_flow', 'password': '********', 'host': 'minio:9000'}
	es: {'hosts': 'http://es01:9200', 'username': 'elastic', 'password': '********'}
	infinity: {'uri': 'infinity:23817', 'db_name': 'default_db'}
	redis: {'db': 1, 'password': '********', 'host': 'redis:6379'}
2025-02-18 12:44:59,630 INFO     217 Use Elasticsearch http://es01:9200 as the doc engine.
2025-02-18 12:44:59,633 INFO     217 GET http://es01:9200/ [status:N/A duration:0.003s]
2025-02-18 12:44:59,633 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 1 times in a row, putting on 1 second timeout
2025-02-18 12:44:59,633 WARNING  217 Retrying request after failure (attempt 0 of 3)
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
    meta, raw_data = node.perform_request(
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
    raise err from None
elastic_transport.ConnectionError: Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff4e00a500>: Failed to resolve 'es01' ([Errno -2] Name or service not known))
2025-02-18 12:44:59,636 INFO     217 GET http://es01:9200/ [status:N/A duration:0.002s]
2025-02-18 12:44:59,636 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 2 times in a row, putting on 2 second timeout
2025-02-18 12:44:59,637 WARNING  217 Retrying request after failure (attempt 1 of 3)
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
    meta, raw_data = node.perform_request(
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
    raise err from None
elastic_transport.ConnectionError: Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff4e00a440>: Failed to resolve 'es01' ([Errno -2] Name or service not known))
2025-02-18 12:44:59,640 INFO     217 GET http://es01:9200/ [status:N/A duration:0.003s]
2025-02-18 12:44:59,640 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 3 times in a row, putting on 4 second timeout
2025-02-18 12:44:59,640 WARNING  217 Retrying request after failure (attempt 2 of 3)
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
    meta, raw_data = node.perform_request(
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
    raise err from None
elastic_transport.ConnectionError: Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff4e00a2c0>: Failed to resolve 'es01' ([Errno -2] Name or service not known))
2025-02-18 12:44:59,642 INFO     217 GET http://es01:9200/ [status:N/A duration:0.002s]
2025-02-18 12:44:59,642 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 4 times in a row, putting on 8 second timeout
2025-02-18 12:44:59,642 WARNING  217 Connection error caused by: ConnectionError(Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff4e00a500>: Failed to resolve 'es01' ([Errno -2] Name or service not known))). Waiting Elasticsearch http://es01:9200 to be healthy.
./entrypoint.sh: line 19:   239 Illegal instruction     $PY rag/svr/task_executor.py $1
2025-02-18 12:45:04,652 INFO     217 GET http://es01:9200/ [status:N/A duration:0.003s]
2025-02-18 12:45:04,652 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 1 times in a row, putting on 1 second timeout
2025-02-18 12:45:04,652 WARNING  217 Retrying request after failure (attempt 0 of 3)
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
    meta, raw_data = node.perform_request(
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
    raise err from None
elastic_transport.ConnectionError: Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff53c773d0>: Failed to resolve 'es01' ([Errno -2] Name or service not known))
2025-02-18 12:45:04,655 INFO     217 GET http://es01:9200/ [status:N/A duration:0.003s]
2025-02-18 12:45:04,656 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 2 times in a row, putting on 2 second timeout
2025-02-18 12:45:04,656 WARNING  217 Retrying request after failure (attempt 1 of 3)
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
    meta, raw_data = node.perform_request(
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
    raise err from None
elastic_transport.ConnectionError: Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff53c762f0>: Failed to resolve 'es01' ([Errno -2] Name or service not known))
2025-02-18 12:45:04,658 INFO     217 GET http://es01:9200/ [status:N/A duration:0.002s]
2025-02-18 12:45:04,658 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 3 times in a row, putting on 4 second timeout
2025-02-18 12:45:04,658 WARNING  217 Retrying request after failure (attempt 2 of 3)
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
    meta, raw_data = node.perform_request(
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
    raise err from None
elastic_transport.ConnectionError: Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff53c77700>: Failed to resolve 'es01' ([Errno -2] Name or service not known))
2025-02-18 12:45:04,660 INFO     217 GET http://es01:9200/ [status:N/A duration:0.002s]
2025-02-18 12:45:04,660 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 4 times in a row, putting on 8 second timeout
2025-02-18 12:45:04,660 WARNING  217 Connection error caused by: ConnectionError(Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff53c773d0>: Failed to resolve 'es01' ([Errno -2] Name or service not known))). Waiting Elasticsearch http://es01:9200 to be healthy.
./entrypoint.sh: line 19:   267 Illegal instruction     $PY rag/svr/task_executor.py $1
2025-02-18 12:45:09,661 INFO     217 Resurrected node <Urllib3HttpNode(http://es01:9200)> (force=False)
2025-02-18 12:45:09,667 INFO     217 HEAD http://es01:9200/ [status:N/A duration:0.002s]
2025-02-18 12:45:09,668 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 5 times in a row, putting on 16 second timeout
2025-02-18 12:45:09,668 WARNING  217 Retrying request after failure (attempt 0 of 3)
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
    meta, raw_data = node.perform_request(
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
    raise err from None
elastic_transport.ConnectionError: Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff53c772e0>: Failed to resolve 'es01' ([Errno -2] Name or service not known))
2025-02-18 12:45:09,668 INFO     217 Resurrected node <Urllib3HttpNode(http://es01:9200)> (force=False)
2025-02-18 12:45:09,670 INFO     217 HEAD http://es01:9200/ [status:N/A duration:0.002s]
2025-02-18 12:45:09,671 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 6 times in a row, putting on 30 second timeout
2025-02-18 12:45:09,671 WARNING  217 Retrying request after failure (attempt 1 of 3)
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
    meta, raw_data = node.perform_request(
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
    raise err from None
elastic_transport.ConnectionError: Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff53c76b00>: Failed to resolve 'es01' ([Errno -2] Name or service not known))
2025-02-18 12:45:09,672 INFO     217 Resurrected node <Urllib3HttpNode(http://es01:9200)> (force=False)
2025-02-18 12:45:09,674 INFO     217 HEAD http://es01:9200/ [status:N/A duration:0.001s]
2025-02-18 12:45:09,674 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 7 times in a row, putting on 30 second timeout
2025-02-18 12:45:09,674 WARNING  217 Retrying request after failure (attempt 2 of 3)
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
    meta, raw_data = node.perform_request(
  File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
    raise err from None
elastic_transport.ConnectionError: Connection error caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff53c76230>: Failed to resolve 'es01' ([Errno -2] Name or service not known))
2025-02-18 12:45:09,677 INFO     217 HEAD http://es01:9200/ [status:N/A duration:0.002s]
2025-02-18 12:45:09,678 WARNING  217 Node <Urllib3HttpNode(http://es01:9200)> has failed for 8 times in a row, putting on 30 second timeout
2025-02-18 12:45:09,678 ERROR    217 Elasticsearch http://es01:9200 is unhealthy in 120s.
Traceback (most recent call last):
  File "/ragflow/api/ragflow_server.py", line 71, in <module>
    settings.init_settings()
  File "/ragflow/api/settings.py", line 168, in init_settings
    docStoreConn = rag.utils.es_conn.ESConnection()
  File "/ragflow/rag/utils/__init__.py", line 28, in _singleton
    instances[key] = cls(*args, **kw)
  File "/ragflow/rag/utils/es_conn.py", line 63, in __init__
    raise Exception(msg)
Exception: Elasticsearch http://es01:9200 is unhealthy in 120s.
2025-02-18 12:45:11,008 INFO     315 ragflow_server log path: /ragflow/logs/ragflow_server.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'}
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x0000ffff8ff3fb1c, pid=8, tid=17
#
# JRE version:  (21.0.1+12) (build )
# Java VM: OpenJDK 64-Bit Server VM (21.0.1+12-29, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, serial gc, linux-aarch64)
# Problematic frame:
# j  java.lang.System.registerNatives()V+0 [email protected]
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /usr/share/elasticsearch/hs_err_pid8.log
[0.016s][warning][os] Loading hsdis library failed
#
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/usr/local/bin/docker-entrypoint.sh: line 43:     8 Aborted                 ( elasticsearch-keystore create )

weigeloveu avatar Feb 18 '25 04:02 weigeloveu

Change service.environment in docker/docker-compose-base.yml : environment: - node.name=es01 - ELASTIC_PASSWORD=${ELASTIC_PASSWORD} - bootstrap.memory_lock=false - discovery.type=single-node - xpack.security.enabled=true - xpack.security.http.ssl.enabled=false - xpack.security.transport.ssl.enabled=false - cluster.routing.allocation.disk.watermark.low=5gb - cluster.routing.allocation.disk.watermark.high=3gb - cluster.routing.allocation.disk.watermark.flood_stage=2gb - TZ=${TIMEZONE} - "ES_JAVA_OPTS=-XX:UseSVE=0" - "CLI_JAVA_OPTS=-XX:UseSVE=0"

Same issue and that works for me

moo-nin avatar Feb 18 '25 07:02 moo-nin

Change service.environment in docker/docker-compose-base.yml : environment: - node.name=es01 - ELASTIC_PASSWORD=${ELASTIC_PASSWORD} - bootstrap.memory_lock=false - discovery.type=single-node - xpack.security.enabled=true - xpack.security.http.ssl.enabled=false - xpack.security.transport.ssl.enabled=false - cluster.routing.allocation.disk.watermark.low=5gb - cluster.routing.allocation.disk.watermark.high=3gb - cluster.routing.allocation.disk.watermark.flood_stage=2gb - TZ=${TIMEZONE} - "ES_JAVA_OPTS=-XX:UseSVE=0" - "CLI_JAVA_OPTS=-XX:UseSVE=0"

Same issue and that works for me , solve runtime error problem ,but es01 unhealthy still exists

moo-nin avatar Feb 18 '25 07:02 moo-nin

Change service.environment in docker/docker-compose-base.yml : environment: - node.name=es01 - ELASTIC_PASSWORD=${ELASTIC_PASSWORD} - bootstrap.memory_lock=false - discovery.type=single-node - xpack.security.enabled=true - xpack.security.http.ssl.enabled=false - xpack.security.transport.ssl.enabled=false - cluster.routing.allocation.disk.watermark.low=5gb - cluster.routing.allocation.disk.watermark.high=3gb - cluster.routing.allocation.disk.watermark.flood_stage=2gb - TZ=${TIMEZONE} - "ES_JAVA_OPTS=-XX:UseSVE=0" - "CLI_JAVA_OPTS=-XX:UseSVE=0"

Same issue and that works for me

我又重新构建了一下还是不行,mac不是要用docker-compose-macos.yml这个启动吗

weigeloveu avatar Feb 19 '25 09:02 weigeloveu

same issue on macos

garyyang85 avatar Feb 22 '25 12:02 garyyang85

same issue on macos

cylcc06 avatar Feb 24 '25 04:02 cylcc06

same issue on macos

ZhYong10 avatar Feb 25 '25 01:02 ZhYong10

Change service.environment in docker/docker-compose-base.yml : environment: - node.name=es01 - ELASTIC_PASSWORD=${ELASTIC_PASSWORD} - bootstrap.memory_lock=false - discovery.type=single-node - xpack.security.enabled=true - xpack.security.http.ssl.enabled=false - xpack.security.transport.ssl.enabled=false - cluster.routing.allocation.disk.watermark.low=5gb - cluster.routing.allocation.disk.watermark.high=3gb - cluster.routing.allocation.disk.watermark.flood_stage=2gb - TZ=${TIMEZONE} - "ES_JAVA_OPTS=-XX:UseSVE=0" - "CLI_JAVA_OPTS=-XX:UseSVE=0" Same issue and that works for me

我又重新构建了一下还是不行,mac不是要用docker-compose-macos.yml这个启动吗

需要,但是这样启动后面还有一个其它问题解决不了,现在我换dify了:)

moo-nin avatar Feb 25 '25 03:02 moo-nin

The approach in this thread worked for my M4 chip:

https://github.com/infiniflow/ragflow/issues/5038#issuecomment-2683767901

add to: .env file under docker directory

_JAVA_OPTIONS=-XX:UseSVE=0 OPENBLAS_CORETYPE=generic NUMBA_DISABLE_JIT=1

sean-bit813 avatar Feb 26 '25 09:02 sean-bit813

The approach in this thread worked for my M4 chip:

#5038 (comment)

add to: .env file under docker directory

_JAVA_OPTIONS=-XX:UseSVE=0 OPENBLAS_CORETYPE=generic NUMBA_DISABLE_JIT=1

thanks,its workd

weigeloveu avatar Feb 27 '25 16:02 weigeloveu

The approach in this thread worked for my M4 chip:

#5038 (comment)

add to: .env file under docker directory

_JAVA_OPTIONS=-XX:UseSVE=0 OPENBLAS_CORETYPE=generic NUMBA_DISABLE_JIT=1

Thx, its workd for me.

linkly-ai avatar Mar 18 '25 10:03 linkly-ai