0

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_HOME=/usr/bin
JAVA=$JAVA_HOME/java
JAVA_OPTIONS=" -server -Xms256m -Xmx1024m -XX:+DisableExplicitGC "
JETTY_HOME=/srv/jetty
JETTY_USER=jetty
JETTY_PORT=7070
JETTY_HOST=localhost
JETTY_LOGS=/srv/jetty/logs/

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

2 Answers 2

4

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:

JETTY_RUN=/opt/jetty/run/
0
0

Based on the tutorial at http://www.copper-arrow.com/blog/jetty-web-server-centos-6

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

    rm -f $JETTY_STATE
    

    to

    #rm -f $JETTY_STATE
    
  2. in terminal:

    service jetty supervise

    after several seconds press Ctrl+C and than

    service jetty restart

1
  • Didn't help me. Jetty 9.0.2
    – expert
    May 2, 2013 at 19:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .