DevOps
597302

成功添加GitLab应用之后,无法关联GitLab的代码库。已解决 悬赏15积分

提问者蓝石云 答案数2 阅读数262 发表时间2024-06-03 14:42:11
# 环境信息:
OS:  Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-107-generic x86_64)
客户端浏览器:Google Chrome,Microsoft Edge
禅道版本:禅道开源版:20.0

GitLab: GitLab Community Edition v16.11.2

安装方式:私有化部署,Docker 本地部署


# 问题描述:

成功添加GitLab应用之后,无法关联GitLab的代码库。


# 错误提示信息:
Webhook创建失败,请查看日志

# 错误信息截图





# DevOps > 应用 > 添加应用 

- 保存GitLab成功


日志目录:/opt/zentao/data/zentao/tmp/log

相关日志如下:


david@app-svr7:/opt/zentao/data/zentao/tmp/log$ tail -f saas.20240603.log.php
data:   Array
(
    [enable_ssl_verification] => false
    [url] => http://192.168.0.77:8003/api.php/v1/gitlab/webhook?repoID=9
    [push_events] => 1
    [merge_requests_events] => 1
    [token] => 665d400e2cf02
)


results:{"error":"Invalid url given"}

---

david@app-svr7:/opt/zentao/data/zentao/tmp/log$ tail -f php_cli.20240603.log.php
08:02:19 Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /apps/zentao/lib/dbh/dbh.class.php:76
Stack trace:
#0 /apps/zentao/lib/dbh/dbh.class.php(76): PDO->__construct('mysql:host=127....', 'root', '123456')
#1 /apps/zentao/framework/base/router.class.php(3041): dbh->__construct(Object(stdClass), true, 'MASTER')
#2 /apps/zentao/framework/base/router.class.php(2981): baseRouter->connectByPDO(Object(stdClass), 'MASTER')
#3 /apps/zentao/framework/base/router.class.php(463): baseRouter->connectDB()
#4 /apps/zentao/framework/base/router.class.php(513): baseRouter->__construct('pms', '/apps/zentao', 'running')
#5 /apps/zentao/roadrunner/scheduler.php(27): baseRouter::createApp('pms', '/apps/zentao', 'router')
#6 {main}
  thrown in /apps/zentao/lib/dbh/dbh.class.php on line 76 when visiting
---
david@app-svr7:/opt/zentao/data/zentao/tmp/log$ tail -f php.20240603.log.php
#4 framework/base/control.class.php(904): metric->updateMetricLib()
#5 framework/control.class.php(415): baseControl->fetch('metric', 'updateMetricLib', Array, '')
#6 module/cron/control.php(402): control->fetch('metric', 'updateMetricLib')
#7 module/cron/control.php(358): cron->consumeTask(1895963848, Object(stdClass))
#8 module/cron/control.php(156): cron->consumeTasks(1895963848)
#9 framework/base/router.class.php(2451): cron->ajaxExec(false)
#10 framework/router.class.php(743): baseRouter->loadModule()
#11 www/index.php(77): router->loadModule()
#12 {main}ERROR: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '`` AS `t1_`date``,`t1`.`consumed` AS `t1_consumed` FROM `zt_effort` AS t1  LE...' at line 1 ,the sql is: 'SELECT `t1`.`project` AS `t1_project`,`t1`.``date`` AS `t1_`date``,`t1`.`consumed` AS `t1_consumed` FROM `zt_effort` AS t1  LEFT JOIN `zt_project` AS t2  ON t1.project = t2.id  wHeRe t1.deleted  = '0' AND  t2.deleted  = '0' AND  t2.model  = 'waterfall' AND  t2.type  = 'project' AND ( t2.vision LIKE '%rnd%'  OR t2.vision IS NULL )' The sql is: SELECT `t1`.`project` AS `t1_project`,`t1`.``date`` AS `t1_`date``,`t1`.`consumed` AS `t1_consumed` FROM `zt_effort` AS t1  LEFT JOIN `zt_project` AS t2  ON t1.project = t2.id  wHeRe t1.deleted  = '0' AND  t2.deleted  = '0' AND  t2.model  = 'waterfall' AND  t2.type  = 'project' AND ( t2.vision LIKE '%rnd%'  OR t2.vision IS NULL ) in lib/base/dao/dao.class.php on line 1537, last called by lib/base/dao/dao.class.php on line 800 through function sqlError.
in /apps/zentao/framework/base/router.class.php on line 3170 when visiting /index.php?m=cron&f=ajaxExec&restart=0&t=html
---


禅道版本:禅道开源版 20.0

安装包类型:Linux安装包

操作系统:Ubuntu

客户端浏览器:Chrome

设置备注
内容
答案列表
2024/06/03 最佳答案
手册中有相关报错的解决方案,可以参考下:https://www.zentao.net/book/zentaopms/547.html
🌛
2024/06/05
问题已经解决了,非常感谢!
🤖
2024-06-03 16:55:35
您好,这个需要在gitlab里设置下允许webhook和服务对本地网络的请求,如果不清楚位置的话,可以添加下本页的获取技术支持QQ,邀请到禅道交流群,截图给您看看。
🌛
2024/06/05
是的,我已经更新了GitLab里的设置。感谢!
联系我们
联系人
徐亚京/高级客户经理
电话(微信)
17663982076
QQ号码
2679672214
联系邮箱
xuyajing@chandao.com
返回顶部
徐亚京
高级客户经理
17663982076
2679672214
统一服务热线 4006-8899-23
我要提问提问有任何问题,您都可以在这里提问。 问题反馈反馈点击这里,让我们聆听您的建议与反馈。