Search code examples
jenkinstraefikjenkins-jira-trigger

Traefik TLS handshake error from xx.xxx.xx.xxx:40748: EOF from Jira Webhook


I'm using traefik with jenkins docker image and I install there jira trigger plugin. I also created a webhook on Jira, but it doesn't run a jenkins job. The only logs I get are:

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"

I will add that these logs appear only after performing the action defined in the webbhok. Before, jenkins was standalone and I had no problem with this plugin.

My configuration:

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 webhook url: https://<my_domain>/jenkins/jira-trigger-webhook-receiver/

How can I fix the TLS handshake error?


Solution

  • I find solution, need only replace domain certificate with a joined one.

    cat <my_domain>.crt DigiCertCA.crt TrustedRoot.crt > joined_certificate.crt