Not able to trigger remote parameterized build (Found 403 error)

4,215 views
Skip to first unread message

Sagar Khalasi

unread,
Dec 15, 2016, 5:13:17 AM12/15/16
to Jenkins Users
Hi all,

I am trying to follow https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Remote+Trigger+Plugin this plugin.

I have configure it as given. But still found issues like below.

1.
Server returned HTTP response code: 403 for URL: http://192.168.16.138:8090/job/remoteTriggerJob/buildWithParameters?Name=remoteTriggerJob&delay=0


2. Click on above link found this error

You must use POST method to trigger builds. (From scripts you may instead pass a per-project authentication token, or authenticate with your API token.) If you see this page, it may be because a plugin offered a GET link; file a bug report for that plugin.








While click on Proceed link , Found build get triggers.

Please resolve my issue.
15_12_2016_153408.png
15_12_2016_153524.png
Auto Generated Inline Image 1
Auto Generated Inline Image 2

Daniel Beck

unread,
Dec 15, 2016, 5:46:24 AM12/15/16
to jenkins...@googlegroups.com

> On 15.12.2016, at 11:13, Sagar Khalasi <sagar...@gmail.com> wrote:
>
> 1. Server returned HTTP response code: 403 for URL: http://192.168.16.138:8090/job/remoteTriggerJob/buildWithParameters?Name=remoteTriggerJob&delay=0

Assuming you configured authentication correctly, my guess is that the plugin cannot deal with CSRF protection. Try temporarily (!) disabling that option in the global security configuration on the destination Jenkins instance and see whether it works then. If so, that's a bug in the plugin.

Sagar Khalasi

unread,
Dec 15, 2016, 5:50:29 AM12/15/16
to Jenkins Users
Yes Found same issue after disable all type security.  So is there any other way to trigger remote job?

Sri Sayee Shyla Hari Laguduva Dhuvaraganath

unread,
Feb 15, 2017, 9:36:43 AM2/15/17
to Jenkins Users
Did you find the solution to this issue? I am currently facing it and I am unable to trigger the build

Kindly share your solution with me, if you have found one. Thanks.

Sagar Khalasi

unread,
Feb 16, 2017, 12:19:41 AM2/16/17
to Jenkins Users
Hi,

I have found solution but using different plugin and some more configuration.

https://wiki.jenkins-ci.org/display/JENKINS/SiteMonitor+Plugin


Install above plugin in Jenkins 1.


Here I have convert my remote Jenkins (Jenkins 2) machine to public IP. I can use it as website or server.

Here are some configuration in Jenkins 2



As per given above URL , create one URL (Jenkins URL) like below

http://*.*.*.*:8090/job/remoteTriggerJob/buildWithParameters?token=abcToken&Name=remoteTriggerJob&delay=0

Set 200 or 201 status code for response.

Note : above URL is customized as per my configuration. Change as per your configuration.
Auto Generated Inline Image 1
Reply all
Reply to author
Forward
0 new messages