java.io.IOException: Failed to create a temporary file in /var/lib/jenkins/jobs/asda

Jenkins JIRA | Wasim Shaikh | 6 months ago
  1. 0

    [JIRA] [createjobadvanced-plugin] (JENKINS-35225) Jenkins error

    Google Groups | 6 months ago | wasim_s...@yahoo.com (JIRA)
    java.io.IOException: Failed to create a temporary file in /var/lib/jenkins/jobs/asda at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:68) at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:55)
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    [JIRA] (JENKINS-36166) Internal Server Error on creating new job from Jenkins API written in Node.js

    Google Groups | 6 months ago | srij...@gmail.com (JIRA)
    java.io.IOException: Failed to persist config.xml
  4. 0

    I'm using Node JS version 5.10. I could build a job in Jenkins using Jenkins API written in Node.js from my MEAN stack application. I got the Internal server error (500) while creating a new job using *Jenkins API written in Node.js*, i used config.xml of already created job (which was directly created in Jenkins) with new Job Name. I used Jenkins and Jenkins-api modules in NodeJs. Sample code: var jenkinsapi2 = require('jenkins'); var jenkinsapi = require('jenkins-api'); var jenkins = jenkinsapi.init("http://username:password@ip:8080/"); var jenkins2 = require('jenkins')("http://username:password@ip:8080/"); var config = __dirname +'../config/config.xml'; // config.xml file of directly created job in jenkins /*using Jenkins-api*/ jenkins2.job.create('test', config, function(err) { if (err){ throw err; } console.log("success"); }); /*using Jenkins*/ jenkins.create_job('test', config, function(err, data) { if (err) { console.log(err); // throw err; } console.log("success"); }); I used the sample config.xml file as : <?xml version="1.0" encoding="UTF-8"?><project> <actions/> <description/> <keepDependencies>false</keepDependencies> <properties/> <scm class="hudson.scm.NullSCM"/> <canRoam>true</canRoam> <disabled>false</disabled> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <triggers/> <concurrentBuild>false</concurrentBuild> <builders/> <publishers/> <buildWrappers/> </project> And i'm getting the issue as : <h2>Stack trace</h2> <pre style=\"margin:2em; clear:both\">java.io.IOException: Failed to persist config.xml\n\tat hudson.model.ItemGroupMixIn.createProjectFromXML(ItemGroupMixIn.java:299)\n\tat hudson.model.ItemGroupMixIn.createTopLevelItem(ItemGroupMixIn.java:194)\n\tat jenkins.model.Jenkins.doCreateItem(Jenkins.java:3102)\n\tat jenkins.model.Jenkins.doCreateItem(Jenkins.java:308)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:606)\n\tat org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:320)\n\tat org.kohsuke.stapler.Function.bindAndInvoke(Function.java:163)\n\tat org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)\n\tat org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)\n\tat org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)\n\tat org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)\n\tat org.kohsuke.stapler.Stapler.service(Stapler.java:238)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:848)\n\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)\n\tat hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)\n\tat hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)\n\tat hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat jenkins.security.BasicHeaderProcessor.success(BasicHeaderProcessor.java:140)\n\tat jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:82)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)\n\tat hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)\n\tat hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)\n\tat org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)\n\tat hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)\n\tat org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:370)\n\tat org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)\n\tat org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)\n\tat org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)\n\tat org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)\n\tat org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)\n\tat org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)\n\tat org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)\n\tat org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)\n\tat winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n\tat java.lang.Thread.run(Thread.java:745)\nCaused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.\n\tat com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:758)\n\tat com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:359)\n\tat jenkins.util.xml.XMLUtils._transform(XMLUtils.java:96)\n\tat jenkins.util.xml.XMLUtils.safeTransform(XMLUtils.java:63)\n\tat hudson.model.ItemGroupMixIn.createProjectFromXML(ItemGroupMixIn.java:279)\n\t... 73 more\nCaused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.\n\tat com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1239)\n\tat com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:677)\n\tat com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:746)\n\t... 77 more\n</pre> and the full stack trace is included in attachment

    Jenkins JIRA | 6 months ago | srijini s
    java.io.IOException: Failed to persist config.xml

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      Failed to create a temporary file in /var/lib/jenkins/jobs/asda

      at hudson.util.AtomicFileWriter.<init>()
    2. Hudson
      ItemGroupMixIn.createTopLevelItem
      1. hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:68)
      2. hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:55)
      3. hudson.XmlFile.write(XmlFile.java:175)
      4. hudson.model.AbstractItem.save(AbstractItem.java:520)
      5. hudson.model.Job.save(Job.java:180)
      6. hudson.model.AbstractProject.save(AbstractProject.java:305)
      7. hudson.model.ItemGroupMixIn.createProject(ItemGroupMixIn.java:329)
      8. hudson.model.ItemGroupMixIn.createTopLevelItem(ItemGroupMixIn.java:203)
      8 frames
    3. jenkins.model
      Jenkins.doCreateItem
      1. jenkins.model.Jenkins.doCreateItem(Jenkins.java:3547)
      2. jenkins.model.Jenkins.doCreateItem(Jenkins.java:321)
      2 frames
    4. Hudson
      ListView.doCreateItem
      1. hudson.model.ListView.doCreateItem(ListView.java:307)
      1 frame
    5. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3 frames