ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Bug]: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

Open chenggangqcg opened this issue 10 months ago • 19 comments

Is there an existing issue for the same bug?

  • [x] I have checked the existing issues.

RAGFlow workspace code commit ID

v0.16.0

RAGFlow image version

v0.16.0

Other environment information

ubuntu 24

Actual behavior

2025-02-22 12:43:05,987 WARNING 21 RedisDB.queue_info rag_flow_svr_queue got exception: no such key 2025-02-22 12:43:05,987 INFO 21 task_consumer_0 reported heartbeat: {"name": "task_consumer_0", "now": "2025-02-22T12:43:05.986+08:00", "boot_at": "2025-02-22T12:26:35.095+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": null} 2025-02-22 12:43:27,779 ERROR 19 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. Traceback (most recent call last): File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request rv = self.dispatch_request() File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 854, in dispatch_request self.raise_routing_exception(req) File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 463, in raise_routing_exception raise request.routing_exception # type: ignore[misc] File "/ragflow/.venv/lib/python3.10/site-packages/flask/ctx.py", line 362, in match_request result = self.url_adapter.match(return_rule=True) # type: ignore File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/routing/map.py", line 629, in match raise NotFound() from None werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 2025-02-22 12:43:27,780 INFO 19 223.99.217.210 - - [22/Feb/2025 12:43:27] "GET / HTTP/1.1" 200 - 2025-02-22 12:43:27,869 ERROR 19 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. Traceback (most recent call last): File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request rv = self.dispatch_request() File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 854, in dispatch_request self.raise_routing_exception(req) File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 463, in raise_routing_exception raise request.routing_exception # type: ignore[misc] File "/ragflow/.venv/lib/python3.10/site-packages/flask/ctx.py", line 362, in match_request result = self.url_adapter.match(return_rule=True) # type: ignore File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/routing/map.py", line 629, in match raise NotFound() from None werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 2025-02-22 12:43:27,869 INFO 19 223.99.217.210 - - [22/Feb/2025 12:43:27] "GET /favicon.ico HTTP/1.1" 200 - 2025-02-22 12:43:36,015 WARNING 21 RedisDB.queue_info rag_flow_svr_queue got exception: no such key 2025-02-22 12:43:36,016 INFO 21 task_consumer_0 reported heartbeat: {"name": "task_consumer_0", "now": "2025-02-22T12:43:36.015+08:00", "boot_at": "2025-02-22T12:26:35.095+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": null} 2025-02-22 12:44:06,017 WARNING 21 RedisDB.queue_info rag_flow_svr_queue got exception: no such key 2025-02-22 12:44:06,017 INFO 21 task_consumer_0 reported heartbeat: {"name": "task_consumer_0", "now": "2025-02-22T12:44:06.016+08:00", "boot_at": "2025-02-22T12:26:35.095+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": null} 2025-02-22 12:44:36,048 WARNING 21 RedisDB.queue_info rag_flow_svr_queue got exception: no such key 2025-02-22 12:44:36,049 INFO 21 task_consumer_0 reported heartbeat: {"name": "task_consumer_0", "now": "2025-02-22T12:44:36.047+08:00", "boot_at": "2025-02-22T12:26:35.095+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": null} 2025-02-22 12:45:06,079 WARNING 21 RedisDB.queue_info rag_flow_svr_queue got exception: no such key 2025-02-22 12:45:06,080 INFO 21 task_consumer_0 reported heartbeat: {"name": "task_consumer_0", "now": "2025-02-22T12:45:06.079+08:00", "boot_at": "2025-02-22T12:26:35.095+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": null}

Expected behavior

No response

Steps to reproduce

access the index page

Additional information

No response

chenggangqcg avatar Feb 22 '25 04:02 chenggangqcg

What's the URL you entered?

KevinHuSh avatar Feb 24 '25 03:02 KevinHuSh

@KevinHuSh Just logon http://<ip>:9380 will get the issue and show below in browser

{
  "code": 100,
  "data": null,
  "message": "\u003CNotFound '404: Not Found'\u003E"
}

and the container log

2025-02-24 11:18:10,193 INFO     17 172.31.35.99 - - [24/Feb/2025 11:18:10] "GET / HTTP/1.1" 200 -
2025-02-24 11:18:10,490 ERROR    17 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 854, in dispatch_request
    self.raise_routing_exception(req)
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 463, in raise_routing_exception
    raise request.routing_exception  # type: ignore[misc]
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/ctx.py", line 362, in match_request
    result = self.url_adapter.match(return_rule=True)  # type: ignore
  File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/routing/map.py", line 629, in match
    raise NotFound() from None
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

kandaaaaa avatar Feb 24 '25 03:02 kandaaaaa

