You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Susheel Kumar <su...@gmail.com> on 2017/06/14 13:47:02 UTC

install solr service possible bug

Hi,

Can anyone confirm if this  "service --version" command works ? For me to
install in SUSE distribution,  "service --version" commands always fail and
abort the solr installation with printing the error  "Script requires the
'service' command"

To make it work, i had to change "service --version" to "service --help".

If someone can confirm, i'll raise a JIRA to have this minor fix.

install_solr_service.sh =>  Solr 6.6.0
---
---
---
if [[ $SOLR_START == "true" ]] ; then
  service --version &>/dev/null || print_error "Script requires the
'service' command"
  java -version &>/dev/null     || print_error "Solr requires java, please
install or set JAVA_HOME properly"
fi
lsof -h &>/dev/null             || echo "We recommend installing the 'lsof'
command for more stable start/stop of Solr"

Re: install solr service possible bug

Posted by Susheel Kumar <su...@gmail.com>.
Thanks for checking and confirming Shawn.  I have created JIRA

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

On Tue, Jun 20, 2017 at 10:06 AM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 6/14/2017 7:47 AM, Susheel Kumar wrote:
> > Can anyone confirm if this "service --version" command works ? For me
> > to install in SUSE distribution, "service --version" commands always
> > fail and abort the solr installation with printing the error "Script
> > requires the 'service' command" To make it work, i had to change
> > "service --version" to "service --help". If someone can confirm, i'll
> > raise a JIRA to have this minor fix.
>
> This is what I get with OS versions that I have access to when running
> "service --version":
>
> CentOS 7:
> service ver. 1.1
>
> Ubuntu 16:
> service ver. 0.91-ubuntu1
>
> Ubuntu 14:
> service ver. 0.91-ubuntu1
>
> CentOS 6:
> service ver. 0.91
>
> Debian 6:
> service ver. 0.91-ubuntu1
>
> Sparc Solaris 10:
> bash: service: command not found
>
> =================
>
> I don't have access to any systems running SUSE.  This is not the first
> time I've heard of compatibility issues with the tools that are included
> in SUSE.
>
> It looks like "service --help" works on all the Linux systems I have
> access to, so your fix sounds like a good idea.  Please raise that issue
> in Jira that you mentioned.  You might also want to raise an issue with
> SUSE, so they can upgrade their service command to be more compatible
> with other systems.
>
> Solaris doesn't have the service command at all, so the service
> installer would not work on that OS.  I think Solr should support
> installing on commercial operating systems like Solaris, which would
> require more significant development work.  The scripts included with
> Solr are heavily reliant on tools that are typically not present on
> standard installs of commercial UNIX systems, and often not in the
> default PATH even when they are optional and have been installed.  See
> the discussion on this issue, which is talking about the "bin/solr"
> script rather than the service installer that is being discussed in this
> thread:
>
> https://issues.apache.org/jira/browse/SOLR-9862
>
> As long as the service installer script is under the microscope:  I
> think that Solr should include configurations for popular sysvinit
> replacements like systemd and upstart, and that the service installer
> script should detect and install correctly on these systems, falling
> back to /etc/init.d only when the more modern systems are not found.
> These systems probably want Solr in the foreground, so we need to
> address SOLR-9177.
>
> Thanks,
> Shawn
>
>

Re: install solr service possible bug

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/14/2017 7:47 AM, Susheel Kumar wrote:
> Can anyone confirm if this "service --version" command works ? For me
> to install in SUSE distribution, "service --version" commands always
> fail and abort the solr installation with printing the error "Script
> requires the 'service' command" To make it work, i had to change
> "service --version" to "service --help". If someone can confirm, i'll
> raise a JIRA to have this minor fix.

This is what I get with OS versions that I have access to when running
"service --version":

CentOS 7:
service ver. 1.1

Ubuntu 16:
service ver. 0.91-ubuntu1

Ubuntu 14:
service ver. 0.91-ubuntu1

CentOS 6:
service ver. 0.91

Debian 6:
service ver. 0.91-ubuntu1

Sparc Solaris 10:
bash: service: command not found

=================

I don't have access to any systems running SUSE.  This is not the first
time I've heard of compatibility issues with the tools that are included
in SUSE.

It looks like "service --help" works on all the Linux systems I have
access to, so your fix sounds like a good idea.  Please raise that issue
in Jira that you mentioned.  You might also want to raise an issue with
SUSE, so they can upgrade their service command to be more compatible
with other systems.

Solaris doesn't have the service command at all, so the service
installer would not work on that OS.  I think Solr should support
installing on commercial operating systems like Solaris, which would
require more significant development work.  The scripts included with
Solr are heavily reliant on tools that are typically not present on
standard installs of commercial UNIX systems, and often not in the
default PATH even when they are optional and have been installed.  See
the discussion on this issue, which is talking about the "bin/solr"
script rather than the service installer that is being discussed in this
thread:

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

As long as the service installer script is under the microscope:  I
think that Solr should include configurations for popular sysvinit
replacements like systemd and upstart, and that the service installer
script should detect and install correctly on these systems, falling
back to /etc/init.d only when the more modern systems are not found. 
These systems probably want Solr in the foreground, so we need to
address SOLR-9177.

Thanks,
Shawn