来自 xx.xxx.xx.xxx:40748 的 Traefik TLS 握手错误:来自 Jira Webhook 的 EOF
Traefik TLS handshake error from xx.xxx.xx.xxx:40748: EOF from Jira Webhook
我将 traefik 与 jenkins docker 图像一起使用,并在那里安装了 jira 触发器插件。我还在 Jira 上创建了一个 webhook,但它不是 运行 jenkins 的工作。我得到的唯一日志是:
traefik | time="2021-10-01T13:46:20Z" level=debug msg="Serving default certificate for request: \"\""
traefik | time="2021-10-01T13:46:20Z" level=debug msg="http: TLS handshake error from xx.xxx.xx.xxx:40748: EOF"
我要补充的是,这些日志仅在执行 webbhok 中定义的操作后才会出现。之前,jenkins 是独立的,我对这个插件没有任何问题。
我的配置:
docker-compose.yml
version: "3.8"
services:
traefik:
image: "traefik:v2.0"
container_name: traefik
command:
- --log.level=DEBUG
- --entrypoints.web.address=:80
- --entrypoints.web-secure.address=:443
- --api.dashboard=true
- --providers.docker=true
- --providers.file.directory=/configuration/
- --providers.file.watch=true
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik/configuration/:/configuration/
- ./traefik/certs/:/certs/
jenkins:
image: jenkins/jenkins:jdk11
restart: always
container_name: jenkins
volumes:
- /var/jenkins_home
environment:
- JENKINS_OPTS="--prefix=/jenkins"
labels:
- traefik.http.routers.jenkins-http.entrypoints=web
- traefik.http.routers.jenkins-http.rule=Host(`<my_doamin>`) && PathPrefix(`/jenkins`)
- traefik.http.routers.jenkins-http.middlewares=jenkins-https
- traefik.http.middlewares.jenkins-https.redirectscheme.scheme=https
- traefik.http.routers.jenkins.entrypoints=web-secure
- traefik.http.routers.jenkins.rule=Host(`<my_doamin>`) && PathPrefix(`/jenkins`)
- traefik.http.routers.jenkins.tls=true
configuration/certificates.toml
[[tls.certificates]]
certFile = "/certs/cert.cert"
keyFile = "/certs/key.key"
[tls.stores]
[tls.stores.default]
[tls.stores.default.defaultCertificate]
certFile = "/certs/cert.cert"
keyFile = "/certs/key.key"
Jira 网络钩子 url:https:///jenkins/jira-trigger-webhook-receiver/
如何修复 TLS 握手错误?
我找到了解决办法,只需要将域证书替换为加入的证书即可。
cat <my_domain>.crt DigiCertCA.crt TrustedRoot.crt > joined_certificate.crt
我将 traefik 与 jenkins docker 图像一起使用,并在那里安装了 jira 触发器插件。我还在 Jira 上创建了一个 webhook,但它不是 运行 jenkins 的工作。我得到的唯一日志是:
traefik | time="2021-10-01T13:46:20Z" level=debug msg="Serving default certificate for request: \"\""
traefik | time="2021-10-01T13:46:20Z" level=debug msg="http: TLS handshake error from xx.xxx.xx.xxx:40748: EOF"
我要补充的是,这些日志仅在执行 webbhok 中定义的操作后才会出现。之前,jenkins 是独立的,我对这个插件没有任何问题。
我的配置:
docker-compose.yml
version: "3.8"
services:
traefik:
image: "traefik:v2.0"
container_name: traefik
command:
- --log.level=DEBUG
- --entrypoints.web.address=:80
- --entrypoints.web-secure.address=:443
- --api.dashboard=true
- --providers.docker=true
- --providers.file.directory=/configuration/
- --providers.file.watch=true
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik/configuration/:/configuration/
- ./traefik/certs/:/certs/
jenkins:
image: jenkins/jenkins:jdk11
restart: always
container_name: jenkins
volumes:
- /var/jenkins_home
environment:
- JENKINS_OPTS="--prefix=/jenkins"
labels:
- traefik.http.routers.jenkins-http.entrypoints=web
- traefik.http.routers.jenkins-http.rule=Host(`<my_doamin>`) && PathPrefix(`/jenkins`)
- traefik.http.routers.jenkins-http.middlewares=jenkins-https
- traefik.http.middlewares.jenkins-https.redirectscheme.scheme=https
- traefik.http.routers.jenkins.entrypoints=web-secure
- traefik.http.routers.jenkins.rule=Host(`<my_doamin>`) && PathPrefix(`/jenkins`)
- traefik.http.routers.jenkins.tls=true
configuration/certificates.toml
[[tls.certificates]]
certFile = "/certs/cert.cert"
keyFile = "/certs/key.key"
[tls.stores]
[tls.stores.default]
[tls.stores.default.defaultCertificate]
certFile = "/certs/cert.cert"
keyFile = "/certs/key.key"
Jira 网络钩子 url:https://
如何修复 TLS 握手错误?
我找到了解决办法,只需要将域证书替换为加入的证书即可。
cat <my_domain>.crt DigiCertCA.crt TrustedRoot.crt > joined_certificate.crt