如何修复 Quay nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
问题
在你的 quay 日志中,你看到以下错误消息:
error.txt
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
nginx stderr | 2024/07/13 01:04:58 [emerg] 175#0: open() "/var/log/nginx/error.log" failed (2: No such file or directory)解决方案
注意: 此错误通常不严重,你可以直接忽略。
你可能已在 quay 设置中将 docker 卷挂载为 /var/log,例如在 docker-compose.yml 中:
docker-compose-quay-logs.yml
services:
quay:
image: quay.io/projectquay/quay:latest
# [...]
volumes:
- ./quay_log:/var/log
# [...]在此目录中,创建 nginx 目录并使用以下命令使其可写
fix_quay_nginx_logs.sh
mkdir -p quay_log/nginx
chmod a+x quay_log/nginx之后,重启 quay,错误应该消失。
Check out similar posts by category:
Docker
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow