continuous integration - Jenkins restart error, Starting Jenkins dirname: extra operand `/proc -
i trying restart jenkins, fails saying below error. has clue on this?
$ service jenkins restart shutting down jenkins killproc: empty pid file /var/run/jenkins.pid /usr/lib64/jvm/jre/bin/java done starting jenkins dirname: operand `/proc/13265/exe' try `dirname --help' more information. basename: missing operand try `basename --help' more information. failed
probabily when restart service jenkins not remove files in /proc directory. execute line before start jenkins:
find /proc -maxdepth 2 -user jenkins -name exe -lname '*/bin/java'
if have result (as in case) means there older /proc/xxxx dir , jenkins create one. reason why proces fails ( in runtime there dirs , causes error)
resolution
option 1: try remove dir appear when execute "find /proc -maxdepth 2 -user jenkins -name exe -lname '*/bin/java'
" command (i not permission reasons
option 2: modify file /etc/init.d/jenkis, find line has code:
jproc=$( find /proc -maxdepth 2 -user $jenkins_user -name exe -lname "*/bin/java" )
and replace one:
jproc=$( find /proc -maxdepth 2 -user $jenkins_user -name exe -lname "*/bin/java" | tail -1 )
the second option works me. should tell jenkins folks bug.
Comments
Post a Comment