Comments (10)
I turned off HTTP/2.0 and still have the issue. A slightly different packet trace:
POST /job/manage-pubkeys/build HTTP/1.1
MIME-Version: 1.0
Extension: Security/Digest Security/SSL
Host: openbook-jenkins-master.mon.vzwops.com
Accept-encoding: gzip
Accept-charset: utf-8;q=1, gb2312;q=0.5, iso-8859-1;q=0.5, big5;q=0.5, iso-2022-jp;q=0.5, shift_jis;q=0.5, euc-tw;q=0.5, euc-jp;q=0.5, euc-jis-2004;q=0.5, euc-kr;q=0.5, iso-8859-15;q=0.5, us-ascii;q=0.5, utf-7;q=0.5, hz-gb-2312;q=0.5, big5-hkscs;q=0.5, gbk;q=0.5, gb18030;q=0.5, iso-8859-5;q=0.5, koi8-r;q=0.5, koi8-u;q=0.5, cp866;q=0.5, koi8-t;q=0.5, windows-1251;q=0.5, cp855;q=0.5, iso-8859-2;q=0.5, iso-8859-3;q=0.5, iso-8859-4;q=0.5, iso-8859-9;q=0.5, iso-8859-10;q=0.5, iso-8859-13;q=0.5, iso-8859-14;q=0.5, windows-1250;q=0.5, windows-1252;q=0.5, windows-1254;q=0.5, windows-1257;q=0.5, cp775;q=0.5, cp850;q=0.5, cp852;q=0.5, cp857;q=0.5, cp858;q=0.5, cp860;q=0.5, cp861;q=0.5, cp863;q=0.5, cp865;q=0.5, cp437;q=0.5, macintosh;q=0.5, next;q=0.5, hp-roman8;q=0.5, adobe-standard-encoding;q=0.5, iso-8859-16;q=0.5, iso-8859-7;q=0.5, windows-1253;q=0.5, cp737;q=0.5, cp851;q=0.5, cp869;q=0.5, iso-8859-8;q=0.5, windows-1255;q=0.5, cp862;q=0.5, iso-2022-jp-2004;q=0.5, cp874;q=0.5, iso-8859-11;q=0.5, viscii;q=0.5, windows-1258;q=0.5, iso-8859-6;q=0.5, windows-1256;q=0.5, iso-2022-cn;q=0.5, iso-2022-cn-ext;q=0.5, iso-2022-jp-2;q=0.5, iso-2022-kr;q=0.5, utf-16le;q=0.5, utf-16be;q=0.5, utf-16;q=0.5, x-ctext;q=0.5
Accept: /
User-Agent: URL/Emacs
Content-Type: application/x-www-form-urlencoded
Authorization: Basic a29uc3RjYTozZGVlZTdhMzMyNzhlNGQxNzBkNDEzZGUyM2UyYWNmZQ==
X-Forwarded-Proto: https
X-Forwarded-For: 10.134.10.212
HTTP/1.1 403 No valid crumb was included in the request
Date: Mon, 12 Mar 2018 21:44:44 GMT
Server: Jetty(9.4.z-SNAPSHOT)
X-Content-Type-Options: nosniff
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html;charset=utf-8
Content-Length: 405
HTTP ERROR 403
Problem accessing /job/manage-pubkeys/build. Reason:
No valid crumb was included in the request
Powered by Jetty:// 9.4.z-SNAPSHOT
from jenkins.el.
The plugin's implementation seems to expect that sending a POST request to "jenkins-url/job-name/build" with no body will work. I do not think it is the case with latest Jenkins versions (at least for the version I am using). I think there are three options:
-
Modify jenkins.el in order to trigger a parametrized build with the POST request (https://wiki.jenkins.io/display/JENKINS/Remote+access+API#RemoteaccessAPI-SubmittingJobs) as well as make use of the CSRF protection (https://wiki.jenkins.io/display/JENKINS/Remote+access+API#RemoteaccessAPI-CSRFProtection)
-
Modify jenkins.el in order to trigger a parametrized build with the POST request (https://wiki.jenkins.io/display/JENKINS/Remote+access+API#RemoteaccessAPI-SubmittingJobs) and disable CSRF protection - which is not quite recommended (https://wiki.jenkins.io/display/JENKINS/CSRF+Protection)
-
Use the Rebuild Plugin (https://wiki.jenkins.io/display/JENKINS/Rebuild+Plugin) and mark the job you want to trigger as Rebuild without asking for parameters. Then you can just modify the jenkins.el to send a GET request to "jenkins-url/job-name/lastCompletedBuild/rebuild"
from jenkins.el.
FWIW I disabled CSRF in my jenkins. It would give a similar (identical?) error if enabled. That potential issue is eliminated. I'm on version 2.207.1.
from jenkins.el.
My experience was similar on version 2.107
With CSRF disabled are not getting a error similar to this one below?
javax.servlet.ServletException:This page expects a form submission but had only {}
If this is the case, then have you tried running it on a job that requires no parameters to build?
If with CSRF disabled you still receive the
No valid crumb was included in the request
error, than I think something else is wrong with the configuration.
from jenkins.el.
Now I get "400 nothing is submitted".
POST /job/ob-ctl-restart-unstable/build HTTP/1.1
MIME-Version: 1.0
Extension: Security/Digest Security/SSL
Host: openbook-jenkins-master.mon.vzwops.com
Accept-encoding: gzip
Accept-charset: utf-8;q=1, gb2312;q=0.5, iso-8859-1;q=0.5, big5;q=0.5, iso-2022-jp;q=0.5, shift_jis;q=0.5, euc-tw;q=0.5, euc-jp;q=0.5, euc-jis-2004;q=0.5, euc-kr;q=0.5, iso-8859-15;q=0.5, us-ascii;q=0.5, utf-7;q=0.5, hz-gb-2312;q=0.5, big5-hkscs;q=0.5, gbk;q=0.5, gb18030;q=0.5, iso-8859-5;q=0.5, koi8-r;q=0.5, koi8-u;q=0.5, cp866;q=0.5, koi8-t;q=0.5, windows-1251;q=0.5, cp855;q=0.5, iso-8859-2;q=0.5, iso-8859-3;q=0.5, iso-8859-4;q=0.5, iso-8859-9;q=0.5, iso-8859-10;q=0.5, iso-8859-13;q=0.5, iso-8859-14;q=0.5, windows-1250;q=0.5, windows-1252;q=0.5, windows-1254;q=0.5, windows-1257;q=0.5, cp775;q=0.5, cp850;q=0.5, cp852;q=0.5, cp857;q=0.5, cp858;q=0.5, cp860;q=0.5, cp861;q=0.5, cp863;q=0.5, cp865;q=0.5, cp437;q=0.5, macintosh;q=0.5, next;q=0.5, hp-roman8;q=0.5, adobe-standard-encoding;q=0.5, iso-8859-16;q=0.5, iso-8859-7;q=0.5, windows-1253;q=0.5, cp737;q=0.5, cp851;q=0.5, cp869;q=0.5, iso-8859-8;q=0.5, windows-1255;q=0.5, cp862;q=0.5, iso-2022-jp-2004;q=0.5, cp874;q=0.5, iso-8859-11;q=0.5, viscii;q=0.5, windows-1258;q=0.5, iso-8859-6;q=0.5, windows-1256;q=0.5, iso-2022-cn;q=0.5, iso-2022-cn-ext;q=0.5, iso-2022-jp-2;q=0.5, iso-2022-kr;q=0.5, utf-16le;q=0.5, utf-16be;q=0.5, utf-16;q=0.5, x-ctext;q=0.5
Accept: */*
User-Agent: URL/Emacs
Content-Type: application/x-www-form-urlencoded
Authorization: Basic xxxxxxxxxxxx==
X-Forwarded-Proto: https
X-Forwarded-For: 10.134.10.240
HTTP/1.1 400 Nothing is submitted
Date: Wed, 21 Mar 2018 00:00:07 GMT
Server: Jetty(9.4.z-SNAPSHOT)
X-Content-Type-Options: nosniff
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html;charset=utf-8
Content-Length: 370
Connection: close
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 400 Nothing is submitted</title>
</head>
<body><h2>HTTP ERROR 400</h2>
<p>Problem accessing /job/ob-ctl-restart-unstable/build. Reason:
<pre> Nothing is submitted</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
</body>
</html>
from jenkins.el.
I'm sorry that I'm not helping you with solving the issue, I will check this weekend.
from jenkins.el.
Yes, you are receiving that error because most likely you job named ob-ctl-restart-unstable requires some parameters. Is this true?
If it does require parameters, then one quick solution (which worked for me, since I am not sure if the emacs plugin allows sending these parameters) is to install the Rebuild Plugin in Jenkins. This allows you to run the last build with the parameters used at that time, without sending them again.
from jenkins.el.
You know what, you are right. This particular job does require a parameter. I wasn't thinking of it because it is an "optional" parameter in that I usually leave it blank. But jenkins doesn't know that.
I just tested with a different job that takes no parameters. It works!
The ability to run a job that takes parameters would be a nice-to-have, but that's a separate issue. Between parameters and disabling CSRF I'd say this issue is solved. Those are potential TODO items in their own right.
from jenkins.el.
I had the same problem with you, and I was just trying to get the build in Jenkins to the terminal,do you know how to do it?
from jenkins.el.
This is just API endpoint issue, which is diffent between parameterized and non parameterized.
You can test jenkins.el modification.
; Works with non parameterized build job
(build-url (format "%sjob/%s/build" (get-jenkins-url) jobname)))
; Works with parameterized build job
(build-url (format "%sjob/%s/buildWithParameters" (get-jenkins-url) jobname)))
No parameters request runs with default parameters.
This works almost well, but we can't figure out each job is whether parameterized or not via API.
Calling both endpoints may be a practical solution.
from jenkins.el.
Related Issues (20)
- A few jobs on several servers HOT 1
- Reading credentials from encrypted file HOT 1
- Make http request async HOT 1
- It would be nice to have the jenkins-status column width customizable HOT 5
- Would be nice to be able to refresh the job view buffer
- JSON read table error HOT 3
- Dmitri HOT 1
- Would be nice to accept self signed certificicates
- Job details erroring out HOT 3
- handle better HTTP authentication HOT 1
- Ability to view jenkins without being logged in
- Read API token using `auth-source` HOT 1
- gentoo app-emacs/jenkins dependancy issue
- Add support for folders
- Longer user id makes Authorization header invalid
- [Feature Request] Switch between multiple Jenkins instances
- Multibranch pipeline not supported
- JSON readtable error when trying to connect to Jenkins using API key
- jenkins-hostname expects a trailing slash HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jenkins.el.