- 服务端返回的报错信息都被云托管封装成统一的500 internal server error?
部署在云托管上的服务端,无论返回什么错误,都被云托管统一封装成500的internal server error了,response里有两个值,一个是errCode永远是-1; 一个是errMsg,包含了服务端的返回的错误码,但是返回的错误信息被丢弃, 被替换成固定的错误信息,无法利用。 有什么方法可以正常获取服务端返回的错误信息呢?如果没有那云托管是不是应该优化一下这个问题? [图片] [图片]
05-07 - 构建时prisma无法连接云托管MySQL,构建失败?
[2024-04-28 15:35:44] Step 9/11 : RUN npx prisma migrate deploy [2024-04-28 15:35:44] ---> Running in 49a6a9d2a38d [2024-04-28 15:35:45] Prisma schema loaded from prisma/schema.prisma [2024-04-28 15:35:45] Datasource "db": MySQL database "mydb" at "10.9.107.39:3306" [2024-04-28 15:35:51] [2024-04-28 15:35:51] Error: P1001: Can't reach database server at `10.9.107.39`:`3306` [2024-04-28 15:35:51] [2024-04-28 15:35:51] Please make sure your database server is running at `10.9.107.39`:`3306`. [2024-04-28 15:35:51] The command '/bin/sh -c npx prisma migrate deploy' returned a non-zero code: 1 [2024-04-28 15:35:51] [Pipeline] } ip和端口正确的: [图片]
04-28 - 选了无dockerfile,怎么还在跑docker build?
部署流水线已经选了“无dockerfile”选项,部署失败,日志显示跑docker build 失败,搞不懂。[图片] 以下是部署日志: 部署开始于 2024-01-26 16:14:55 AppID: wxee23718be609d61a 环境名称:prod-4goh0ug6a9dffaa6 [1/2] 执行流水线 进行中 预计需要 2 分钟... - [2024-01-26 16:15:02] Started by user coding [2024-01-26 16:15:02] Running in Durability level: MAX_SURVIVABILITY [2024-01-26 16:15:06] [Pipeline] Start of Pipeline [2024-01-26 16:15:11] [Pipeline] node [2024-01-26 16:15:11] Running on Jenkins in /root/workspace [2024-01-26 16:15:11] [Pipeline] { [2024-01-26 16:15:11] [Pipeline] stage [2024-01-26 16:15:11] [Pipeline] { (检出 ZIP 包) [2024-01-26 16:15:12] Stage "检出 ZIP 包" skipped due to when conditional [2024-01-26 16:15:12] [Pipeline] } [2024-01-26 16:15:12] [Pipeline] // stage [2024-01-26 16:15:12] [Pipeline] stage [2024-01-26 16:15:12] [Pipeline] { (检出代码仓库) [2024-01-26 16:15:12] [Pipeline] sh [2024-01-26 16:15:12] + git clone ****** . [2024-01-26 16:15:12] Cloning into '.'... [2024-01-26 16:15:14] [Pipeline] sh [2024-01-26 16:15:14] + git checkout main [2024-01-26 16:15:14] Already on 'main' [2024-01-26 16:15:14] Your branch is up-to-date with 'origin/main'. [2024-01-26 16:15:14] [Pipeline] } [2024-01-26 16:15:14] [Pipeline] // stage [2024-01-26 16:15:14] [Pipeline] stage [2024-01-26 16:15:14] [Pipeline] { (构建 Docker 镜像) [2024-01-26 16:15:14] [Pipeline] sh [2024-01-26 16:15:14] + docker login -u ****** -p ****** ccr.ccs.tencentyun.com/tcb-******-hkhj/ca-dtczhjvv_backend-web1:backend-web1-002-20240126161500 [2024-01-26 16:15:14] WARNING! Using --password via the CLI is insecure. Use --password-stdin. [2024-01-26 16:15:14] WARNING! Your password will be stored unencrypted in /root/.docker/config.json. [2024-01-26 16:15:14] Configure a credential helper to remove this warning. See [2024-01-26 16:15:14] https://docs.docker.com/engine/reference/commandline/login/#credentials-store [2024-01-26 16:15:14] [2024-01-26 16:15:14] Login Succeeded [2024-01-26 16:15:14] [Pipeline] sh [2024-01-26 16:15:15] + docker build -f ././/Dockerfile -t ccr.ccs.tencentyun.com/tcb-******-hkhj/ca-dtczhjvv_backend-web1:backend-web1-002-20240126161500 ./ [2024-01-26 16:15:15] DEPRECATED: The legacy builder is deprecated and will be removed in a future release. [2024-01-26 16:15:15] Install the buildx component to build images with BuildKit: [2024-01-26 16:15:15] https://docs.docker.com/go/buildx/ [2024-01-26 16:15:15] [2024-01-26 16:15:15] unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /root/workspace/Dockerfile: no such file or directory [2024-01-26 16:15:15] [Pipeline] } [2024-01-26 16:15:15] [Pipeline] // stage [2024-01-26 16:15:15] [Pipeline] stage [2024-01-26 16:15:15] [Pipeline] { (推送 Docker 镜像到 TCR) [2024-01-26 16:15:15] Stage "推送 Docker 镜像到 TCR" skipped due to earlier failure(s) [2024-01-26 16:15:15] [Pipeline] } [2024-01-26 16:15:15] [Pipeline] // stage [2024-01-26 16:15:15] [Pipeline] } [2024-01-26 16:15:15] [Pipeline] // node [2024-01-26 16:15:15] [Pipeline] End of Pipeline [2024-01-26 16:15:15] ERROR: script returned exit code 1 [2024-01-26 16:15:15] Finished: FAILURE *** -----------构建backend-web1-002----------- 2024-01-26 16:15:02 create_build_image : succ,
01-26