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

登录时后台时登录失败,Request failed with status code 502 #16

Closed
1 task done
longtiequan opened this issue Jun 29, 2023 · 8 comments
Closed
1 task done

Comments

@longtiequan
Copy link

⚠️ 确认 issue 是否已存在 ⚠️

  • 我已经搜索了现有的问题,没有找到跟我问题相关的问题。

GPT-3 or GPT-4

GPT-3.5

操作系统

Linux

Bug 描述 📝

大佬你好,我是在虚拟机上用docker部署的,安装部署过程中没有报错,登录时报错了,前端移动端我都试过了,报同样的错误
0d3033c221dae29f4d169f682c15cf2

重现步骤 🕹

我是在虚拟机上用docker部署的,安装运行过程中都没有报错,登录后台时报错了

你的应用配置信息

Listen = "0.0.0.0:5678"
#ProxyURL = "http://172.22.11.200:7777"
ProxyURL = "http://127.0.0.1:7777"
MysqlDns = "root:12345678@tcp(172.28.173.76:3307)/chatgpt_plus?charset=utf8mb4&parseTime=True&loc=Local"
StaticDir = "./static"
StaticUrl = "http://localhost:8080/static"

[Session]
Driver = "cookie"
SecretKey = "8k0c67y2or1n7kbmn1w1c86ygqscguoktuf9t524jm64ls585z8uibpdssiy128s"
Name = "CHAT_PLUS_SESSION"
Path = "/"
Domain = ""
MaxAge = 86400
Secure = false
HttpOnly = false
SameSite = 2

[Manager]
Username = "admin"
Password = "admin_1234"

[Redis]
Host = "localhost"
Port = 6379
Password = ""

系统版本是centos 7,内核是3.10.0-1062.el7.x86_64,内存为8G,cpu为2核,硬盘容量128G

@yangjian102621
Copy link
Owner

502 的意思是后端 API 服务没有启动,或者你 nginx 转发IP 写错了。

@longtiequan
Copy link
Author

大佬,我刚刚发现是我有一个IP没有改,现在改过来了,需要重启所有服务吗?重启的脚本是不是那个build.sh文件呢
image

@yangjian102621
Copy link
Owner

重启就是先停止,在启动。 docker-compose down, 然后再执行 docker-compose up -d

@longtiequan
Copy link
Author

5f00195656e8e2a820ef554b06ea090

那个命令我肯定知道。。试过了还是会报错502,这个是我没成功启动吗?

@longtiequan
Copy link
Author

d5e13636f235d33c9ed2cac360b8807
097e19fbb9a8896483c8faa55f14e9f

这是chatgpt-plus.conf文件的配置,大佬能看看有问题吗?

@yangjian102621
Copy link
Owner

如果后端部署成功了还是提示 502, 那么就可能是你后端的容器暴露的端口没有开放,在防火墙上开一下 6789 这个端口。

@longtiequan
Copy link
Author

我的防火墙是禁用的,大佬还有什么别的方向吗

@longtiequan
Copy link
Author

解决这个问题了,需要修改MySQLDns的那个地址,改成自己服务器自己的地址

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