Strip the port number.

KevinHuSh avatar Feb 24 '25 05:02 KevinHuSh

Strip the port number.

😂

hpx502766238 avatar Feb 26 '25 12:02 hpx502766238

I have the same problem, and I see the infos on my terminal, and I tried strip the port and port 9222 9380 and some other ports mentioned in the other posts, there seems no other errors, how could solve the problem

goldeneave avatar Feb 27 '25 10:02 goldeneave

Try no ports at all.

KevinHuSh avatar Feb 28 '25 07:02 KevinHuSh

@KevinHuSh certainly I tried strip the port number, but it didn't solve my problem, it errors with same message, and I also tried add some other port numbers, but same. By the way ,I am running on a server, and I connect the server with ssh and opened the webpage on pc, so any solutions?

goldeneave avatar Mar 04 '25 09:03 goldeneave

By default, no need for port number.

  1. Make sure the network is accessible. ping <IP>
  2. Make sure the server is up. docker ps

KevinHuSh avatar Mar 05 '25 05:03 KevinHuSh

@KevinHuSh certainly I tried strip the port number, but it didn't solve my problem, it errors with same message, and I also tried add some other port numbers, but same. By the way ,I am running on a server, and I connect the server with ssh and opened the webpage on pc, so any solutions?

Similarly, I'm also using SSH to remotely connect to the server, and I got the same error as you did. I've been trying to fix it for a long time.

liyubo-debug avatar Mar 06 '25 12:03 liyubo-debug

By default, no need for port number.

  1. Make sure the network is accessible. ping <IP>
  2. Make sure the server is up. docker ps

I encountered the same problem as the poster. The default port 80 was occupied by other processes that couldn't be shut down. So, I changed it to 10080. According to the "docker ps" command, the service was started normally.

liyubo-debug avatar Mar 06 '25 12:03 liyubo-debug

Where to modify code?

Anopoke avatar Apr 01 '25 13:04 Anopoke

I got the same problem.Have you solve it now?

@KevinHuSh certainly I tried strip the port number, but it didn't solve my problem, it errors with same message, and I also tried add some other port numbers, but same. By the way ,I am running on a server, and I connect the server with ssh and opened the webpage on pc, so any solutions?

Similarly, I'm also using SSH to remotely connect to the server, and I got the same error as you did. I've been trying to fix it for a long time.

@dosu

1010521247 avatar Apr 08 '25 01:04 1010521247

By default, no need for port number.

  1. Make sure the network is accessible. ping <IP>
  2. Make sure the server is up. docker ps

I encountered the same problem as the poster. The default port 80 was occupied by other processes that couldn't be shut down. So, I changed it to 10080. According to the "docker ps" command, the service was started normally.

Hello~I have the same issue, port 80 was occupied by nginx server, and i have changed the port of ragflow-server to 81:80. Then I connected to the remote machine via VPN on my local machine【The ragflow-server service was launched on the remote machine】. When I entered "http://localhost:9380/" in the browser on my local machine, it returned {"code":100,"data":null,"message":"<NotFound '404: Not Found'>"}. When I entered "http://ragflow-server container IP:9380/" or "http://localhost:81/" or "http://127.19.0.6:81/" in the browser on my local machine, it showed that the website could not be accessed.【127.19.0.6 is container IP】 **Is there anything i can do to fix this ? **【The remote machine is shared by our group, and I can't make major changes to it.】

YuanyuanQin96 avatar May 03 '25 11:05 YuanyuanQin96

Hello @KevinHuSh! I'm Dosu, your friendly bot here to help you solve bugs, answer questions, and guide you as a contributor. I'm ready to assist you while we wait for a human maintainer. How can I help you today?

To resolve the 404 Not Found error when accessing the RAGFlow application via SSH on a server, try the following steps:

  1. Update the /etc/hosts file to resolve all hosts to 127.0.0.1:

    127.0.0.1       es01 infinity mysql minio redis
    
  2. Verify port configurations in docker/service_conf.yaml.template and ensure they match those in docker/.env. For example:

    • MySQL port: 5455
    • Elasticsearch port: 1200
  3. Update proxy.target in .umirc.ts to point to http://127.0.0.1:9380.

  4. Launch services in the correct order:

    • Start dependent services using Docker Compose.
    • Launch the backend service.
    • Launch the frontend service.
  5. Access the service using the machine's IP address without specifying port 9380. For remote access, use http://server-IP:10080.

Additionally, ensure the following:

  • Confirm that the server IP is correct and accessible.
  • Verify that RAGFlow is running healthy on the server.
  • Check for any network connectivity issues or firewall rules that might be blocking access to port 10080.

