Uh, sorry for spamming, but if anyone interested there is a way to
properly shutdown Jetty when it's launched with --exec flag.
You can use JMX to invoke method stop() on the Jetty's Server MBean.
This triggers a proper shutdown with all Solr's close() callbacks executed.
I wonder why it's not noted at least in Jetty documentation.
Regards,
Artem Karpenko.
30.07.2013 16:58, Artem Karpenko пишет:
After some investigation I found that the problem is not with Jetty's
version but usage of --exec flag.
Namely, when --exec is used (to specify JVM args) then shutdown is not
graceful, it seems that Java process that is just killed.
Not sure how to handle this...
Regards,
Artem Karpenko.
29.07.2013 16:51, Artem Karpenko пишет:
Hi,
I can't make Solr shut down properly when using Jetty 9. Tested this
with a simple plugin that only extends DirectUpdateHandler2, creates a
file in constructor and deletes it in close(). While it's working fine
in the example installation (the one that can be downloaded from Solr
site) and in the simple custom installation with Jetty 8, it won't in
Jetty 9. There is not much logging at shutdown at all, just Jetty's
"closing selector" or smth., unlike with Jetty 8 where it prints various
"Graceful shutdown" messages from Solr.
Installation procedure I used for both Jettys is rather simple: just put
solr.war into webapps/ directory, plugin JAR into {core}/lib/ and
configure update handler in solrconfig.xml.
OS is Windows 7, Solr 4.4.
I tried to stop Jetty with both "Ctrl+C" and "java start.jar [port/key
params] --stop". For Jetty 8 it works fine even with Ctrl+C.
Did anybody stumble on this issue?
Best regards,
Artem.