ahoffer
ahoffer

Reputation: 6546

Stopping Solr (Jetty) using the STOP PORT

I can stop Jetty from the command line like this:

java -DSTOP.PORT=8080 -DSTOP.KEY=stop_jetty -jar start.jar --stop

Is it possible to stop Jetty using telnet or netcat to send the stop key to the stop port? I tried and it did not work, but maybe you know something I don't.

Upvotes: 0

Views: 985

Answers (1)

Joakim Erdfelt
Joakim Erdfelt

Reputation: 49525

There is a simple tcp server running on your STOP.PORT.

Connect to it, send the STOP.KEY with a linefeed (\n). Then send one of the following commands ...

  • forcestop\n
  • stopexit\n
  • exit\n
  • status\n

See behaviors of those commands at ShutdownMonitor.java

Should be able to do that with an echo to netcat.

Upvotes: 1

Related Questions