Project

General

Profile

bug #8894

fix jenkins job cdm-server_trigger_remote-INSTALL

Added by Andreas Kohlbecker 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Highest
Category:
devOps
Target version:
-
Start date:
03/17/2020
Due date:
% Done:

100%

Severity:
normal
Found in Version:

Description

the job cdm-server_trigger_remote-INSTALL when triggering the remote job via the Parameterized Remote Trigger Plugin:

[cdm-server_trigger_remote-INSTALL] $ /bin/sh -xe /tmp/jenkins6014509262890453647.sh
+ VERSION=5.13.0-SNAPSHOT
################################################################################################################
  Parameterized Remote Trigger Configuration:
    - job:                     cdmserver-INSTALL 
    - remoteJenkinsName:       edit-test
    - auth:                    'No Authentication'
    - parameters:              [token=*****, VERSION=5.13.0-SNAPSHOT]
    - blockBuildUntilComplete: false
    - connectionRetryLimit:    5
    - trustAllCertificates:    true
################################################################################################################
Triggering parameterized remote job 'http://test.e-taxonomy.eu/jenkins/job/cdmserver-INSTALL'
  Using job-level defined 'No Authentication'
Triggering remote job now.
reuse cached crumb: test.e-taxonomy.eu
ERROR: Remote build failed with 'ExceedRetryLimitException' for the following reason: 'Max number of connection retries have been exeeded.'.
ERROR: ExceedRetryLimitException: Max number of connection retries have been exeeded.
Sending e-mails to: a.kohlbecker@bgbm.org a.mueller@bgbm.org k.luther@bgbm.org
Finished: FAILURE

The ExceedRetryLimitException has been reported by other as sometimes being related to the CSRF Protection being enabled in the remote jenkins, but fur security reasons the CSRF Protection should actually not being disabled.

Consider problems related to https://wiki.jenkins.io/display/JENKINS/Jenkins+says+my+reverse+proxy+setup+is+broken on the remote side

picture292-1.png View (34.6 KB) Andreas Kohlbecker, 03/17/2020 06:43 PM

picture943-1.png View (72.6 KB) Andreas Kohlbecker, 03/18/2020 01:02 PM

History

#1 Updated by Andreas Kohlbecker 6 months ago

  • Description updated (diff)

#2 Updated by Andreas Kohlbecker 6 months ago

From reading the Jenkins issues

It appears as if this problem is in deed related to the CSRF protection.

The results of my experiments do perfectly match the suggestion which has been given in JENKINS-61375: Using an API Token solved the problem.
I found that also using the Build Authorization Token Root Plugin also helps avoiding this problem.

For the latter case to work the Parameterized Remote Trigger Plugin must be configured like this :

#3 Updated by Andreas Kohlbecker 6 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20

#4 Updated by Andreas Kohlbecker 6 months ago

  • File picture943-1.png View added
  • Status changed from In Progress to Closed
  • Target version deleted (Release 5.14)
  • % Done changed from 20 to 100

I decided for using the Build Authorization Token Root Plugin. This adds another plugin dependency but avoids managing a special user with password and api token for triggering jobs from remote.

Setup of the build trigger on the calling jenkins:

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)