I have a strange error that I am not able to add anything in build step or post build action in my jenkins.
I get the following error when I inspect the same.
Error 404 Not Found
HTTP ERROR 404 Problem accessing
/$stapler/bound/5a0d5381-ed63-4616-8dcb-bbc1edac79b3/render. Reason:
Not FoundPowered by
Jetty://
I have tried the following,
Clearing browser data, updating firefox version from 30.0 to 34.0
Upgrading jenkins
Restarting it
Manually try to edit config.xml to add build step.
Creating the new job also has the same issue. Clicking on the add build steps does nothing. Inspecting for errors gives me the above error. Couldn't enable stapler logging also.
Nothing is successful. Any help on this would be highly appreciated.
Related
An instance of Jenkins started not saving changes made under 'Manage Jenkins > System Configuration'.
In an attempt to solve it, I have recently upgraded to Jenkins 2.346.3 (including all the plugins).
Unfortunately, this behavior still persists and the System Log only shows:
Error while serving http://<jenkins_url>/configSubmit
java.lang.ClassCastException: java.lang.Integer cannot be cast to hudson.model.Describable
at hudson.util.DescribableList.get(DescribableList.java:128)
at hudson.util.DescribableList.rebuild(DescribableList.java:170)
at jenkins.model.GlobalNodePropertiesConfiguration.configure(GlobalNodePropertiesConfiguration.java:24)
at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:4017)
at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:3981)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
Caused: java.lang.reflect.InvocationTargetException
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:401)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:409)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:207)
<snippet>
Any idea on the possible cause?
UPDATE
After 2 attempts on restarting Jenkins without the config.xml, I succeeded in having Jenkins 'Manage Jenkins > System Configuration' behaving as expected.
After the first attempt, I reverted to the old configuration file as all the security related configurations were missing and I ended up raising the ticket https://issues.jenkins.io/browse/JENKINS-69548
On the 2nd attempt, I did what I described in the ticket comment https://issues.jenkins.io/browse/JENKINS-69548?focusedCommentId=430091&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-430091 (i.e. re-introducing the security-related configurations)
You probably have a corrupted config.xml from your old installation. Try deleting the config.xml(Back it up) located at $JENKINS_HOME(if you have not changed the default JENKINS_HOME in most cases it will be at USER_HOME/.jenkins(~/.jenkins)) and restarting Jenkins. If it's successful you can start reconfiguring or moving the configs from there.
I've managed to break Jenkins while trying to fix some other problems. Now whenever I run a job it immediately fails with the following error:
java.lang.NullPointerException
at java.util.TreeMap.putAll(TreeMap.java:313)
at hudson.slaves.EnvironmentVariablesNodeProperty.buildEnvVars(EnvironmentVariablesNodeProperty.java:85)
at hudson.model.Computer.buildEnvironment(Computer.java:1195)
at hudson.model.Job.getEnvironment(Job.java:385)
at hudson.model.Run.getEnvironment(Run.java:2419)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.getEnvironment(WorkflowRun.java:500)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:112)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:68)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:310)
at hudson.model.ResourceController.execute(ResourceController.java:99)
at hudson.model.Executor.run(Executor.java:432)
Finished: FAILURE
I found this answer Jenkins - Problem: hudson.model.Queue$MaintainTask failed but it suggests rewriting the config.xml file. When I do that and reload config from the disk, config.xml files gets overwritten by jenkins. I have upgraded jenkins to the latest available version and also updated most of the plugins. I also tried to add back the environment variables through the UI but doing that throws the following exception:
2022-01-06 17:21:50.894+0000 [id=10] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving https://<jenkins-url>:<port>/configSubmit
java.lang.ClassCastException: java.lang.Integer cannot be cast to hudson.model.Describable
at hudson.util.DescribableList.get(DescribableList.java:126)
at hudson.util.DescribableList.rebuild(DescribableList.java:168)
at jenkins.model.GlobalNodePropertiesConfiguration.configure(GlobalNodePropertiesConfiguration.java:25)
at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:3846)
at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:3810)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
Caused: java.lang.reflect.InvocationTargetException
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:400)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
at org.kohsuke.stapler.SelectionInterceptedFunction$Adapter.invoke(SelectionInterceptedFunction.java:36)
which looks similar to the first exception where it is unable to recognize the Integer field. How can I get this configuration fixed?
How it started
I had several scheduled jobs running perfectly fine. But suddenly after weeks of successful runs they started to fail without any obvious reason. But they were still running to a certain point. I also had a plugin installed called build-monitor-plugin but after installing that I had not restarted jenkins. I decided to restart jenkins to see if that resolves the problem but that landed me into a different set of issues and I never got to figure out why the jobs started to fail after running successfully for several weeks. To find that out I have to resolve the NPE issue first (which I described in the beginning). The folder that had all my jobs now shows a broken view:
However, I am still able to access the jobs using a direct url to them. This folder had a view added to it using the build-monitor-plugin and I suspected it messed up something after the restart. So I uninstalled the plugin but that did not fix the view. I have also manually removed all files related to this plugin but that also does not help. When I visit the folder I see following error in the log:
2022-01-06 05:29:47.232+0000 [id=87] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID cb5bdf8c-2a97-4360-8f80-95df2c5c719b
org.apache.commons.jelly.JellyTagException: jar:file:/app/jenkins/war/WEB-INF/lib/jenkins-core-2.319.1.jar!/hudson/model/View/index.jelly:42:43: <st:include> org.apache.commons.jelly.JellyTagException: jar:file:/app/jenkins/war/WEB-INF/lib/jenkins-core-2.319.1.jar!/lib/hudson/projectView.jelly:67:24: <d:invokeBody> `java.lang.NullPointerException
at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:726)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:281)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)`
Finally managed to fix both issues.
What happened?
Sequence of installing the plugin-in build-monitor-plugin, restarting Jenkins and then uninstalling the plug-in left some of the files in Jenkins in a corrupted state. A state from which Jenkins version 2.263.3 was unable to recover even though it kept on recreating the files but every time it was creating the same corrupted files again.
Corrupted Files
There were two files that got corrupted and both are named config.xml. First one is in the top most level directory of Jenkins. It is supposed to be as follows in case you have environment variables:
<globalNodeProperties>
<hudson.slaves.EnvironmentVariablesNodeProperty>
<envVars serialization="custom">
<unserializable-parents/>
<tree-map>
<default>
<comparator class="java.lang.String$CaseInsensitiveComparator"/>
</default>
<int>2</int> <!-- This number indicates how many key/value pairs will follow it -->
<string></string>
<string></string>
...
</tree-map>
</envVars>
</hudson.slaves.EnvironmentVariablesNodeProperty>
</globalNodeProperties>
Something similar was also suggested in Jenkins - Problem: hudson.model.Queue$MaintainTask failed but the value of <comparator> class mentioned there did not work. I figured out the correct value by installing a separate instance of Jenkins and comparing the new config.xml with the old one.
Similarly the other config.xml that was broken was for the folder which was not showing up properly as can be seen in question. For that I created another folder and compared it's config.xml with the broken one and found following two lines missing from the <folderViews>:
...
<folderViews>
...
<primaryView>All</primaryView>
<tabBar class="hudson.views.DefaultViewsTabBar"/>
</folderViews>
...
Adding these two lines resolved the issue.
Piggybacking on this answer since we just had a very similar error pop up and we had the build-monitor-plugin plugin installed, too:
java.lang.NullPointerException
at java.util.TreeMap.putAll(Unknown Source)
at hudson.slaves.EnvironmentVariablesNodeProperty.buildEnvVars(EnvironmentVariablesNodeProperty.java:85)
at hudson.model.Computer.buildEnvironment(Computer.java:1210)
at hudson.model.Job.getEnvironment(Job.java:385)
at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:334)
at hudson.model.Run.getEnvironment(Run.java:2419)
at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:943)
at CUSTOM_PLUGIN
I immediately thought our custom plugin was to blame but reverting to the previous stable version did not change this behavior. Then, finding #Syed Ali's answer, I looked at our config.xml files but they seemed fine.
The problem was that, in the Configuration of the administrative section, the Environment Variables section's checkbox was checked but no key-value pairs had been added. For some reason, unchecking that option fixed any related problem.
I'm trying to create a Jenkins pipeline using Blue Ocean but when I try to connect to my GitHub using the GitHub generated access token, nothing happens. However, when I check the console, I get this error message. Someone please help me out.
blueocean.js:58216 Unhandled Rejection: "Error: fetch failed: 500 for http://127.0.0.1:8090/blue/rest/organizations/jenkins/scm/github/validate/?apiUrl=https://api.github.com\n at FetchFunctions.checkStatus (http://127.0.0.1:8090/adjuncts/49720cc1/io/jenkins/blueocean/blueocean-core-js.js:54923:25)" lo
gUnhandledPromiseRejection # blueocean.js:58216
At the network tab, the response is:
"message" : "No 'injectableValues' configured, cannot inject value with id [org.kohsuke.github.GitHubResponse$ResponseInfo]\
It seems the issue was with the version of blue ocean I had installed. I downgraded to 1.106. You can do the following to sort the issue.
Grab the 1.106. version of the plugin from Here
Then go to manage plugins > Advance > Upload Plugin and upload the 1.106 plugins and install it. All dependencies and indirect dependencies will also be satisfied with this version.
For more information check here
Downgrading GitHub API to 1.106 worked for me.
I am using docker to deploy and run my application. Everything is fine during deployment and running my application.I am using dockerDeploy and restartWas commends in order to deploy and run my application.
After I run my application , my login and password comes to my screen. Everything is fine at that step as well but after I write my login and password, I come across with the error below. I did not change anything in the code but after I restart docker I come across with the following error.
I restarted docker and also computer several times but I still come across with that. I would be glad if you can help me.
Regards
Error Page Exception
SRVE0260E: The server cannot use the error page specified for your application to handle the Original Exception printed below.
Original Exception:
Error Message: SRVE0190E: File not found: {0}
Error Code: 404
Target Servlet:
Error Stack:
com.ibm.ws.webcontainer.webapp.WebAppErrorReport: SRVE0190E: File not found: {0}
I'm following the getting started steps to setup fabric environment on my mac, from the steps mentioned here :
When I'm trying to start my network using the ./network_setup.sh up script, I'm getting the following grpc timeout error (as shown in the images attached
anyone has any idea what am I missing ?
So I got it working. The issue was something might have updated the .proto files. I had to run the following command from the fabric directory to generate/update the respective pb.go files.
make protos