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

无法进入web UI #36

Closed
VectorZhao opened this issue Oct 19, 2023 · 16 comments
Closed

无法进入web UI #36

VectorZhao opened this issue Oct 19, 2023 · 16 comments

Comments

@VectorZhao
Copy link

$ docker ps
CONTAINER ID   IMAGE                     COMMAND                  CREATED         STATUS                   PORTS                                         NAMES
092f09a6498d   xagent-server:0.1         "python start_server…"   3 minutes ago   Up 3 minutes             0.0.0.0:8090->8090/tcp, :::8090->8090/tcp     XAgent-Server
eb2b5c73a43f   tool-server-monitor:0.1   "python main.py"         3 minutes ago   Up 3 minutes             8180/tcp                                      toolserver-ToolServerMonitor-1
8ae21b350e94   tool-server-manager:0.2   "gunicorn main:app -…"   3 minutes ago   Up 3 minutes (healthy)   0.0.0.0:8080->8080/tcp, :::8080->8080/tcp     toolserver-ToolServerManager-1
f7e59e282dc3   tool-server-node:0.2      "uvicorn main:app --…"   3 minutes ago   Up 3 minutes (healthy)   31942/tcp                                     toolserver-ToolServerNode-1
35cc0aea28f1   mongo                     "docker-entrypoint.s…"   3 minutes ago   Up 3 minutes             27017/tcp                                     toolserver-db-1
# root @ arm in /home/XAgent/XAgentServer on git:main x [14:28:49] 
$ docker compose up  
[+] Running 2/0
 ✔ Network xagentserver_default  Created                                                                                                     0.1s 
 ✔ Container XAgent-Server       Created                                                                                                     0.0s 
Attaching to XAgent-Server
XAgent-Server  | INFO:     Will watch for changes in these directories: ['/app']
XAgent-Server  | INFO:     Uvicorn running on http://0.0.0.0:8090 (Press CTRL+C to quit)
XAgent-Server  | INFO:     Started reloader process [1] using StatReload
XAgent-Server  | INFO:     Started server process [8]
XAgent-Server  | INFO:     Waiting for application startup.
XAgent-Server  | INFO:     Application startup complete.
XAgent-Server  |   XAgent Service Startup Param:
XAgent-Server  |             app: app:app
XAgent-Server  |             prod: False
XAgent-Server  |             base_dir: XAgentServer
XAgent-Server  |             use_redis: False
XAgent-Server  |             recorder_root_dir: running_records
XAgent-Server  |             default_login: True
XAgent-Server  |             check_running: False
XAgent-Server  |             host: 0.0.0.0
XAgent-Server  |             port: 8090
XAgent-Server  |             debug: True
XAgent-Server  |             reload: True
XAgent-Server  |             workers: 1
XAgent-Server  |             DB: <class 'XAgentServer.envs.XAgentServerEnv.DB'>
XAgent-Server  |             Redis: <class 'XAgentServer.envs.XAgentServerEnv.Redis'>
XAgent-Server  |             Email: <class 'XAgentServer.envs.XAgentServerEnv.Email'>
XAgent-Server  |             Upload: <class 'XAgentServer.envs.XAgentServerEnv.Upload'>
XAgent-Server  |   init websocket_queue
XAgent-Server  | XAgentServer is running on 0.0.0.0:8090  
XAgent-Server  | Default user: admin, token: xagent-admin, you can use it to login  
XAgent-Server  |   Create task for pong broadcast
XAgent-Server  | init a websocket manager  
XAgent-Server  | init a thread pool executor, max_workers: 1  
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   init localstorage connection: users.json
XAgent-Server  |   init localstorage connection: interaction.json
XAgent-Server  | INFO:     120.231.170.167:9394 - "GET / HTTP/1.1" 404 Not Found
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  | INFO:     172.23.0.1:47192 - "GET /api/login HTTP/1.1" 404 Not Found
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  |   pong broadcast for active connections: 0
XAgent-Server  | INFO:     120.231.170.167:9452 - "GET / HTTP/1.1" 404 Not Found
image
@sailaoda
Copy link
Collaborator

您好,如果您使用之前的代码build过镜像,可能需要删除原来的镜像后prune,用最新代码重新build可以生效。如果还有问题随时沟通 ~

