This was also tried on many other servers running Debian and CentOS, and Amazon AWS free server. The error "No valid crumb was included in the request" gets displayed when trying to configure a new job and specifically when inserting a link of the GIT repository. Sometimes this message gets displayed inside the configuration body of GIT. And sometimes the page goes white and the error displays this. Sometimes it passes the step where you configure your job and when you click Save at the bottom, then it displays the error. Sometimes while installing the basic Jenkins installation with basic packages the error gets displayed. Git repository is a custom GitLab repository. The only time it worked when I installed Jenkins on my Linux laptop and then configured a job and while accessing Jenkins, I had to enter localhost:8080 in my browser to access it locally. When I tried connecting to the Jenkins remotely, through its IP and port, it didn't work. I tried to connect to the server via VirtualNetworkComputing (VNC) like through a remote desktop and also didn't work. I also thought that the SSL needs to be configured on the server's domain to securely access Jenkins, but that didn't work either. The error still gets displayed. I also tried versions 2.60 and 2.7.
- err1.PNG
- 70 kB
- err2.PNG
- 82 kB
- newError.PNG
- 25 kB
[JENKINS-46986] No valid crumb was included in the request
Please take a quick look at the images that I attached to this issue. And also please view this paste from the Jenkins log https://pastebin.com/sLigE2MQ
Thank you for the help.
emil_kosic For any of the requests failing with 403, please provide the complete request (headers and body).
emil_kosic Please also provide the full output of the /systemInfo URL.
An example of a failing request:
General:
Request URL:https://ci-test.kogitas.com/job/Monitoring%20Tool%20Test1/configSubmit
Request Method:POST
Status Code:403 No valid crumb was included in the request
Remote Address:82.223.110.134:443
Referrer Policy:no-referrer-when-downgrade
Request Headers:
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Accept-Encoding:gzip, deflate, br Accept-Language:en-US Cache-Control:max-age=0 Connection:keep-alive Content-Length:6810 Content-Type:application/x-www-form-urlencoded Cookie:JSESSIONID.97dde599=node0vq3f59ojp357v17t17glf83y302.node0; screenResolution=1920x1080 Host:ci-test.kogitas.com Origin:https://ci-test.kogitas.com Referer:https://ci-test.kogitas.com/job/Monitoring%20Tool%20Test1/configSubmit Upgrade-Insecure-Requests:1 User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36
Form Data:
name:Monitoring Tool Test1 description: stapler-class-bag:true _.daysToKeepStr: _.numToKeepStr: _.artifactDaysToKeepStr: _.artifactNumToKeepStr: stapler-class:hudson.tasks.LogRotator $class:hudson.tasks.LogRotator _.projectUrlStr: _.displayName: _.count:1 _.durationName:hour quiet_period:5 scmCheckoutRetryCount:0 _.customWorkspace: _.displayNameOrNull: stapler-class:hudson.scm.NullSCM $class:hudson.scm.NullSCM scm:1 stapler-class:hudson.plugins.git.GitSCM $class:hudson.plugins.git.GitSCM _.url:http://82.223.110.134:19080/emilkosic/MonitoringTool.git _.credentialsId:d0c08371-4971-4210-a4a9-8b1ce1726dc7 _.name: _.refspec: _.name:*/master stapler-class:hudson.plugins.git.browser.AssemblaWeb $class:hudson.plugins.git.browser.AssemblaWeb stapler-class:hudson.plugins.git.browser.FisheyeGitRepositoryBrowser $class:hudson.plugins.git.browser.FisheyeGitRepositoryBrowser stapler-class:hudson.plugins.git.browser.KilnGit $class:hudson.plugins.git.browser.KilnGit stapler-class:hudson.plugins.git.browser.TFS2013GitRepositoryBrowser $class:hudson.plugins.git.browser.TFS2013GitRepositoryBrowser stapler-class:hudson.plugins.git.browser.BitbucketWeb $class:hudson.plugins.git.browser.BitbucketWeb stapler-class:hudson.plugins.git.browser.CGit $class:hudson.plugins.git.browser.CGit stapler-class:hudson.plugins.git.browser.GitBlitRepositoryBrowser $class:hudson.plugins.git.browser.GitBlitRepositoryBrowser stapler-class:hudson.plugins.git.browser.GithubWeb $class:hudson.plugins.git.browser.GithubWeb stapler-class:hudson.plugins.git.browser.Gitiles $class:hudson.plugins.git.browser.Gitiles stapler-class:hudson.plugins.git.browser.GitLab $class:hudson.plugins.git.browser.GitLab stapler-class:hudson.plugins.git.browser.GitList $class:hudson.plugins.git.browser.GitList stapler-class:hudson.plugins.git.browser.GitoriousWeb $class:hudson.plugins.git.browser.GitoriousWeb stapler-class:hudson.plugins.git.browser.GitWeb $class:hudson.plugins.git.browser.GitWeb stapler-class:hudson.plugins.git.browser.GogsGit $class:hudson.plugins.git.browser.GogsGit stapler-class:hudson.plugins.git.browser.Phabricator $class:hudson.plugins.git.browser.Phabricator stapler-class:hudson.plugins.git.browser.RedmineWeb $class:hudson.plugins.git.browser.RedmineWeb stapler-class:hudson.plugins.git.browser.RhodeCode $class:hudson.plugins.git.browser.RhodeCode stapler-class:hudson.plugins.git.browser.Stash $class:hudson.plugins.git.browser.Stash stapler-class:hudson.plugins.git.browser.ViewGitWeb $class:hudson.plugins.git.browser.ViewGitWeb stapler-class:hudson.scm.SubversionSCM $class:hudson.scm.SubversionSCM _.remote: _.credentialsId: _.local:. depthOption:infinity _.ignoreExternalsOption:on stapler-class:hudson.scm.subversion.UpdateUpdater $class:hudson.scm.subversion.UpdateUpdater stapler-class:hudson.scm.subversion.CheckoutUpdater $class:hudson.scm.subversion.CheckoutUpdater stapler-class:hudson.scm.subversion.NoopUpdater $class:hudson.scm.subversion.NoopUpdater stapler-class:hudson.scm.subversion.UpdateWithCleanUpdater $class:hudson.scm.subversion.UpdateWithCleanUpdater stapler-class:hudson.scm.subversion.UpdateWithRevertUpdater $class:hudson.scm.subversion.UpdateWithRevertUpdater stapler-class:hudson.scm.browsers.Assembla $class:hudson.scm.browsers.Assembla stapler-class:hudson.scm.browsers.CollabNetSVN $class:hudson.scm.browsers.CollabNetSVN stapler-class:hudson.scm.browsers.FishEyeSVN $class:hudson.scm.browsers.FishEyeSVN stapler-class:hudson.scm.browsers.Phabricator $class:hudson.scm.browsers.Phabricator stapler-class:hudson.scm.browsers.SVNWeb $class:hudson.scm.browsers.SVNWeb stapler-class:hudson.scm.browsers.Sventon $class:hudson.scm.browsers.Sventon stapler-class:hudson.scm.browsers.Sventon2 $class:hudson.scm.browsers.Sventon2 stapler-class:hudson.scm.browsers.ViewSVN $class:hudson.scm.browsers.ViewSVN stapler-class:hudson.scm.browsers.WebSVN $class:hudson.scm.browsers.WebSVN _.excludedRegions: _.includedRegions: _.excludedUsers: _.excludedCommitMessages: _.excludedRevprop: authToken: _.upstreamProjects: ReverseBuildTrigger.threshold:SUCCESS _.spec: _.scmpoll_spec: _.cleanupParameter: _.externalDelete: _.timeoutMinutes:3 stapler-class:hudson.plugins.build_timeout.impl.AbsoluteTimeOutStrategy $class:hudson.plugins.build_timeout.impl.AbsoluteTimeOutStrategy stapler-class:hudson.plugins.build_timeout.impl.DeadlineTimeOutStrategy $class:hudson.plugins.build_timeout.impl.DeadlineTimeOutStrategy stapler-class:hudson.plugins.build_timeout.impl.ElasticTimeOutStrategy $class:hudson.plugins.build_timeout.impl.ElasticTimeOutStrategy stapler-class:hudson.plugins.build_timeout.impl.LikelyStuckTimeOutStrategy $class:hudson.plugins.build_timeout.impl.LikelyStuckTimeOutStrategy stapler-class:hudson.plugins.build_timeout.impl.NoActivityTimeOutStrategy $class:hudson.plugins.build_timeout.impl.NoActivityTimeOutStrategy _.timeoutEnvVar: core:apply: Jenkins-Crumb:914a7c7dd83d823f2542e2957ba1555e json:{"name": "Monitoring Tool Test1", "description": "", "properties": {"stapler-class-bag": "true", "jenkins-model-BuildDiscarderProperty": {"specified": false, "": "0", "strategy": {"daysToKeepStr": "", "numToKeepStr": "", "artifactDaysToKeepStr": "", "artifactNumToKeepStr": "", "stapler-class<span class="code-quote">": "hudson.tasks.LogRotator", "$class<span class="code-quote">": "hudson.tasks.LogRotator"}}, "com-coravy-hudson-plugins-github-GithubProjectProperty": {}, "hudson-model-ParametersDefinitionProperty": {"specified": false}, "jenkins-branch-RateLimitBranchProperty$JobPropertyImpl": {}}, "disable": false, "concurrentBuild": false, "hasCustomQuietPeriod": false, "quiet_period": "5", "hasCustomScmCheckoutRetryCount": false, "scmCheckoutRetryCount": "0", "blockBuildWhenUpstreamBuilding": false, "blockBuildWhenDownstreamBuilding": false, "hasCustomWorkspace": false, "customWorkspace": "", "displayNameOrNull": "", "scm": {"value": "1", "stapler-class<span class="code-quote">": "hudson.plugins.git.GitSCM", "$class<span class="code-quote">": "hudson.plugins.git.GitSCM", "userRemoteConfigs": {"url": "http://82.223.110.134:19080/emilkosic/MonitoringTool.git", "credentialsId": "d0c08371-4971-4210-a4a9-8b1ce1726dc7", "name": "", "refspec": ""}, "branches": {"name": "*/master"}, "": "auto"}, "core:apply": "", "Jenkins-Crumb": "914a7c7dd83d823f2542e2957ba1555e"} Submit:Save
Response headers:
Cache-Control:must-revalidate,no-cache,no-store Connection:Keep-Alive Content-Length:423 Content-Type:text/html;charset=iso-8859-1 Date:Wed, 27 Sep 2017 05:52:39 GMT Keep-Alive:timeout=5, max=100 Server:Jetty(9.4.z-SNAPSHOT) X-Content-Type-Options:nosniff
Response body:
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 403 No valid crumb was included in the request</title> </head> <body><h2>HTTP ERROR 403</h2> <p>Problem accessing /job/Monitoring%20Tool%20Test1/configSubmit. Reason: <pre> No valid crumb was included in the request</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/> </body> </html>
Request Cookies:
JSESSIONID.97dde599 : node0vq3f59ojp357v17t17glf83y302.node0 screenResolution : 1920x1080
System Info
System Properties:
awt.toolkit sun.awt.X11.XToolkit com.sun.akuma.Daemon daemonized executable-war /usr/lib/jenkins/jenkins.war file.encoding UTF-8 file.encoding.pkg sun.io file.separator / java.awt.graphicsenv sun.awt.X11GraphicsEnvironment java.awt.headless true java.awt.printerjob sun.print.PSPrinterJob java.class.path /usr/lib/jenkins/jenkins.war java.class.version 52.0 java.endorsed.dirs /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/lib/endorsed java.ext.dirs /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/lib/ext:/usr/java/packages/lib/ext java.home /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre java.io.tmpdir /tmp java.library.path /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib java.runtime.name OpenJDK Runtime Environment java.runtime.version 1.8.0_144-b01 java.specification.name Java Platform API Specification java.specification.vendor Oracle Corporation java.specification.version 1.8 java.vendor Oracle Corporation java.vendor.url http://java.oracle.com/ java.vendor.url.bug http://bugreport.sun.com/bugreport/ java.version 1.8.0_144 java.vm.info mixed mode java.vm.name OpenJDK 64-Bit Server VM java.vm.specification.name Java Virtual Machine Specification java.vm.specification.vendor Oracle Corporation java.vm.specification.version 1.8 java.vm.vendor Oracle Corporation java.vm.version 25.144-b01 JENKINS_HOME /var/lib/jenkins jna.loaded true jna.platform.library.path /usr/lib64:/lib64:/usr/lib:/lib:/usr/lib64/dyninst:/usr/lib64/mysql:/usr/lib64/iscsi:/usr/lib64/tcl8.5 jnidispatch.path /tmp/jna--1712433994/jna6492196746126342856.tmp line.separator mail.smtp.sendpartial true mail.smtps.sendpartial true os.arch amd64 os.name Linux os.version 3.10.0-693.2.2.el7.x86_64 path.separator : sun.arch.data.model 64 sun.boot.class.path /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/classes sun.boot.library.path /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/lib/amd64 sun.cpu.endian little sun.cpu.isalist sun.font.fontmanager sun.awt.X11FontManager sun.io.unicode.encoding UnicodeLittle sun.java.command /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --daemon --httpPort=8009 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20 sun.java.launcher SUN_STANDARD sun.jnu.encoding UTF-8 sun.management.compiler HotSpot 64-Bit Tiered Compilers sun.os.patch.level unknown svnkit.http.methods Digest,Basic,NTLM,Negotiate svnkit.ssh2.persistent false user.country US user.dir / user.home /var/lib/jenkins user.language en user.name jenkins user.timezone UTC
Environment Variables:
Name ↓
Value
_ /etc/alternatives/java
HOME /var/lib/jenkins
LANG en_US.UTF-8
LOGNAME jenkins
NLSPATH /usr/dt/lib/nls/msg/%L/%N.cat
PATH /sbin:/usr/sbin:/bin:/usr/bin
PWD /
SHELL /bin/bash
SHLVL 2
USER jenkins
XFILESEARCHPATH /usr/dt/app-defaults/%L/Dt
Plugins:
ace-editor 1.1 true ant 1.7 true antisamy-markup-formatter 1.5 true authentication-tokens 1.3 true bouncycastle-api 2.16.2 true branch-api 2.0.11 true build-timeout 1.18 true cloudbees-folder 6.1.2 true credentials 2.1.16 true credentials-binding 1.13 true display-url-api 2.0 true docker-commons 1.8 true docker-workflow 1.13 true durable-task 1.14 true email-ext 2.60 true external-monitor-job 1.7 true git 3.5.1 true git-client 2.5.0 true git-server 1.7 true github 1.28.0 true github-api 1.86 true github-branch-source 2.2.3 true gradle 1.27.1 true handlebars 1.1.1 true icon-shim 2.0.3 true jackson2-api 2.7.3 true jquery-detached 1.2.1 true junit 1.21 true ldap 1.17 true mailer 1.20 true mapdb-api 1.0.9.0 true matrix-auth 1.7 true matrix-project 1.11 true momentjs 1.1.1 true pam-auth 1.3 true pipeline-build-step 2.5.1 true pipeline-github-lib 1.0 true pipeline-graph-analysis 1.5 true pipeline-input-step 2.8 true pipeline-milestone-step 1.3.1 true pipeline-model-api 1.1.9 true pipeline-model-declarative-agent 1.1.1 true pipeline-model-definition 1.1.9 true pipeline-model-extensions 1.1.9 true pipeline-rest-api 2.9 true pipeline-stage-step 2.2 true pipeline-stage-tags-metadata 1.1.9 true pipeline-stage-view 2.9 true plain-credentials 1.4 true resource-disposer 0.8 true scm-api 2.2.2 true script-security 1.34 true ssh-credentials 1.13 true ssh-slaves 1.21 true structs 1.10 true subversion 2.9 true timestamper 1.8.8 true token-macro 2.3 true windows-slaves 1.3.1 true workflow-aggregator 2.5 true workflow-api 2.20 true workflow-basic-steps 2.6 true workflow-cps 2.40 true workflow-cps-global-lib 2.9 true workflow-durable-task-step 2.15 true workflow-job 2.14.1 true workflow-multibranch 2.16 true workflow-scm-step 2.6 true workflow-step-api 2.13 true workflow-support 2.14 true ws-cleanup 0.34 true
I had such a nice theory but not confirmed
Do you have a reverse proxy in front of Jenkins? If so, did you check the 'reverse proxy compatibility' option in the global security configuration?
Do you have init.groovy / init.groovy.d scripts configuring Jenkins on startup?
The reverse proxy compatibility fixed it!
I have not done the init.groovy script, are these necessary for Jenkins to work correctly as well?
are these necessary for Jenkins to work correctly as well
No, it's just a way to define configuration on startup, often similar to system properties, that would not show up in /systemInfo.
Please check your browser's error console and the Jenkins log (at https://yourjenkins/log/all) for relevant messages.