/crumbIssuer/api/json return 404

1,199 views
Skip to first unread message

Igal Harel

unread,
Jul 19, 2015, 10:56:44 AM7/19/15
to jenkins...@googlegroups.com
Hi,

I'm trying to add a new job using  https://github.com/RisingOak/jenkins-client (Java client), and it fails

In the log I see the following error

17:08:00.184 [main] DEBUG org.apache.http.wire -  << "<body><h2>HTTP ERROR 404</h2>[\n]"
17:08:00.184 [main] DEBUG org.apache.http.wire -  << "<p>Problem accessing /crumbIssuer/api/json. Reason:[\n]"
17:08:00.184 [main] DEBUG org.apache.http.wire -  << "<pre>    Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>                                                [\n]"

Any idea what can it be?


Thanks
Igal

James Nord

unread,
Aug 4, 2015, 6:06:16 PM8/4/15
to Jenkins Users
the crumbIssuer is only available if you have enabled "Prevent Cross Site Request Forgery exploits" in the Jenkins configuration.
If it is failing as that is not enabled it is a bug in the tool - it should check if it is enabled and not use a crumb if not enabled (ie handle the 404 and continue without a crumb).
as a workaround you can enabled the option - but if you have any other API integrations beware they may start failing!
(generally this option is one you should have on IMHO)

/James

Khai Do

unread,
Aug 9, 2015, 12:22:59 PM8/9/15
to Jenkins Users
If you are interested in an alternative tool, we use python-jenkins (https://pypi.python.org/pypi/python-jenkins) to add jobs to jenkins and that does work with the "Prevent Cross Site Request Forgery exploits" feature.  
Reply all
Reply to author
Forward
0 new messages