@ChengFai
Copy link
Contributor

您好,您能npm run 起来网页吗

@yinfangchen
Copy link

yinfangchen commented Oct 20, 2023

Both localhost:8090 and 0.0.0.0:8090 cannot see the web GUI. I got 404 errors.
And I git clone the newest version.

@VectorZhao
Copy link
Author

您好,您能npm run 起来网页吗

目前还没尝试过

@VectorZhao
Copy link
Author

您好,如果您使用之前的代码build过镜像,可能需要删除原来的镜像后prune,用最新代码重新build可以生效。如果还有问题随时沟通 ~

最新代码

@sailaoda
Copy link
Collaborator

您好,目前您需要进入 XAgentWeb 文件夹, "npm install" 和 "npm run dev" ,来启动前端Web UI 界面进行访问,8090这个端口是后端的接口地址。您启动前端界面后, 按照提示访问页面,一般是 http://127.0.0.1:5173。 后续我们会将Web UI 的前后端都放在docker启动,简化两步操作为一步。

@sailaoda
Copy link
Collaborator

您好,我们更新了最新代码,将web ui的前后端 build 在一个 docker 里,详情请看 readme.md,这次更新将改善 前后端的通信。

@VectorZhao
Copy link
Author

您好,我们更新了最新代码,将web ui的前后端 build 在一个 docker 里,详情请看 readme.md,这次更新将改善 前后端的通信。

最新github代码报错:

# root @ arm01 in /home/XAgent/XAgentServer on git:main x [17:08:13] 
$ docker compose up -d
[+] Running 1/1
 ! XAgentServer Warning                                                                                                                      2.7s 
[+] Building 7.8s (10/23)                                                                                                          docker:default
 => [XAgentServer internal] load build definition from Dockerfile                                                                            0.0s
 => => transferring dockerfile: 963B                                                                                                         0.0s
 => [XAgentServer internal] load .dockerignore                                                                                               0.0s
 => => transferring context: 2B                                                                                                              0.0s
 => [XAgentServer internal] load metadata for docker.io/library/python:3.10                                                                  1.4s
 => [XAgentServer internal] load metadata for docker.io/library/node:lts-alpine                                                              2.4s
 => CANCELED [XAgentServer xagentweb 1/6] FROM docker.io/library/node:lts-alpine@sha256:435dcad253bb5b7f347ebc69c8cc52de7c912eb7241098b920f  5.1s
 => => resolve docker.io/library/node:lts-alpine@sha256:435dcad253bb5b7f347ebc69c8cc52de7c912eb7241098b920f2fc2d7843183d                     0.1s
 => => sha256:579b34f0a95bb83b3acd6b3249ddc52c3d80f5c84b13c944e9e324feb86dd329 3.33MB / 3.33MB                                               0.4s
 => => sha256:193dce5f4a0cf83f577b68c70b4e91199f39f88aac032b21359a13314f7dc6f5 48.02MB / 48.02MB                                             0.9s
 => => sha256:78d1fe6b9b44fc9c132c16332d54041ac771dc5e65e8fee11bba0ee306c9b04e 2.34MB / 2.34MB                                               0.4s
 => => sha256:435dcad253bb5b7f347ebc69c8cc52de7c912eb7241098b920f2fc2d7843183d 1.43kB / 1.43kB                                               0.0s
 => => sha256:f439e9091207d478bf7cf8ce3967ea08f3ef357f08eb264dd14eac7f4dacfcb8 1.16kB / 1.16kB                                               0.0s
 => => sha256:f5a5f92010157c0e38d5611b97eb473f6f95fd583c8bf45a2fca5cddd987bdb5 6.79kB / 6.79kB                                               0.0s
 => => extracting sha256:579b34f0a95bb83b3acd6b3249ddc52c3d80f5c84b13c944e9e324feb86dd329                                                    0.5s
 => => sha256:18c854bc80eaceb8b8e4e799cc9955831ea8355d0b61a08b80b3a5226ea1da55 450B / 450B                                                   1.0s
 => => extracting sha256:193dce5f4a0cf83f577b68c70b4e91199f39f88aac032b21359a13314f7dc6f5                                                    3.0s
 => [XAgentServer internal] load build context                                                                                               5.1s
 => => transferring context: 282.45MB                                                                                                        2.9s
 => CACHED [XAgentServer xagentserver  1/12] FROM docker.io/library/python:3.10@sha256:85de714b205693782cc48408bc48815343529987aae396b1adbb  0.0s
 => [XAgentServer xagentserver  2/12] RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple                           5.2s
 => CACHED [XAgentServer xagentweb 2/6] WORKDIR /app                                                                                         0.0s
 => ERROR [XAgentServer xagentweb 3/6] COPY ./XAgentWeb/package.json ./XAgentWeb/package-lock.json ./                                        0.0s
