Page MenuHomeFreeBSD

textproc/apache-solr do not use lsof in startup script
ClosedPublic

Authored by ler on Apr 18 2017, 1:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 10 2024, 10:44 PM
Unknown Object (File)
Feb 10 2024, 10:44 PM
Unknown Object (File)
Feb 10 2024, 10:44 PM
Unknown Object (File)
Feb 10 2024, 10:44 PM
Unknown Object (File)
Feb 10 2024, 4:37 AM
Unknown Object (File)
Feb 5 2024, 12:43 AM
Unknown Object (File)
Jan 16 2024, 2:59 AM
Unknown Object (File)
Dec 27 2023, 6:06 PM
Subscribers

Details

Summary

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.

PR: 218654
Submitted by: Wiktor Niesiobedzki <bsd@vink.pl>
Approved by: idefix@fechner.net (maintainer), (adamw|rene) (mentor)

Test Plan

poudriere (ok)
portlint (existing warnings)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 8770
Build 9124: arc lint + arc unit

Event Timeline

Wow that is a much better method! Looks good, and good catch on the RUN_DEPENDS location. Do add something like "While here, pet portlint" to the commit message.

This revision is now accepted and ready to land.Apr 18 2017, 1:33 AM
This revision was automatically updated to reflect the committed changes.