If you encounter the {"data":null,"code":100,"message":"<NotFound '404: Not Found'>"} error, ensure that your IP address or port number is correct. If you are using the default configurations, enter http://<IP_OF_YOUR_MACHINE> (without specifying port 9380 or any port number) in your browser. Also, ensure that the vm.max_map_count is set to at least 262144 in /etc/sysctl.conf to prevent issues with Elasticsearch containers [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar May 03 '25 11:05 dosubot[bot]

Meet again:{ "code": 100, "data": null, "message": "<NotFound '404: Not Found'>" } IP:http://127.0.0.1:9380/

CONTAINER ID   IMAGE                                              COMMAND                  CREATED          STATUS                    PORTS                                                                                                                                                                                                                           NAMES
08f6345b87e2   infiniflow/ragflow:v0.18.0-slim                    "./entrypoint.sh"        17 minutes ago   Up 17 minutes             0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:5678-5679->5678-5679/tcp, :::5678-5679->5678-5679/tcp, 0.0.0.0:9380->9380/tcp, :::9380->9380/tcp, 0.0.0.0:9382->9382/tcp, :::9382->9382/tcp, 0.0.0.0:81->80/tcp, :::81->80/tcp   ragflow-server
91ccde08f3d2   mysql:8.0.39                                       "docker-entrypoint.s…"   25 minutes ago   Up 25 minutes (healthy)   33060/tcp, 0.0.0.0:5455->3306/tcp, :::5455->3306/tcp                                                                                                                                                                            ragflow-mysql
9b96ca62253a   elasticsearch:8.11.3                               "/bin/tini -- /usr/l…"   25 minutes ago   Up 25 minutes (healthy)   9300/tcp, 0.0.0.0:1200->9200/tcp, :::1200->9200/tcp                                                                                                                                                                             ragflow-es-01
6b2c0962319c   valkey/valkey:8                                    "docker-entrypoint.s…"   25 minutes ago   Up 25 minutes             0.0.0.0:6379->6379/tcp, :::6379->6379/tcp                                                                                                                                                                                       ragflow-redis
a235ff785c71   quay.io/minio/minio:RELEASE.2023-12-20T01-00-02Z   "/usr/bin/docker-ent…"   25 minutes ago   Up 17 minutes             0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp                   

prot:

    ports:
      - ${SVR_HTTP_PORT}:9380
      - 81:80
      - 443:443
      - 5678:5678
      - 5679:5679
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 854, in dispatch_request
    self.raise_routing_exception(req)
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 463, in raise_routing_exception
    raise request.routing_exception  # type: ignore[misc]
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/ctx.py", line 362, in match_request
    result = self.url_adapter.match(return_rule=True)  # type: ignore
  File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/routing/map.py", line 629, in match
    raise NotFound() from None
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

vcchain2019 avatar May 07 '25 04:05 vcchain2019

Please use your RAGflow Nginx port for access, in the format: IP:81 (e.g., 192.168.1.100:81).

tkz24589 avatar Jun 04 '25 06:06 tkz24589

By default, no need for port number.

  1. Make sure the network is accessible. ping <IP>
  2. Make sure the server is up. docker ps

I encountered the same problem as the poster. The default port 80 was occupied by other processes that couldn't be shut down. So, I changed it to 10080. According to the "docker ps" command, the service was started normally.

This is also useful to me. After modifying the port(80) in docker-compose.yml to 8080, it succeeded. It's strange that the container started successfully when the port was 80.

Here is the error:

2025-06-06 14:02:46,865 ERROR    21 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again 
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 854, in dispatch_request
    self.raise_routing_exception(req)
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 463, in raise_routing_exception
    raise request.routing_exception  # type: ignore[misc]
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/ctx.py", line 362, in match_request
    result = self.url_adapter.match(return_rule=True)  # type: ignore
  File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/routing/map.py", line 629, in match
    raise NotFound() from None
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2025-06-06 14:02:46,867 INFO     21 192.168.193.10 - - [06/Jun/2025 14:02:46] "GET / HTTP/1.1" 200 -
2025-06-06 14:02:47,595 ERROR    21 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 854, in dispatch_request
    self.raise_routing_exception(req)
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 463, in raise_routing_exception
    raise request.routing_exception  # type: ignore[misc]
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/ctx.py", line 362, in match_request
    result = self.url_adapter.match(return_rule=True)  # type: ignore
  File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/routing/map.py", line 629, in match
    raise NotFound() from None
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

Jiutwo avatar Jun 06 '25 09:06 Jiutwo

This problem occurs when the token expires. The status returned by the http interface is not 401 but 404, which makes it impossible to update the token.

v1.1.3

Image

wll8 avatar Jul 08 '25 02:07 wll8