java.io.IOException: Cannot run program "readlink" (in directory "/opt/instance/ SUNWappserver/domains/dom-hudson/config/."): error=2, No such file or directory

Jenkins JIRA | Laurent Sauvage | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    readlink is not provided by default on Solaris. Notice java 7 now provides an API to deal with symbolic links. Here is the stack trace obtained on solaris: java.io.IOException: Cannot run program "readlink" (in directory "/opt/instance/ SUNWappserver/domains/dom-hudson/config/."): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at java.lang.Runtime.exec(Runtime.java:593) at org.jruby.ext.posix.util.ExecIt.run(ExecIt.java:61) at org.jruby.ext.posix.util.ExecIt.runAndWait(ExecIt.java:51) at org.jruby.ext.posix.JavaLibCHelper.readlink(JavaLibCHelper.java:196) at org.jruby.ext.posix.JavaPOSIX.readlink(JavaPOSIX.java:160) at hudson.Util.resolveSymlink(Util.java:1236) at hudson.Util.resolveSymlinkToFile(Util.java:1166) at hudson.model.Run.parseTimestampFromBuildDir(Run.java:346) at hudson.model.Run.<init>(Run.java:294) at hudson.model.AbstractBuild.<init>(AbstractBuild.java:182) at hudson.model.Build.<init>(Build.java:103) at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:41) at sun.reflect.GeneratedConstructorAccessor313.newInstance(Unknown Sourc e) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC onstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at hudson.model.AbstractProject.loadBuild(AbstractProject.java:1120) at hudson.model.AbstractProject$1.create(AbstractProject.java:317) at hudson.model.AbstractProject$1.create(AbstractProject.java:315) at hudson.model.RunMap.retrieve(RunMap.java:225) at hudson.model.RunMap.retrieve(RunMap.java:59) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap .java:667) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap .java:629) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunM ap.java:368) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:220) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:103) at hudson.model.Job.getBuildStabilityHealthReport(Job.java:1020) at hudson.model.Job.getBuildHealthReports(Job.java:980) at hudson.model.Job.getBuildHealth(Job.java:945)

    Jenkins JIRA | 4 years ago | Laurent Sauvage
    java.io.IOException: Cannot run program "readlink" (in directory "/opt/instance/ SUNWappserver/domains/dom-hudson/config/."): error=2, No such file or directory
  2. 0

    readlink is not provided by default on Solaris. Notice java 7 now provides an API to deal with symbolic links. Here is the stack trace obtained on solaris: java.io.IOException: Cannot run program "readlink" (in directory "/opt/instance/ SUNWappserver/domains/dom-hudson/config/."): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at java.lang.Runtime.exec(Runtime.java:593) at org.jruby.ext.posix.util.ExecIt.run(ExecIt.java:61) at org.jruby.ext.posix.util.ExecIt.runAndWait(ExecIt.java:51) at org.jruby.ext.posix.JavaLibCHelper.readlink(JavaLibCHelper.java:196) at org.jruby.ext.posix.JavaPOSIX.readlink(JavaPOSIX.java:160) at hudson.Util.resolveSymlink(Util.java:1236) at hudson.Util.resolveSymlinkToFile(Util.java:1166) at hudson.model.Run.parseTimestampFromBuildDir(Run.java:346) at hudson.model.Run.<init>(Run.java:294) at hudson.model.AbstractBuild.<init>(AbstractBuild.java:182) at hudson.model.Build.<init>(Build.java:103) at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:41) at sun.reflect.GeneratedConstructorAccessor313.newInstance(Unknown Sourc e) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC onstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at hudson.model.AbstractProject.loadBuild(AbstractProject.java:1120) at hudson.model.AbstractProject$1.create(AbstractProject.java:317) at hudson.model.AbstractProject$1.create(AbstractProject.java:315) at hudson.model.RunMap.retrieve(RunMap.java:225) at hudson.model.RunMap.retrieve(RunMap.java:59) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap .java:667) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap .java:629) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunM ap.java:368) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:220) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:103) at hudson.model.Job.getBuildStabilityHealthReport(Job.java:1020) at hudson.model.Job.getBuildHealthReports(Job.java:980) at hudson.model.Job.getBuildHealth(Job.java:945)

    Jenkins JIRA | 4 years ago | Laurent Sauvage
    java.io.IOException: Cannot run program "readlink" (in directory "/opt/instance/ SUNWappserver/domains/dom-hudson/config/."): error=2, No such file or directory
  3. 0

    Jenkins issues - [JIRA] (JENKINS-13241) Artifact archiving from remote slave fails

    nabble.com | 9 months ago
    hudson.util.IOException2: java.io.IOException: readlink: not found
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Netbeans not regognizing project for subversion

    Stack Overflow | 6 years ago | MJgirl
    java.io.IOException: Cannot run program "svnversion" (in directory "C:\Users\Jaana\Documents\NetBeansProjects\tuha"): CreateProcess error=2, The system cannot find the file specified
  6. 0

    Installing Jadclipse in Eclipse | 5th Cross

    wordpress.com | 1 year ago
    java.io.IOException: Cannot run program “jad” (in directory “C:\.net.sf.jadclipse\1379680857090”): CreateProcess error=2, The system cannot find the file specified

  1. PKeidel 3 times, last 2 months ago
  2. serious2monkeys 1 times, last 3 months ago
  3. Handemelindo 6 times, last 4 months ago
  4. kid 5 times, last 4 months ago
  5. rp 2 times, last 4 months ago
4 more registered users
75 unregistered visitors
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

    Cannot run program "readlink" (in directory "/opt/instance/ SUNWappserver/domains/dom-hudson/config/."): error=2, No such file or directory

    at java.lang.ProcessBuilder.start()
  2. Java RT
    Runtime.exec
    1. java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
    2. java.lang.Runtime.exec(Runtime.java:593)
    2 frames
  3. JNA-POSIX
    JavaPOSIX.readlink
    1. org.jruby.ext.posix.util.ExecIt.run(ExecIt.java:61)
    2. org.jruby.ext.posix.util.ExecIt.runAndWait(ExecIt.java:51)
    3. org.jruby.ext.posix.JavaLibCHelper.readlink(JavaLibCHelper.java:196)
    4. org.jruby.ext.posix.JavaPOSIX.readlink(JavaPOSIX.java:160)
    4 frames
  4. Hudson
    FreeStyleBuild.<init>
    1. hudson.Util.resolveSymlink(Util.java:1236)
    2. hudson.Util.resolveSymlinkToFile(Util.java:1166)
    3. hudson.model.Run.parseTimestampFromBuildDir(Run.java:346)
    4. hudson.model.Run.<init>(Run.java:294)
    5. hudson.model.AbstractBuild.<init>(AbstractBuild.java:182)
    6. hudson.model.Build.<init>(Build.java:103)
    7. hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:41)
    7 frames