简体   繁体   English

GitLab 无法到达 docker 容器中的 PlantUml

[英]GitLab can't reach PlantUml in docker container

So I have GitLab EE server (Omnibus) installed and set up on Ubuntu 20.04.所以我在 Ubuntu 20.04 上安装并设置了 GitLab EE 服务器(综合)。 Next, following official documentation found on GitLab PlantUML integration , I started PlantUML in a docker container which I did with the following command:接下来,按照在GitLab PlantUML 集成上找到的官方文档,我在 docker 容器中启动了 PlantUML,我使用以下命令执行了该操作:

docker run -d --name plantuml -p 8084:8080 plantuml/plantuml-server:tomcat

Next, I also configured /etc/gitlab/gitlab.rb file and added next line for redirection as my GitLab server is using SSL:接下来,我还配置了 /etc/gitlab/gitlab.rb文件并添加了下一行进行重定向,因为我的 GitLab 服务器正在使用 SSL:

nginx['custom_gitlab_server_config'] = "location /-/plantuml/ { \n    proxy_cache off; \n    proxy_pass  http://plantuml:8080/; \n}\n"

In the GitLab server GUI in admin panel, in Settings -> General, when I expand PlantUML, I set the value of PlantUML URL to (two ways):在管理面板的 GitLab 服务器 GUI 中,在 Settings -> General 中,当我展开 PlantUML 时,我将PlantUML URL的值设置为(两种方式):

1st approach :第一种方法

https://HOST_SERVER_IP:8084/-/plantuml https://HOST_SERVER_IP:8084/-/plantuml

Then, when trying to reach it through the browser through this address(https://HOST_SERVER_IP:8084/-/plantuml), I get然后,当试图通过浏览器通过这个地址(https://HOST_SERVER_IP:8084/-/plantuml)访问它时,我得到

This site can't provide a secure connection.此站点无法提供安全连接。

HOST_SERVER_IP sent an invalid response. HOST_SERVER_IP 发送了无效响应。

ERR_SSL_PROTOCOL_ERROR ERR_SSL_PROTOCOL_ERROR



2nd approach : Also I tried to put before that I tried different value in in Settings -> General -> PlantUML -> PlantUML URL :第二种方法:我还尝试在设置 -> 常规 -> PlantUML -> PlantUML URL中尝试不同的值:

https://HOST_SERVER_IP/-/plantuml https://HOST_SERVER_IP/-/plantuml

Then, when trying to reach it through the browser through this address (https://HOST_SERVER_IP/-/plantuml), I get然后,当尝试通过该地址(https://HOST_SERVER_IP/-/plantuml)通过浏览器访问它时,我得到

502 502

Whoops, GitLab is taking too much time to respond糟糕,GitLab 响应时间过长



In both cases when I trace logs with gitlab-ctl tail I get the same errors:在这两种情况下,当我使用gitlab-ctl tail跟踪日志时,都会遇到相同的错误:

[crit] *901 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: CLIENT_IP, server: 0.0.0.0:443
[error] 1123593#0: *4 connect() failed (113: No route to host) while connecting to upstream

My question is which of the above two ways is correct to access PlantUML with the above configuration and is there any configuration I am missing?我的问题是,以上两种方式中哪一种是正确访问具有上述配置的 PlantUML 的,我是否缺少任何配置?

I believe the issue is that you are running the plantuml in a docker container and then trying to reach it via gitlab (on localhost) with name.我相信问题在于您正在 docker 容器中运行 plantuml,然后尝试通过 gitlab (在本地主机上)使用名称来访问它。

In order to check if that is the issue please change为了检查这是否是问题,请更改

proxy_pass  http://plantuml:8080/

to

proxy_pass http://localhost:8080/

and trying again with the first approach.并再次尝试第一种方法。

Your second approach seems to be missing the container port in the url.您的第二种方法似乎缺少 url 中的容器端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 情绪 docker 容器无法到达计费端点 - Sentiment docker container can't reach billing endpoint Gitlab Docker 容器中的防火墙设置 - Firewall settings in a Gitlab Docker container docker 内置 gitlab 找不到要构建的包 - docker build in gitlab can't find packages to build GitLab Docker-in-Docker:作业容器中的 Docker 客户端如何发现“dind”服务容器中的 Docker 守护进程? - GitLab Docker-in-Docker: how does Docker client in job container discover Docker daemon in `dind` service container? 浏览器客户端无法连接到 Docker 容器中的 DynamoDB - Browser client can't connect to DynamoDB in Docker container 使用 gitlab-ci.yml 中的 awk 命令杀死 docker 容器 - Kill a docker container using awk command in gitlab-ci.yml 无法访问 GCP PubSub 模拟器 - Can't reach GCP PubSub Emulator Jenkins Docker 容器无法访问 GKE Autopilot 中的 docker.sock - Jenkins Docker Container can't access docker.sock in GKE Autopilot Google Compute Engine:无法通过 http 请求访问正在运行的 Docker 容器 - Google Compute Engine: Can't access running Docker container through http request 无法克隆 flutter 项目 - GitLab - Can't clone a flutter project - GitLab
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM