Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I rent a CentOS 6 VPS and wish to install Jetty on it so I can use Solr for a project I've been working on.

I've been following this jetty tutorial to install Jetty on my VPS, however when I try to start Jetty using service jetty start or /etc/init.d/jetty start I receive the following error(s):

Starting Jetty: grep: /var/run/jetty.state: No such file or directory
grep: /var/run/jetty.state: No such file or directory
grep: /var/run/jetty.state: No such file or directory
FAILED Sat Apr 20 00:21:56 BST 2013

I've looked in the logs and it doesn't look like anything is added to them regarding more information about this error. This is what my Jetty config file looks like:

JAVA_OPTIONS=" -server -Xms256m -Xmx1024m -XX:+DisableExplicitGC "

Has anyone experienced this before and can point me in the right direction as to what I need to do to resolve it?

share|improve this question

After hitting this problem, I found that jetty.state must be writable to the java process. So if you are not running jetty as root, /var/run will not be writable and you'll have this problem.

My solution is to create a directory where jetty can write, like /opt/jetty/run and put it into /etc/default/jetty file:

share|improve this answer

Based on the tutorial at

  1. in /etc/init.d/jetty or /srv/jetty/bin/ find and replace a string

    rm -f $JETTY_STATE


    #rm -f $JETTY_STATE
  2. in terminal:

    service jetty supervise

    after several seconds press Ctrl+C and than

    service jetty restart

share|improve this answer
Didn't help me. Jetty 9.0.2 – expert May 2 '13 at 19:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.