Summary: | textproc/apache-solr do not use lsof in startup script | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Wiktor Niesiobedzki <bsd> | ||||||||
Component: | Individual Port(s) | Assignee: | Larry Rosenman <ler> | ||||||||
Status: | Closed FIXED | ||||||||||
Severity: | Affects Only Me | CC: | ler, mfechner | ||||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(mfechner) |
||||||||
Version: | Latest | ||||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
this is a really good idea. But I have already committed an update for the solr port: #218523 Would you like to update the patch for the new version? No problem. I can't see the changes that you've mentioned in: https://svn.freebsd.org/ports/head So I've applied the patch from #218523 manually and created the diff again. So now Makefile changes report also change of the Solr version. There are minor changes in line numbers in patch. Created attachment 181806 [details]
patch for apache-solr 6.5.0
Created attachment 181808 [details]
Use sockstat instead of lsof for apache-solr 6.5.0
Thanks a lot to Wiktor!
I modified the patch a little bit to cleanly apply to the new 6.5.0 apache-solr port that is not committed yet.
Please commit port 218523 before you apply this patch. I tested everything and it works fine. A commit references this bug: Author: ler Date: Tue Apr 18 01:37:21 UTC 2017 New revision: 438757 URL: https://svnweb.freebsd.org/changeset/ports/438757 Log: Stock apache-solr scripts use lsof during startup to check if Solr started properly. When deploying Apache Solr in Jail lsof needs access to /dev/mem which is not allowed by default. Lack of the access makes the startup script run in the loop for 3 minutes and then it assumes that it might have succeed. Allowing access to /dev/mem makes running Solr in Jail a bit pointless. Following patch changes the behaviour of Solr startup script to use sockstat instead of lsof to check if Solr has already started. This also makes the dependency on lsof obsolete. While here, pet portlint. PR: 218654 Submitted by: Wiktor Niesiobedzki <bsd@vink.pl> Approved by: idefix@fechner.net (maintainer), adamw (mentor) Differential Revision: https://reviews.freebsd.org/D10416 Changes: head/textproc/apache-solr/Makefile head/textproc/apache-solr/files/patch-bin_solr head/textproc/apache-solr/files/solr.in Committed, thanks! |
Created attachment 181781 [details] patch for apache-solr port Stock apache-solr scripts use lsof during startup to check if Solr started properly. When deploying Apache Solr in Jail lsof needs access to /dev/mem which is not allowed by default. Lack of the access makes the startup script run in the loop for 3 minutes and then it assumes that it might have succeed. Allowing access to /dev/mem makes running Solr in Jail a bit pointless. Following patch changes the behaviour of Solr startup script to use sockstat instead of lsof to check if Solr has already started. This also makes the dependency on lsof obsolete.