------                                                                                                                                            
 > [XAgentServer xagentweb 3/6] COPY ./XAgentWeb/package.json ./XAgentWeb/package-lock.json ./:
------
failed to solve: failed to compute cache key: failed to calculate checksum of ref e398562a-3147-493b-9274-a05f6764af63::90p3o9klne7wkgi90v07fvgxr: "/XAgentWeb/package-lock.json": not found

@sailaoda
Copy link
Collaborator

谢谢您的反馈,已经去掉lock,现在不会出现了

@VectorZhao
Copy link
Author

VectorZhao commented Oct 20, 2023

一直停留在这个界面。
image
image

INFO:     Will watch for changes in these directories: ['/app']
INFO:     Uvicorn running on http://0.0.0.0:8090 (Press CTRL+C to quit)
INFO:     Started reloader process [1] using StatReload
INFO:     Started server process [9]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
  XAgent Service Startup Param:
            app: app:app
            prod: False
            base_dir: XAgentServer
            use_redis: False
            recorder_root_dir: running_records
            default_login: True
            check_running: False
            host: 0.0.0.0
            port: 8090
            debug: True
            reload: True
            workers: 1
            DB: <class 'XAgentServer.envs.XAgentServerEnv.DB'>
            Redis: <class 'XAgentServer.envs.XAgentServerEnv.Redis'>
            Email: <class 'XAgentServer.envs.XAgentServerEnv.Email'>
            Upload: <class 'XAgentServer.envs.XAgentServerEnv.Upload'>
  init websocket_queue
XAgentServer is running on 0.0.0.0:8090  
Default user: admin, token: xagent-admin, you can use it to login  
  Create task for pong broadcast
init a websocket manager  
init a thread pool executor, max_workers: 1  
  pong broadcast for active connections: 0
  init localstorage connection: users.json
  init localstorage connection: interaction.json
  pong broadcast for active connections: 0
  pong broadcast for active connections: 0
  pong broadcast for active connections: 0
INFO:     127.0.0.1:36474 - "POST /login HTTP/1.0" 200 OK

@sailaoda
Copy link
Collaborator

您好,尝试重新发送query看看,并检查您的ToolServer启动了吗

@VectorZhao
Copy link
Author

monitor

INFO:	 Database connected
INFO:	 Docker client connected

manager

