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

No error handling when creating hudson's home directory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • other
    • None
    • Platform: All, OS: All

      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.

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

              Created:
              Updated:
              Resolved: