Restarting Jetty on Ubuntu 12.04.4
jetty, ubuntu-12.04
Solution
I have got a fix for all those who have been using that tutorial to install jetty
nano /etc/init.d/jetty
And change this syntax :
start-log-file="$JETTY_LOGS/start.log"
to
start-log-file="start.log"
It will fix everything in the latest jetty build and make it run like a charm.
Hope I could be of help
Problem
I'm getting some very unusual behaviour. I followed these instructions for installing jetty but used the latest version instead (9.1.1v20140108) I had reason to restart Jetty and found I was getting these errors (logged in as root) Starting Jetty: FAILED Wed Feb 5 12:35:59 EST 2014 So I spent 30 mins looking for an answer, then for reasons I can't recall, I did service jetty check and it was running (had a pid). So I tried again with service Jetty stop: ``` root@erp:/var/log# service jetty stop /etc/init.d/jetty: line 13: chkconfig:: command not found /etc/init.d/jetty: line 14: description:: command not found /etc/init.d/jetty: line 15: processname:: command not found Stopping Jetty: start-stop-daemon: warning: failed to kill 7817: No such process 1 pids were not killed No process in pidfile '/var/run/jetty.pid' found running; none killed. OK ``` None killed? Ok. Let's check that: ``` root@erp:/var/log# service jetty check /etc/init.d/jetty: line 13: chkconfig:: command not found /etc/init.d/jetty: line 14: description:: command not found /etc/init.d/jetty: line 15: processname:: command not found Checking arguments to Jetty: START_INI = /srv/jetty/start.ini JETTY_HOME = /srv/jetty JETTY_BASE = /srv/jetty JETTY_CONF = /srv/jetty/etc/jetty.conf JETTY_PID = /var/run/jetty.pid JETTY_START = /srv/jetty/start.jar JETTY_LOGS = /srv/jetty/logs CLASSPATH = JAVA = /usr/bin/java JAVA_OPTIONS = -Dsolr.solr.home=/srv/solr -Djetty.state=/srv/jetty/jetty.state -Djetty.logs=/srv/jetty/logs -Djetty.home=/srv/jetty -Djetty.base=/srv/jetty -Djava.io.tmpdir=/tmp JETTY_ARGS = jetty.port=8085 jetty-logging.xml jetty-started.xml RUN_CMD = /usr/bin/java -Dsolr.solr.home=/srv/solr -Djetty.state=/srv/jetty/jetty.state -Djetty.logs=/srv/jetty/logs -Djetty.home=/srv/jetty -Djetty.base=/srv/jetty -Djava.io.tmpdir=/tmp -jar /srv/jetty/start.jar jetty.port=8085 jetty-logging.xml jetty-started.xml ``` No PID? Let's check that: ``` root@erp:/var/log# service jetty start /etc/init.d/jetty: line 13: chkconfig:: command not found /etc/init.d/jetty: line 14: description:: command not found /etc/init.d/jetty: line 15: processname:: command not found Starting Jetty: FAILED Wed Feb 5 12:39:43 EST 2014 ``` Ok, is there a PID? ``` root@erp:/var/log# service jetty check /etc/init.d/jetty: line 13: chkconfig:: command not found /etc/init.d/jetty: line 14: description:: command not found /etc/init.d/jetty: line 15: processname:: command not found Checking arguments to Jetty: [edit] Jetty running pid=7993 ``` Weird. Sure enough, a stop and check will give the same results. What's going on with the jetty startup script? And why am I getting FAILED errors on start which are incorrect, and fail to remove pid errors on stop which are also incorrect?