thx / rap2-delos

阿里妈妈前端团队出品的开源接口管理工具RAP第二代
http://rap2.taobao.org
MIT License
7.64k stars 1.35k forks source link

[Bug] dolores镜像中sh脚本配置的nginx路径错误 #816

Closed ishells closed 3 years ago

ishells commented 3 years ago

BUG描述

当我使用k8s部署dolores之后,访问测试对应后端端口。页面显示“努力加载中”,不会出现更多内容

随后使用kubectl logs pod名称看到报错如: /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: error: /etc/nginx/conf.d/default.conf is not a file or does not exist

复现步骤 1、dolores、delos部署完成后,使用浏览器访问dolores端口测试,页面显示“努力加载中”,不会出现更多内容 2、查看dolores日志,发现报错:/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: error: /etc/nginx/conf.d/default.conf is not a file or does not exist 3、exec 到 pod 中,查看对应目录下nginx配置文件为: /etc/nginx/conf.d # ls nginx.conf

截图 1、web错误 dolores-web-error 2、日志 dolores-logs 3、dolores中nginx配置文件位置 dolores-nginx

ishells commented 3 years ago

多次验证发现此错误原因不在于nginx配置。

错误原因: 访问前端dolores,会发送请求到后端delos,请确保后端服务正常运行并且端口可连接。如果配置了LB那就是LB监听的38080端口,如果未配置LB那就是后端服务的38080端口。