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 Eddie Trejo <ed...@intelligencebank.com> on 2017/08/17 03:55:10 UTC

Issue found with install_solr_service.sh

Hi There

Not sure if this is the right channel to report a possible bug, but I think there is a syntax error on lines 280 - 281

  find "$SOLR_INSTALL_DIR" -type d -print0 | xargs -0 chmod 0755
  find "$SOLR_INSTALL_DIR" -type f -print0 | xargs -0 chmod 0644

The below is printed on screen during the execution of the script:

chmod: missing operand after ‘0750’
Try 'chmod --help' for more information.
chmod: missing operand after ‘0640’
Try 'chmod --help' for more information.

Downloaded source code from here http://www.apache.org/dyn/closer.lua/lucene/solr/6.6.0 <http://www.apache.org/dyn/closer.lua/lucene/solr/6.6.0>

Thanks

-------------------------------------------------------
Eddie Trejo - Infrastructure and DevOps Manager

AUS:  +61 3 8618 7800
-------------------------------------------------------


Re: Issue found with install_solr_service.sh

Posted by Jason Gerlowski <ge...@gmail.com>.
Also, can you confirm whether there are files in your install/extract directory?

On Thu, Aug 17, 2017 at 2:22 PM, Jason Gerlowski <ge...@gmail.com> wrote:
> Hi Eddie, thanks for reporting.
>
> This is a common issue with "xargs".  When xargs doesn't receive any
> input through the pipe (i.e. if "find" doesn't find anything), it
> isn't smart enough to exit-early and still tries to run the "chmod"
> command without a filename.  The "-r" flag is present in most versions
> of xargs to prevent this behavior.  I'll create a JIRA to suggest this
> change.  (For context:
> https://stackoverflow.com/questions/36617999/error-rm-missing-operand-when-using-along-with-find-command)
>
>
> Also concerning though is that "find" isn't outputting any files in
> the first place.  I'll also take a look at that.  Can you provide any
> information on what environment you're seeing this on (OS, version,
> Solr version, etc.)?
>
> On Wed, Aug 16, 2017 at 11:55 PM, Eddie Trejo
> <ed...@intelligencebank.com> wrote:
>> Hi There
>>
>> Not sure if this is the right channel to report a possible bug, but I think there is a syntax error on lines 280 - 281
>>
>>   find "$SOLR_INSTALL_DIR" -type d -print0 | xargs -0 chmod 0755
>>   find "$SOLR_INSTALL_DIR" -type f -print0 | xargs -0 chmod 0644
>>
>> The below is printed on screen during the execution of the script:
>>
>> chmod: missing operand after ‘0750’
>> Try 'chmod --help' for more information.
>> chmod: missing operand after ‘0640’
>> Try 'chmod --help' for more information.
>>
>> Downloaded source code from here http://www.apache.org/dyn/closer.lua/lucene/solr/6.6.0 <http://www.apache.org/dyn/closer.lua/lucene/solr/6.6.0>
>>
>> Thanks
>>
>> -------------------------------------------------------
>> Eddie Trejo - Infrastructure and DevOps Manager
>>
>> AUS:  +61 3 8618 7800
>> -------------------------------------------------------
>>

Re: Issue found with install_solr_service.sh

Posted by Jason Gerlowski <ge...@gmail.com>.
Hi Eddie, thanks for reporting.

This is a common issue with "xargs".  When xargs doesn't receive any
input through the pipe (i.e. if "find" doesn't find anything), it
isn't smart enough to exit-early and still tries to run the "chmod"
command without a filename.  The "-r" flag is present in most versions
of xargs to prevent this behavior.  I'll create a JIRA to suggest this
change.  (For context:
https://stackoverflow.com/questions/36617999/error-rm-missing-operand-when-using-along-with-find-command)


Also concerning though is that "find" isn't outputting any files in
the first place.  I'll also take a look at that.  Can you provide any
information on what environment you're seeing this on (OS, version,
Solr version, etc.)?

On Wed, Aug 16, 2017 at 11:55 PM, Eddie Trejo
<ed...@intelligencebank.com> wrote:
> Hi There
>
> Not sure if this is the right channel to report a possible bug, but I think there is a syntax error on lines 280 - 281
>
>   find "$SOLR_INSTALL_DIR" -type d -print0 | xargs -0 chmod 0755
>   find "$SOLR_INSTALL_DIR" -type f -print0 | xargs -0 chmod 0644
>
> The below is printed on screen during the execution of the script:
>
> chmod: missing operand after ‘0750’
> Try 'chmod --help' for more information.
> chmod: missing operand after ‘0640’
> Try 'chmod --help' for more information.
>
> Downloaded source code from here http://www.apache.org/dyn/closer.lua/lucene/solr/6.6.0 <http://www.apache.org/dyn/closer.lua/lucene/solr/6.6.0>
>
> Thanks
>
> -------------------------------------------------------
> Eddie Trejo - Infrastructure and DevOps Manager
>
> AUS:  +61 3 8618 7800
> -------------------------------------------------------
>

Re: Issue found with install_solr_service.sh

Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/16/2017 9:55 PM, Eddie Trejo wrote:
> Not sure if this is the right channel to report a possible bug, but I think there is a syntax error on lines 280 - 281
>
>   find "$SOLR_INSTALL_DIR" -type d -print0 | xargs -0 chmod 0755
>   find "$SOLR_INSTALL_DIR" -type f -print0 | xargs -0 chmod 0644
>
> The below is printed on screen during the execution of the script:
>
> chmod: missing operand after ‘0750’
> Try 'chmod --help' for more information.
> chmod: missing operand after ‘0640’
> Try 'chmod --help' for more information.

These commands are correct, assuming that the rest of the script works
correctly.  The find command on the first line locates directories and
the find command on the second line locates files.  Then each one pipes
its null-separated list through the "xargs" command with the desired
chmod command as arguments.  The man page for xargs starts with this:

xargs - build and execute command lines from standard input

Check the man page for xargs on your own system for more detail about
what it does.

Getting those particular errors on both of those lines is only going to
happen if something goes wrong.  One possible thing that might be wrong
is that your system has an incompatible version of one or more of the
dependencies (bash, tar, find, xargs, etc) installed, or that it doesn't
have one of the dependencies installed at all.

Whatever is wrong has resulted in zero file/directory arguments being
generated, as if the location in $SOLR_INSTALL_DIR either doesn't exist
or isn't readable by the user running the script.  General thought:  Are
you running the service install script as root?  That's going to be
required.

I have used the service installer script in a few of the 6.x versions,
including 6.6.0, without any problems.

I don't think the Solr scripts are compatible with cygwin, or with some
of the genetic UNIX flavors like Solaris.  The full-blown operating
systems with strong GNU roots will work fine, such as Linux or FreeBSD.

Thanks,
Shawn