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

安装完成后,无法连接 #93

Open
as754770178 opened this issue Nov 24, 2024 · 21 comments
Open

安装完成后,无法连接 #93

as754770178 opened this issue Nov 24, 2024 · 21 comments

Comments

@as754770178
Copy link

安装界面:
image

输入网址后,没有内容:
image

客户端配置:
image

客户端无法连接:
image

还有一个问题:第一次执行 docker-compose up --build -d,后面怎么启动?

@as754770178
Copy link
Author

资源已经下载:
image

@as754770178
Copy link
Author

运行example报错:
image

@YuqiHuai
Copy link
Owner

这种情况一般是数据库没初始化好,数据库mongodb在localhost:28018,您可以看看是不是里面没有数据

@as754770178
Copy link
Author

image

网页无法访问。

请教一下,每次启动都必须执行命令docker-compose up --build -d?

@YuqiHuai
Copy link
Owner

是的 如果电脑重启过的话。可以用 docker ps -a 看看container是否在运行

@as754770178
Copy link
Author

mogodb数据库问题怎么解决?

@as754770178
Copy link
Author

有没有完整的中文安装教程?

@YuqiHuai
Copy link
Owner

YuqiHuai commented Nov 25, 2024

因为每个人遇到的问题不一样,我现在还没办法出中文教程,而且可能因为我在US,在任何一台电脑上跑这个都没出现过问题。您先下载个MongoDB Compass看看localhost:28018里是不是没有数据,如果没有数据的话可能手动导入一下就可以了。

@as754770178
Copy link
Author

你好,主要我不知道需要导入什么数据

@YuqiHuai
Copy link
Owner

https://github.com/YuqiHuai/SORA-SVL/tree/main/mongo/setup
数据都在这里 您能先看下数据库里是不是现在都为空吗

@as754770178
Copy link
Author

image

本地有四个镜像,但只起来两个容器。localhost:28018 无法访问

@as754770178
Copy link
Author

as754770178 commented Nov 26, 2024

