I am using Jetty 7.4 for one of my projects. I need to configure it so that it can start/stop automatically whenever the server starts up or goes down. Also, I should be able to start/stop the server on demand. I am using the start/stop script that comes along with jetty(bin/jetty.sh). The server starts just fine. However, when it comes to stopping the server, I am facing some problems.
Jetty expects you to start the server with "--exec" command line parameter and this parameter spawns another JVM instance. Now there are two processes running for jetty. When you try to stop the jetty server using the script the first process dies successfully. However, I can still see the spawned process.
I've searched the web and people have asked this question at multiple places but I could not find a solution to this problem. Any ideas?
thanks,
NG
This doesn't really answer the question, but I worked around this by specifying JVM options in a new file in /etc/default/jetty
. There you can set JVM options using something like this:
JAVA_OPTIONS="-XX:MaxPermSize=128m -Xms1024m -Xmx1024m"
Then you won't have to spawn another process using --exec
and you can just use jetty.sh
to start and stop the one process normally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With