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

Docker化部署&文档问题 #172

Closed
QLozin opened this issue Apr 18, 2023 · 6 comments
Closed

Docker化部署&文档问题 #172

QLozin opened this issue Apr 18, 2023 · 6 comments

Comments

@QLozin
Copy link
Contributor

QLozin commented Apr 18, 2023

嗨↑嗨↓又是我

1

注意到容器异常的暴毙了,但不清楚成因,Nginx错误日志和容器日志如下:
【这个是旧版本容器产生的问题,不清楚在新版本是否修复】
Nginx:[error] 23#23: *2087 connect() failed (113: No route to host) while connecting to upstream, client: 172.■.■.■, server: chaoxing.■■■.com, request: "GET / HTTP/1.1", upstream: "http://192.168.1.5:80/", host: "chaoxing.■■■.com"

容器:
Node.js v19.7.0
Nginx: http://localhost:80
API Server: http://localhost:5000
[通用]签到成功
■■■ 114514
您已签到过了
■■■ 114514
node:events:490
throw er; // Unhandled 'error' event
^

Error: getaddrinfo EAI_AGAIN mooc1-1.chaoxing.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
Emitted 'error' event on ClientRequest instance at:
at Socket.socketErrorListener (node:_http_client:496:9)
at Socket.emit (node:events:512:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -3001,
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'mooc1-1.chaoxing.com'
}

2
因此重新拉取了最新的镜像重建容器,但相比于之前Issue #133 提到的解决方案有出入
/app/apps/server/src/configs/api.js里的baseUrl字段似乎消失了,且执行pnpm build的结果跟之前的版本有区别(不知道是不是没修改配置的结果)

需要帮助,同时建议您更新文档

@QLozin
Copy link
Contributor Author

QLozin commented Apr 18, 2023

@d4renk
Copy link

d4renk commented Apr 18, 2023

你收到的错误信息是与DNS查找超时错误有关的。这意味着它是一个网络连接错误或代理相关错误1。错误信息没有明确问题的根本原因,但如果你使用的是Firebase Cloud Functions,可能是由于免费套餐的限制(仅允许向Google服务进行出站网络连接)2。如果你使用的是Docker,原因可能是容器启动后网络发生了变化。要解决这个问题,只需停止并重新启动容器2

重启后也是这样的吗?这个应该是DNS问题

DNS一般不会故障 大概率是你网络故障
我的服务器使用内网穿透的方式对外提供服务这句话什么意思?你的服务器没有公网IP吗?
你尝试下第三个链接能否解决你的问题?

@QLozin
Copy link
Contributor Author

QLozin commented Apr 18, 2023

詪遗憾,第三个链接似乎没有切中我的问题,非常感谢你的帮助。我的服务器依赖于一个拥有公网IP的服务器提供服务。我猜测这是因为一次发生于几日前的网络波动所致,网络断开了一段时间。奇怪的是该容器一旦遇到网络错误就停止运行了,因为访问量较低,往往在需要使用的时候才能发现……尽管大部分情况下重启后都能正常运行,但还是令人苦恼。

@d4renk
Copy link

d4renk commented Apr 18, 2023

im协议是这样的
容器网络波动不会停止运行
你可以搞一个探针 基本都有掉线报警

@QLozin
Copy link
Contributor Author

QLozin commented Apr 23, 2023

我已经基本弄清楚了问题所在。是服务器周期性断网的问题,所有问题已经被解决。

@QLozin QLozin closed this as completed Apr 23, 2023
QLozin added a commit to QLozin/chaoxing-sign-cli that referenced this issue May 7, 2023
增加了排障板块
增加了Issue cxOrz#172 的问题
大概能解决(?)
cxOrz pushed a commit that referenced this issue May 7, 2023
增加了排障板块
增加了Issue #172 的问题
大概能解决(?)
cxOrz pushed a commit that referenced this issue Jul 13, 2023
增加了排障板块
增加了Issue #172 的问题
大概能解决(?)
cxOrz pushed a commit that referenced this issue Nov 4, 2023
增加了排障板块
增加了Issue #172 的问题
大概能解决(?)
cxOrz pushed a commit that referenced this issue Nov 4, 2023
增加了排障板块
增加了Issue #172 的问题
大概能解决(?)
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