+] Building 11.1s (40/40) FINISHED                                             
 => [sora-svl_mongo internal] load build definition from Dockerfile        0.0s
 => => transferring dockerfile: 91B                                        0.0s
 => [sora-svl_mongo internal] load .dockerignore                           0.0s
 => => transferring context: 2B                                            0.0s
 => [sora-svl_mongo internal] load metadata for docker.io/library/mongo:l  2.1s
 => [sora-svl_server internal] load build definition from Dockerfile       0.0s
 => => transferring dockerfile: 218B                                       0.0s
 => [sora-svl_server internal] load .dockerignore                          0.0s
 => => transferring context: 48B                                           0.0s
 => [sora-svl_server internal] load metadata for docker.io/library/node:1  2.0s
 => [sora-svl_client internal] load .dockerignore                          0.0s
 => => transferring context: 2B                                            0.0s
 => [sora-svl_client internal] load build definition from Dockerfile       0.0s
 => => transferring dockerfile: 234B                                       0.0s
 => [sora-svl_client internal] load metadata for docker.io/library/node:  11.0s
 => [sora-svl_nginx internal] load .dockerignore                           0.0s
 => => transferring context: 2B                                            0.0s
 => [sora-svl_nginx internal] load build definition from Dockerfile        0.0s
 => => transferring dockerfile: 142B                                       0.0s
 => [sora-svl_nginx internal] load metadata for docker.io/library/nginx:  10.5s
 => [sora-svl_server internal] load build context                          0.0s
 => => transferring context: 666B                                          0.0s
 => [sora-svl_server 1/7] FROM docker.io/library/node:18@sha256:83eb05700  0.0s
 => CACHED [sora-svl_server 2/7] RUN mkdir /workdir                        0.0s
 => CACHED [sora-svl_server 3/7] ADD package.json /workdir                 0.0s
 => CACHED [sora-svl_server 4/7] WORKDIR /workdir                          0.0s
 => CACHED [sora-svl_server 5/7] RUN npm install                           0.0s
 => CACHED [sora-svl_server 6/7] ADD ./ /workdir                           0.0s
 => CACHED [sora-svl_server 7/7] RUN ["npm", "run", "build"]               0.0s
 => [sora-svl_server] exporting to image                                   0.0s
 => => exporting layers                                                    0.0s
 => => writing image sha256:321a3aae7eb8ccf2bb3c9e767a7b4fe99a694e654dc4d  0.0s
 => => naming to docker.io/library/sora-svl_server                         0.0s
 => [sora-svl_mongo internal] load build context                           0.0s
 => => transferring context: 255B                                          0.0s
 => [sora-svl_mongo 1/2] FROM docker.io/library/mongo@sha256:c165af1a407e  0.0s
 => CACHED [sora-svl_mongo 2/2] COPY ./setup/* /docker-entrypoint-initdb.  0.0s
 => [sora-svl_mongo] exporting to image                                    0.0s
 => => exporting layers                                                    0.0s
 => => writing image sha256:d00cd7aa5632696e2e44813e3066ed8ee213a2df680ad  0.0s
 => => naming to docker.io/library/sora-svl_mongo                          0.0s
 => [sora-svl_nginx 1/3] FROM docker.io/library/nginx:alpine@sha256:74175  0.0s
 => [sora-svl_nginx internal] load build context                           0.0s
 => => transferring context: 32B                                           0.0s
 => CACHED [sora-svl_nginx 2/3] RUN rm /etc/nginx/conf.d/default.conf      0.0s
 => CACHED [sora-svl_nginx 3/3] COPY ./nginx.conf /etc/nginx/conf.d/defau  0.0s
 => [sora-svl_nginx] exporting to image                                    0.0s
 => => exporting layers                                                    0.0s
 => => writing image sha256:eb9064d9b2c26f712bb6a7078e5787a3ae4092eecaef3  0.0s
 => => naming to docker.io/library/sora-svl_nginx                          0.0s
 => [sora-svl_client 1/8] FROM docker.io/library/node@sha256:a2fea8b0b74b  0.0s
 => [sora-svl_client internal] load build context                          0.0s
 => => transferring context: 1.23kB                                        0.0s
 => CACHED [sora-svl_client 2/8] WORKDIR /app                              0.0s
 => CACHED [sora-svl_client 3/8] ADD package.json /app                     0.0s
 => CACHED [sora-svl_client 4/8] ADD package-lock.json /app                0.0s
 => CACHED [sora-svl_client 5/8] RUN npm install                           0.0s
 => CACHED [sora-svl_client 6/8] COPY ./ /app                              0.0s
 => CACHED [sora-svl_client 7/8] RUN npm run build --production            0.0s
 => CACHED [sora-svl_client 8/8] RUN npm install -g serve                  0.0s
 => [sora-svl_client] exporting to image                                   0.0s
 => => exporting layers                                                    0.0s
 => => writing image sha256:b6d406037eb297557f4f7b14f1b1b84c2b3c54011b207  0.0s
 => => naming to docker.io/library/sora-svl_client                         0.0s
[+] Running 4/4
 ⠿ Container sorasvl-mongo   Started                                       0.3s
 ⠿ Container sorasvl-server  Started                                       0.5s
 ⠿ Container sorasvl-client  Running                                       0.0s
 ⠿ Container sorasvl-router  Running                                       0.0s

在mongo目录下执行,多起来一个

CONTAINER ID   IMAGE             COMMAND                   CREATED      STATUS         PORTS                               NAMES
448f4249ef31   sora-svl_nginx    "/docker-entrypoint.…"   2 days ago   Up 6 minutes   0.0.0.0:80->80/tcp, :::80->80/tcp   sorasvl-router
f3113e55daac   sora-svl_client   "docker-entrypoint.s…"   2 days ago   Up 6 minutes   3000/tcp                            sorasvl-client
6dceef5c1387   sora-svl_server   "docker-entrypoint.s…"   2 days ago   Up 4 seconds   3000/tcp                            sorasvl-server

mongo 容器好像起不来

image

@as754770178
Copy link
Author

报错信息,

docker logs 6dce

> [email protected] start
> node dist/index.js

MongoServerSelectionError: getaddrinfo EAI_AGAIN sorasvl-mongo
    at Timeout._onTimeout (/workdir/node_modules/mongodb/lib/sdam/topology.js:292:38)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7) {
  reason: TopologyDescription {
    type: 'Unknown',
    servers: Map(1) { 'sorasvl-mongo:27017' => [ServerDescription] },
    stale: false,
    compatible: true,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    setName: null,
    maxElectionId: null,
    maxSetVersion: null,
    commonWireVersion: 0,
    logicalSessionTimeoutMinutes: null
  },
  code: undefined,
  [Symbol(errorLabels)]: Set(0) {}
}

@YuqiHuai
Copy link
Owner

可以 确实看起来是mongo起不来 我决定在我这边弄一个芒果数据库 坏处就是用户没法修改 好处就是用起来可能方便点 大概24小时内做好 稍等

@YuqiHuai
Copy link
Owner

抱歉 今天事情太多耽误了 还没弄好需要时间 周五前弄好可以吗

@as754770178
Copy link
Author

辛苦了,按您时间来就好

@as754770178
Copy link
Author

我能否本地安装mongdb? 安装后,如何配置server连接mongdb的端口

@YuqiHuai
Copy link
Owner

应该是可以的 但是您得对docker container和本地mongodb如何通信有了解
如果您能建立一个可以通信的mongodb服务器,自己倒入数据,那之后只需要在

SORA-SVL/server/.env

Lines 1 to 2 in d59afba

MONGO_URL="mongodb://sorasvl-mongo:27017"
MONGO_DB_NAME="WISE"
这里把mongodb地址改了即可

@as754770178
Copy link
Author

修改内容:主要是改用主机mongodb
image

image

image

本地mongodb可以访问:
image

错误信息:
image

修改后与之前差异:之前sora-svl_server会很快挂掉,报访问mongodb错误,现在会正常存在
image

@as754770178
Copy link
Author

去掉-d后,网页能够正常访问,但界面还是空的

(base) zxy@zxy:~/disk/hdd/SORA-SVL$ docker-compose up --build
[+] Building 4.3s (33/33) FINISHED                                                                                                                                                                         
 => [sora-svl_server internal] load build definition from Dockerfile                                                                                                                                  0.0s
 => => transferring dockerfile: 261B                                                                                                                                                                  0.0s
 => [sora-svl_server internal] load .dockerignore                                                                                                                                                     0.0s
 => => transferring context: 48B                                                                                                                                                                      0.0s
 => [sora-svl_nginx internal] load build definition from Dockerfile                                                                                                                                   0.0s
 => => transferring dockerfile: 142B                                                                                                                                                                  0.0s
 => [sora-svl_nginx internal] load .dockerignore                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                       0.0s
 => [sora-svl_server internal] load metadata for docker.io/library/node:18                                                                                                                            1.3s
 => [sora-svl_nginx internal] load metadata for docker.io/library/nginx:alpine                                                                                                                        4.1s
 => [sora-svl_client internal] load .dockerignore                                                                                                                                                     0.0s
 => => transferring context: 2B                                                                                                                                                                       0.0s
 => [sora-svl_client internal] load build definition from Dockerfile                                                                                                                                  0.0s
 => => transferring dockerfile: 318B                                                                                                                                                                  0.0s
 => [sora-svl_client internal] load metadata for docker.io/library/node:latest                                                                                                                        4.1s
 => [sora-svl_server 1/7] FROM docker.io/library/node:18@sha256:83eb05700940a88b14f21fb31cc92e9571a34b1db1a5d8781b466fc26cbb1472                                                                      0.0s
 => [sora-svl_server internal] load build context                                                                                                                                                     2.5s
 => => transferring context: 1.17MB                                                                                                                                                                   2.4s
 => CACHED [sora-svl_server 2/7] RUN mkdir /workdir                                                                                                                                                   0.0s
 => CACHED [sora-svl_server 3/7] ADD package.json /workdir                                                                                                                                            0.0s
 => CACHED [sora-svl_server 4/7] WORKDIR /workdir                                                                                                                                                     0.0s
 => CACHED [sora-svl_server 5/7] RUN npm install --registry=https://registry.npmmirror.com                                                                                                            0.0s
 => CACHED [sora-svl_server 6/7] ADD ./ /workdir                                                                                                                                                      0.0s
 => CACHED [sora-svl_server 7/7] RUN ["npm", "run", "build"]                                                                                                                                          0.0s
 => [sora-svl_server] exporting to image                                                                                                                                                              0.0s
 => => exporting layers                                                                                                                                                                               0.0s
 => => writing image sha256:9812d70dc8b7066b3c81248fc114f8e884438e3e034e5199b7393bd4685ea137                                                                                                          0.0s
 => => naming to docker.io/library/sora-svl_server                                                                                                                                                    0.0s
 => [sora-svl_nginx 1/3] FROM docker.io/library/nginx:alpine@sha256:5acf10cd305853dc2271e3c818d342f3aeb3688b1256ab8f035fda04b91ed303                                                                  0.0s
 => [sora-svl_nginx internal] load build context                                                                                                                                                      0.0s
 => => transferring context: 32B                                                                                                                                                                      0.0s
 => CACHED [sora-svl_nginx 2/3] RUN rm /etc/nginx/conf.d/default.conf                                                                                                                                 0.0s
 => CACHED [sora-svl_nginx 3/3] COPY ./nginx.conf /etc/nginx/conf.d/default.conf                                                                                                                      0.0s
 => [sora-svl_nginx] exporting to image                                                                                                                                                               0.0s
 => => exporting layers                                                                                                                                                                               0.0s
 => => writing image sha256:fb2c5a3276c3dd684886fcd18aa1f7d07d86b356775b663e15eb3be7650260ae                                                                                                          0.0s
 => => naming to docker.io/library/sora-svl_nginx                                                                                                                                                     0.0s
 => [sora-svl_client internal] load build context                                                                                                                                                     0.0s
 => => transferring context: 1.23kB                                                                                                                                                                   0.0s
 => [sora-svl_client 1/8] FROM docker.io/library/node@sha256:a2fea8b0b74b6e828caa6d83f4b2a0dcb2eb1ff90f30205c32f7bd36ddf976c4                                                                         0.0s
 => CACHED [sora-svl_client 2/8] WORKDIR /app                                                                                                                                                         0.0s
 => CACHED [sora-svl_client 3/8] ADD package.json /app                                                                                                                                                0.0s
 => CACHED [sora-svl_client 4/8] ADD package-lock.json /app                                                                                                                                           0.0s
 => CACHED [sora-svl_client 5/8] RUN npm install --registry=https://registry.npmmirror.com                                                                                                            0.0s
 => CACHED [sora-svl_client 6/8] COPY ./ /app                                                                                                                                                         0.0s
 => CACHED [sora-svl_client 7/8] RUN npm run build --production                                                                                                                                       0.0s
 => CACHED [sora-svl_client 8/8] RUN npm install -g serve --registry=https://registry.npmmirror.com                                                                                                   0.0s
 => [sora-svl_client] exporting to image                                                                                                                                                              0.0s
 => => exporting layers                                                                                                                                                                               0.0s
 => => writing image sha256:ee5c29da9ec01f126f14ea49c70010ea40332fa88fc6fe44619c6fd9c417b46d                                                                                                          0.0s
 => => naming to docker.io/library/sora-svl_client                                                                                                                                                    0.0s
WARN[0004] Found orphan containers ([sorasvl-mongo]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. 
[+] Running 3/0
 ⠿ Container sorasvl-server  Created                                                                                                                                                                  0.0s
 ⠿ Container sorasvl-client  Created                                                                                                                                                                  0.0s
 ⠿ Container sorasvl-router  Created                                                                                                                                                                  0.0s
Attaching to sorasvl-client, sorasvl-mongo, sorasvl-router, sorasvl-server
sorasvl-router  | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
sorasvl-router  | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
sorasvl-router  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
sorasvl-router  | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
sorasvl-router  | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
sorasvl-router  | /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
sorasvl-router  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
sorasvl-router  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
sorasvl-router  | /docker-entrypoint.sh: Configuration complete; ready for start up
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: using the "epoll" event method
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: nginx/1.27.3
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: built by gcc 13.2.1 20240309 (Alpine 13.2.1_git20240309) 
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: OS: Linux 5.15.0-113-generic
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker processes
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 29
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 30
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 31
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 32
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 33
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 34
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 35
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 36
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 37
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 38
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 39
sorasvl-router  | 2024/12/01 02:59:22 [notice] 1#1: start worker process 40
sorasvl-server  | 
sorasvl-server  | > [email protected] start
sorasvl-server  | > node dist/index.js
sorasvl-server  | 
sorasvl-server  | Server began listening on port 3000
sorasvl-client  |  INFO  Accepting connections at http://localhost:43407
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 GET /
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 Returned 200 in 16 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 GET /static/js/main.abdb6c9d.js
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 GET /static/css/main.a0cee7f5.css
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 Returned 200 in 3 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 Returned 200 in 4 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 GET /api/v1/maps
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 GET /favicon.ico
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 Returned 200 in 1 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 GET /manifest.json
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 Returned 200 in 2 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 Returned 200 in 2 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 GET /logo192.png
sorasvl-client  |  HTTP  12/1/2024 3:01:26 AM ::1 Returned 200 in 1 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:28 AM ::1 GET /api/v1/vehicles
sorasvl-client  |  HTTP  12/1/2024 3:01:28 AM ::1 Returned 200 in 3 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:29 AM ::1 GET /api/v1/plugins
sorasvl-client  |  HTTP  12/1/2024 3:01:29 AM ::1 Returned 200 in 7 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:29 AM ::1 GET /api/v1/clusters/simulatorStatus
sorasvl-client  |  HTTP  12/1/2024 3:01:29 AM ::1 Returned 200 in 2 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:29 AM ::1 GET /api/v1/clusters/simulatorStatus
sorasvl-client  |  HTTP  12/1/2024 3:01:29 AM ::1 Returned 304 in 2 ms
sorasvl-client  |  HTTP  12/1/2024 3:01:30 AM ::1 GET /api/v1/clusters/simulatorStatus
sorasvl-client  |  HTTP  12/1/2024 3:01:30 AM ::1 Returned 304 in 2 ms
^CGracefully stopping... (press Ctrl+C again to force)
[+] Running 4/4
 ⠿ Container sorasvl-router  Stopped                                                                                                                                                                  0.2s
 ⠿ Container sorasvl-mongo   Stopped                                                                                                                                                                  0.0s
 ⠿ Container sorasvl-client  Stopped                                                                                                                                                                 10.1s
 ⠿ Container sorasvl-server  Stopped 

@YuqiHuai
Copy link
Owner

YuqiHuai commented Dec 2, 2024

您方便给我发个邮件吗[email protected] 我想跟你约个Zoom时间看看您电脑上具体情况

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

2 participants