java.io.IOException: Error writing to socket caused by: A file or directory in the path name does not exist.

Oracle Community | 846231 | 5 years ago
  1. 0

    MKSYSB for Linux

    Oracle Community | 5 years ago | 846231
    java.io.IOException: Error writing to socket caused by: A file or directory in the path name does not exist.
  2. 0

    I'm trying to execute an Ant build script on a AIX slave where I don't have administrator rights. JAVA_HOME and ANT_HOME are not set by default, so I had to set them (and add them to PATH) in the node configuration. I deliberately did not configure an Ant installation, neither on the master nor on the slave. This is the stacktrace that I'm seeing: {code} [aixtest] $ ant -version FATAL: command execution failed.Maybe you need to configure the job to choose one of your Ant installations? java.io.IOException: Cannot run program "ant" (in directory "/home/xxx/jenkins/workspace/aixtest"): error=2, A file or directory in the path name does not exist. at java.lang.ProcessBuilder.start(ProcessBuilder.java:471) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:707) at hudson.Launcher$ProcStarter.start(Launcher.java:338) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:932) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:899) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) at java.util.concurrent.FutureTask.run(FutureTask.java:149) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) at java.lang.Thread.run(Thread.java:738) Caused by: java.io.IOException: error=2, A file or directory in the path name does not exist. at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:53) at java.lang.ProcessImpl.start(ProcessImpl.java:112) at java.lang.ProcessBuilder.start(ProcessBuilder.java:464) ... 15 more {code} Oddly enough, if I add an "Execute shell command" build step right before the Ant build step with the command "ant -version" it works: {code} [aixtest] $ /bin/sh -xe /tmp/hudson5535938035142068913.sh + ant -version Apache Ant(TM) version 1.9.2 compiled on July 8 2013 {code} I debugged both the shell command and the ant execution but could not find any obvious difference. Both are calling something like: {code} launcher.launch().cmds(args).envs(env).stdout(aca).pwd(buildFilePath.getParent()).join(); {code} In both cases the environment variables seem to be set correctly.

    Jenkins JIRA | 3 years ago | Fred G
    java.io.IOException: Cannot run program "ant" (in directory "/home/xxx/jenkins/workspace/aixtest"): error=2, A file or directory in the path name does not exist.
  3. 0

    [JIRA] (JENKINS-36027) Build is failing

    Google Groups | 6 months ago | zolo...@gmail.com (JIRA)
    java.io.IOException: Cannot run program "readlink" (in directory "."): error=2, A file or directory in the path name does not exist.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I'm trying to execute an Ant build script on a AIX slave where I don't have administrator rights. JAVA_HOME and ANT_HOME are not set by default, so I had to set them (and add them to PATH) in the node configuration. I deliberately did not configure an Ant installation, neither on the master nor on the slave. This is the stacktrace that I'm seeing: {code} [aixtest] $ ant -version FATAL: command execution failed.Maybe you need to configure the job to choose one of your Ant installations? java.io.IOException: Cannot run program "ant" (in directory "/home/xxx/jenkins/workspace/aixtest"): error=2, A file or directory in the path name does not exist. at java.lang.ProcessBuilder.start(ProcessBuilder.java:471) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:707) at hudson.Launcher$ProcStarter.start(Launcher.java:338) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:932) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:899) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) at java.util.concurrent.FutureTask.run(FutureTask.java:149) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) at java.lang.Thread.run(Thread.java:738) Caused by: java.io.IOException: error=2, A file or directory in the path name does not exist. at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:53) at java.lang.ProcessImpl.start(ProcessImpl.java:112) at java.lang.ProcessBuilder.start(ProcessBuilder.java:464) ... 15 more {code} Oddly enough, if I add an "Execute shell command" build step right before the Ant build step with the command "ant -version" it works: {code} [aixtest] $ /bin/sh -xe /tmp/hudson5535938035142068913.sh + ant -version Apache Ant(TM) version 1.9.2 compiled on July 8 2013 {code} I debugged both the shell command and the ant execution but could not find any obvious difference. Both are calling something like: {code} launcher.launch().cmds(args).envs(env).stdout(aca).pwd(buildFilePath.getParent()).join(); {code} In both cases the environment variables seem to be set correctly.

    Jenkins JIRA | 3 years ago | Fred G
    java.io.IOException: Cannot run program "ant" (in directory "/home/xxx/jenkins/workspace/aixtest"): error=2, A file or directory in the path name does not exist.
  6. 0

    Unfortunately we restarted the jenkins server with root user,which is supposed to run with non-root user.After this some permissions got broken and we changed permissions back and restart the jenkins with non-root user,but after this one of build is getting faild. Your help would be really appropriated.below are the log details. ========================================================================== Jun 16, 2016 4:35:45 PM jenkins.model.PeepholePermalink updateCache WARNING: Failed to update hudson.model.FreeStyleProject@6e696e69[ECOMM_WCS_BUILD_SEARCH] lastUnsuccessfulBuild permalink for ECOMM_WCS_BUILD_SEARCH #292 Throwable occurred: java.io.IOException: Cannot run program "readlink" (in directory "."): error=2, A file or directory in the path name does not exist. at java.lang.ProcessBuilder.processException(ProcessBuilder.java:489) at java.lang.ProcessBuilder.start(ProcessBuilder.java:468) at java.lang.Runtime.exec(Runtime.java:604) at jnr.posix.util.ExecIt.run(ExecIt.java:65) at jnr.posix.util.ExecIt.runAndWait(ExecIt.java:55) at jnr.posix.JavaLibCHelper$PosixExec.runAndWait(JavaLibCHelper.java:371) at jnr.posix.JavaLibCHelper$PosixExec.runAndWait(JavaLibCHelper.java:367) at jnr.posix.JavaLibCHelper.readlink(JavaLibCHelper.java:326) at jnr.posix.JavaPOSIX.readlink(JavaPOSIX.java:256) at jnr.posix.LazyPOSIX.readlink(LazyPOSIX.java:219) at hudson.Util.resolveSymlink(Util.java:1335) at jenkins.model.PeepholePermalink.writeSymlink(PeepholePermalink.java:195) at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:150) at jenkins.model.PeepholePermalink.resolve(PeepholePermalink.java:122) at sun.reflect.GeneratedMethodAccessor302.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258) at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104) at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83) at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57) at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74) at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95) at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161) at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95) at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53) at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:112) at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:735) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:761) Caused by: java.io.IOException: error=2, A file or directory in the path name does not exist. at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:53) at java.lang.ProcessImpl.start(ProcessImpl.java:112) at java.lang.ProcessBuilder.start(ProcessBuilder.java:463) ... 123 more

    Jenkins JIRA | 6 months ago | Randy zolo
    java.io.IOException: Cannot run program "readlink" (in directory "."): error=2, A file or directory in the path name does not exist.

    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

      Error writing to socket caused by: A file or directory in the path name does not exist.

      at com.splwg.base.support.cobol.host.sockets.UnixDomainSocketNative.writeToSocket()
    2. com.splwg.base
      PipeSocket$PipeOutputStream.flush
      1. com.splwg.base.support.cobol.host.sockets.UnixDomainSocketNative.writeToSocket(Native Method)
      2. com.splwg.base.support.cobol.host.sockets.UnixDomainSocket.writeBuffer(UnixDomainSocket.java:64)
      3. com.splwg.base.support.cobol.host.sockets.PipeSocket.writeBuffer(PipeSocket.java:113)
      4. com.splwg.base.support.cobol.host.sockets.PipeSocket$PipeOutputStream.writeBufferAndClear(PipeSocket.java:279)
      5. com.splwg.base.support.cobol.host.sockets.PipeSocket$PipeOutputStream.flush(PipeSocket.java:307)
      5 frames
    3. Java RT
      DataOutputStream.flush
      1. java.io.DataOutputStream.flush(DataOutputStream.java:131)
      1 frame
    4. com.splwg.base
      RotatingCommandRunnerProvider$ConnectionMonitor.run
      1. com.splwg.base.support.cobol.host.OptimizedDataOutput.flush(OptimizedDataOutput.java:55)
      2. com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.sendRequestGetResponse(OptimizedRemoteExecuterStub.java:80)
      3. com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.invoke(OptimizedRemoteExecuterStub.java:58)
      4. com.splwg.base.support.cobol.host.RemoteRunnerImpl.invoke(RemoteRunnerImpl.java:109)
      5. com.splwg.base.support.cobol.host.RemoteJVMConnectionImpl.createRemoteRunner(RemoteJVMConnectionImpl.java:157)
      6. com.splwg.base.support.cobol.host.RemoteJVMConnectionImpl.<init>(RemoteJVMConnectionImpl.java:76)
      7. com.splwg.base.support.cobol.host.RemoteJVMFactoryImpl.addConnection(RemoteJVMFactoryImpl.java:80)
      8. com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider$ConnectionMonitor.addNecessaryConnections(RotatingCommandRunnerProvider.java:401)
      9. com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider$ConnectionMonitor.doHousekeeping(RotatingCommandRunnerProvider.java:330)
      10. com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider$ConnectionMonitor.run(RotatingCommandRunnerProvider.java:323)
      10 frames
    5. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432)
      2. java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:295)
      3. java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
      4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:80)
      5. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:157)
      6. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:181)
      7. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
      8. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
      9. java.lang.Thread.run(Thread.java:810)
      9 frames