[2023-10-20 17:07:57 +0000] [1] [INFO] Starting gunicorn 21.2.0
[2023-10-20 17:07:58 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[2023-10-20 17:07:58 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2023-10-20 17:07:58 +0000] [7] [INFO] Booting worker with pid: 7
[2023-10-20 17:07:58 +0000] [8] [INFO] Booting worker with pid: 8
[2023-10-20 17:07:58 +0000] [9] [INFO] Booting worker with pid: 9
[2023-10-20 17:07:58 +0000] [10] [INFO] Booting worker with pid: 10
[2023-10-20 17:07:58 +0000] [11] [INFO] Booting worker with pid: 11
[2023-10-20 17:07:58 +0000] [13] [INFO] Booting worker with pid: 13
[2023-10-20 17:07:58 +0000] [12] [INFO] Booting worker with pid: 12
[2023-10-20 17:07:58 +0000] [14] [INFO] Booting worker with pid: 14
[2023-10-20 17:08:01 +0000] [8] [INFO] Started server process [8]
[2023-10-20 17:08:01 +0000] [8] [INFO] Waiting for application startup.
[2023-10-20 17:08:01 +0000] [11] [INFO] Started server process [11]
[2023-10-20 17:08:01 +0000] [11] [INFO] Waiting for application startup.
[2023-10-20 17:08:01 +0000] [8] [INFO] Application startup complete.
[2023-10-20 17:08:01 +0000] [11] [INFO] Application startup complete.
[2023-10-20 17:08:01 +0000] [9] [INFO] Started server process [9]
[2023-10-20 17:08:01 +0000] [9] [INFO] Waiting for application startup.
[2023-10-20 17:08:01 +0000] [9] [INFO] Application startup complete.
[2023-10-20 17:08:01 +0000] [12] [INFO] Started server process [12]
[2023-10-20 17:08:01 +0000] [14] [INFO] Started server process [14]
[2023-10-20 17:08:01 +0000] [12] [INFO] Waiting for application startup.
[2023-10-20 17:08:01 +0000] [14] [INFO] Waiting for application startup.
[2023-10-20 17:08:01 +0000] [7] [INFO] Started server process [7]
[2023-10-20 17:08:01 +0000] [7] [INFO] Waiting for application startup.
[2023-10-20 17:08:01 +0000] [13] [INFO] Started server process [13]
[2023-10-20 17:08:01 +0000] [14] [INFO] Application startup complete.
[2023-10-20 17:08:01 +0000] [12] [INFO] Application startup complete.
[2023-10-20 17:08:01 +0000] [13] [INFO] Waiting for application startup.
[2023-10-20 17:08:01 +0000] [7] [INFO] Application startup complete.
[2023-10-20 17:08:01 +0000] [13] [INFO] Application startup complete.
[2023-10-20 17:08:01 +0000] [10] [INFO] Started server process [10]
[2023-10-20 17:08:01 +0000] [10] [INFO] Waiting for application startup.
[2023-10-20 17:08:01 +0000] [10] [INFO] Application startup complete.
[2023-10-20 17:25:39 +0000] [9] [WARNING] Invalid HTTP request received.
[2023-10-20 17:25:39 +0000] [11] [WARNING] Invalid HTTP request received.

@sailaoda
Copy link
Collaborator

image

@sailaoda
Copy link
Collaborator

您好,请尝试重新 输入查询,即使nin您没有启动 ToolServerNode,也将会出现上一个评论的 log

image

@VectorZhao
Copy link
Author

怎么查询都没有反应,日志没有变化

@iamsuperzb
Copy link

iamsuperzb commented Oct 22, 2023

XAgent-Server | XAgent Service Startup Param:
XAgent-Server | app: app:app
XAgent-Server | prod: False
XAgent-Server | base_dir: XAgentServer
XAgent-Server | use_redis: False
XAgent-Server | recorder_root_dir: running_records
XAgent-Server | default_login: True
XAgent-Server | check_running: False
XAgent-Server | host: 0.0.0.0
XAgent-Server | port: 8090
XAgent-Server | debug: True
XAgent-Server | reload: True
XAgent-Server | workers: 1
XAgent-Server | DB: <class 'XAgentServer.envs.XAgentServerEnv.DB'>
XAgent-Server | Redis: <class 'XAgentServer.envs.XAgentServerEnv.Redis'>
XAgent-Server | Email: <class 'XAgentServer.envs.XAgentServerEnv.Email'>
XAgent-Server | Upload: <class 'XAgentServer.envs.XAgentServerEnv.Upload'>
XAgent-Server | init websocket_queue
XAgent-Server | XAgentServer is running on 0.0.0.0:8090
XAgent-Server | Default user: admin, token: xagent-admin, you can use it to login
XAgent-Server | Create task for pong broadcast
XAgent-Server | init a websocket manager
XAgent-Server | init a thread pool executor, max_workers: 1
XAgent-Server | init localstorage connection: users.json
XAgent-Server | init localstorage connection: interaction.json
XAgent-Server | pong broadcast for active connections: 0
XAgent-Server | pong broadcast for active connections: 0
XAgent-Server | pong broadcast for active connections: 0

省略很多个 XAgent-Server | pong broadcast for active connections: 0
XAgent-Server | pong broadcast for active connections: 0
XAgent-Server | pong broadcast for active connections: 0
XAgent-Server | pong broadcast for active connections: 0
XAgent-Server | pong broadcast for active connections: 0
XAgent-Server | pong broadcast for active connections: 0
XAgent-Server | pong broadcast for active connections: 0
XAgent-Server | INFO: 10.240.3.108:0 - "POST /login HTTP/1.0" 200 OK

image

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

No branches or pull requests

5 participants