Sorry, I omitted a bit about the wait script, it waits until it can make an http connection and then makes a request to the health check handler.
Indeed, it seems to be difficult because each environment seems to have different timing for when to notify. I think it is important to have a health check for startup integration, but it seems inadequate when only considering notify. Either way, it will be after systemd integration is implemented. Thank you. Taisuke 2022年3月8日(火) 11:53 Shawn Heisey <[email protected]>: > On 3/6/2022 11:23 PM, Taisuke Miyazaki wrote: > > I am currently managing Solr with systemd. > > However, systemd's Type=simple considers the process successful as soon > as > > it starts, so in order to ensure the success of the process after > startup, > > I am waiting until it is ready to accept http requests after startup. > > The wait process is just a simple script that makes a request to > > http://localhost:8983/solr until 200 OK is returned. > > > > I am not particularly troubled by this specification, but I believe that > > systemd has a type Type=notify, which can be used to make solr active > when > > it is ready. (I don't know how useful this would be, but if everyone is > > implementing wait processing, it might be a little useful) > > > > Are there any plans to support Type=notify in the future? > > Or is it possible to hook the startup completion event from the plugin? > If > > possible, we are considering making this as a prototype and providing > > feedback. > > At this time, the project does not have any kind of official systemd > integration, so you must be using something unofficial, or something you > wrote yourself. To find out what is supported by a Solr systemd > integration, you would have to talk to whoever wrote it, because it did > not come from the Solr project. > > I am not aware of any kind of existing reliable test that you can do > which indicates Solr is fully operational. The URL that you are > visiting for your test gets redirected to the admin UI. I could be > wrong about this, but I believe that the admin UI can be reached before > the rest of Solr has fully started. The admin UI is html and > javascript, and mostly runs in the browser, not on the server. > > We are looking to support systemd, it just hasn't happened yet. > > https://issues.apache.org/jira/browse/SOLR-14410 > > I believe that a central health check URL path for the service as a > whole will be a prerequisite for any startup integration beyond what's > already available from the project, which is for sysvinit. For > individual indexes, Solr does already have a health-check mechanism, via > the ping handler. But that is for an individual index, not the whole > program. > > Thanks, > Shawn > >
