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

最新版报错服务器502 #170

Closed
Gavenvincent opened this issue May 24, 2023 · 15 comments
Closed

最新版报错服务器502 #170

Gavenvincent opened this issue May 24, 2023 · 15 comments

Comments

@Gavenvincent
Copy link

image
最新版,使用docker compose,报错如图;
我使用的上个版本是旧版2.12.9,没有这样的问题
报错,日志如下

[email protected] prod /app
esno ./build/index.js

Server is running on port 3002
(node:36) [MONGODB DRIVER] Warning: cursor.count is deprecated and will be removed in the next major version, please use collection.estimatedDocumentCount or collection.countDocuments instead
(Use node --trace-warnings ... to show where the warning was created)
 ELIFECYCLE  Command failed with exit code 143.

[email protected] prod /app
esno ./build/index.js

Server is running on port 3002
(node:36) [MONGODB DRIVER] Warning: cursor.count is deprecated and will be removed in the next major version, please use collection.estimatedDocumentCount or collection.countDocuments instead
(Use node --trace-warnings ... to show where the warning was created)
 ELIFECYCLE  Command failed with exit code 143.

[email protected] prod /app
esno ./build/index.js

Server is running on port 3002
(node:37) [MONGODB DRIVER] Warning: cursor.count is deprecated and will be removed in the next major version, please use collection.estimatedDocumentCount or collection.countDocuments instead
(Use node --trace-warnings ... to show where the warning was created)

@Kerwin1202
Copy link
Member

估计 mongodb 的版本有关系

@Gavenvincent
Copy link
Author

原来使用的是mongo:3.6,改成mongo最新版后,重新部署,仍然这样

@Gavenvincent
Copy link
Author

新版本应该使用mongodb的哪个版本?

@Kerwin1202
Copy link
Member

5.x 试试看,,我是 docker 部署的 所以直接就是 docker lastest 了

@Gavenvincent
Copy link
Author

旧版本都是用这个docker compose部署的,今天试2.13.2就出现这个问题了

@Kerwin1202
Copy link
Member

又仔细看了下最初的报错,第一个 f12 看下是什么错误 打开首页,看是哪个接口错误,然后 再提供一下 docker log 日志,我发现你最初的报错日志只是Warning 并不是 error 所以肯定是别的报错,找下 error 的报错看看

@Gavenvincent
Copy link
Author

docker日志的话,只有下面这样的

[email protected] prod /app
esno ./build/index.js

Server is running on port 3002
(node:36) [MONGODB DRIVER] Warning: cursor.count is deprecated and will be removed in the next major version, please use collection.estimatedDocumentCount or collection.countDocuments instead
(Use node --trace-warnings ... to show where the warning was created)

@Kerwin1202
Copy link
Member

那你浏览器f12 打开首页看看呢,,这个看不出啥

@Gavenvincent
Copy link
Author

我将原来的image: kerwin1202/chatgpt-web:v2.13.2
restart: unless-stopped
ports:

  • 3010:3002

改了其中的主机端口就好了,改成了-3011:3002 ,就好了,但是就很好奇这个问题

感谢大佬了

@Kerwin1202
Copy link
Member

那你怕是这个端口占用了,所以导致没启动起来 可以 netstat -ano | grep 3002 看看什么占了

@Gavenvincent
Copy link
Author

没有,我又改回原来的3010,但是换了个二级域名去解析就好了,我再研究研究哪的问题

@Kerwin1202
Copy link
Member

正常打开的
image

@Gavenvincent
Copy link
Author

Gavenvincent commented May 24, 2023

嗯,我刚试了换edge浏览器就正常了,只要是以前打开过的浏览器都会出现这个页面,电脑谷歌浏览器,手机的小米浏览器和谷歌浏览器都还是会出现,还试了wifi和流量,也是会出现,目前结论就是,打开过旧版本的浏览器都会出现这个现象

@Kerwin1202
Copy link
Member

server: cloudflare 估计是套了cf 缓存了 重定向的 302 之类的 ctrl + f5 刷新下就可以了

@Gavenvincent
Copy link
Author

非常感谢

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