Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow lsof and sockstat to detect if solr started successfully #2906

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mfechner
Copy link

@mfechner mfechner commented Dec 13, 2024

The tool lsof is not available on all systems, like FreeBSD.
Added the possibility to use sockstat to detect if solr started successfully.
The startup script is using the tool that is available.

https://issues.apache.org/jira/browse/SOLR-17594

  • SOLR-17594: solr cannot detect start on FreeBSD as lsof does not exist

Description

Allow the startup script to use lsof or sockstat to detect if solr was started successfully

Solution

The script checks at first if lsof is available than if sockstat is available and than fallback to standard behaviour.

Tests

I tested the patch on FreeBSD and will also commit the patch after the PR is created with a link to it.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

The tool lsof is not available on all system, like FreeBSD.
Added the possibility to use sockstat to detect if solr started successfully.
The startup script is using the tool that is available.
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Dec 13, 2024
While starting solr it is using now sockstat and can detect now if the start
was successful.

The patch is also provided upstream here:
apache/solr#2906

Thanks a lot freebsd@koenigbj.8bx.de to provide with the required sockstat
parameters to make this PR possible.

PR:		283270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant