Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-558

No error handling when creating hudson's home directory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: other
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      When Hudson's home directory does not exist, this is the exception thrown:

      java.lang.Error: java.io.IOException: No such file or directory
      at hudson.WebAppMain.contextInitialized(WebAppMain.java:88)
      at
      org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:511)
      at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
      at
      org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1191)
      at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)
      at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
      at
      org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
      at
      org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:120)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
      at
      org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
      at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
      at org.mortbay.jetty.Server.doStart(Server.java:210)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
      at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.mortbay.start.Main.invokeMain(Main.java:183)
      at org.mortbay.start.Main.start(Main.java:497)
      at org.mortbay.start.Main.main(Main.java:115)
      Caused by: java.io.IOException: No such file or directory
      at java.io.UnixFileSystem.createFileExclusively(Native Method)
      at java.io.File.checkAndCreate(File.java:1345)
      at java.io.File.createTempFile(File.java:1434)
      at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:27)
      at hudson.util.TextFile.write(TextFile.java:50)
      at hudson.TcpSlaveAgentListener.<init>(TcpSlaveAgentListener.java:75)
      at hudson.model.Hudson.<init>(Hudson.java:197)
      at hudson.WebAppMain.contextInitialized(WebAppMain.java:86)
      ... 22 more

      The attached patch fixes that problem by properly checking that the directory
      exists, and reports a meaningful error.

        Attachments

          Activity

          Hide
          jbq jbq added a comment -

          Created an attachment (id=61)
          Patch against hudson core

          Show
          jbq jbq added a comment - Created an attachment (id=61) Patch against hudson core
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Thanks. Fixed in 1.107.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Thanks. Fixed in 1.107.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jbq jbq
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: