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 Anurag Sharma <an...@gmail.com> on 2014/10/19 08:51:00 UTC

issue in launching SolrCloud windows/cygwin

Here is the issue am facing issue in using the 'solr' script on Windows
with cygwin terminal:

$ bin/solr -e cloud
bin/solr: line 16: $'\r': command not found
bin/solr: line 17: $'\r': command not found
bin/solr: line 46: $'\r': command not found
which: no lsof in
(/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
Files/TortoiseSVN/bin:/cygdrive/c/Program
Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
(x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
bin/solr: line 52: $'\r': command not found
bin/solr: line 87: syntax error near unexpected token `"$HOME/.solr.in.sh"'
'in/solr: line 87: `                   "$HOME/.solr.in.sh" \


further
$ bin/solr start -cloud -d node1 -p 8983
bin/solr: line 16: $'\r': command not found
bin/solr: line 17: $'\r': command not found
bin/solr: line 46: $'\r': command not found
which: no lsof in
(/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
Files/TortoiseSVN/bin:/cygdrive/c/Program
Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
(x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
bin/solr: line 52: $'\r': command not found
bin/solr: line 87: syntax error near unexpected token `"$HOME/.solr.in.sh"'
'in/solr: line 87: `                   "$HOME/.solr.in.sh" \

Is there any other way I can run the SolrCloud using "java -jar start.jar"
options?

Re: issue in launching SolrCloud windows/cygwin

Posted by Anurag Sharma <an...@gmail.com>.
Hello Jurgen,

Thanks a lot for yoru prompt response.

It solved the CRLF problem but the script is not supported on cygwin due to
severe limitations and lack of adherence to BASH standards, such as lack of
lsof, curl, and ps options.

I found there is a native solr.cmd script for windows which works without
any issue on windows shell. This solves the problem for now.

Regards,
Anurag



On Sun, Oct 19, 2014 at 12:39 PM, "Jürgen Wagner (DVT)" <
juergen.wagner@devoteam.com> wrote:

>  Hello Anurag,
>   the CRLF problem with Cygwin can be cured by running the scripts all
> through this filter:
>
> tr -d '\r' < $script > $script.new ; mv $script.new $script
>
> with $script holding the path of the script to be massaged.
>
> Generally, however, I would advise to use the standard scripts only for
> testing or demonstration purposes as you're very likely to have to change
> parameters or settings for your production environment, anyway. Using the
> latest Jetty is one such example.
>
> Best regards,
> --Jürgen
>
>
> On 19.10.2014 08:51, Anurag Sharma wrote:
>
> Here is the issue am facing issue in using the 'solr' script on Windows
> with cygwin terminal:
>
> $ bin/solr -e cloud
> bin/solr: line 16: $'\r': command not found
> bin/solr: line 17: $'\r': command not found
> bin/solr: line 46: $'\r': command not found
> which: no lsof in
> (/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
> Files/TortoiseSVN/bin:/cygdrive/c/Program
> Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
> Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
> (x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
> bin/solr: line 52: $'\r': command not found
> bin/solr: line 87: syntax error near unexpected token `"$HOME/.solr.in.sh"'
> 'in/solr: line 87: `                   "$HOME/.solr.in.sh" \
>
>
> further
> $ bin/solr start -cloud -d node1 -p 8983
> bin/solr: line 16: $'\r': command not found
> bin/solr: line 17: $'\r': command not found
> bin/solr: line 46: $'\r': command not found
> which: no lsof in
> (/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
> Files/TortoiseSVN/bin:/cygdrive/c/Program
> Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
> Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
> (x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
> bin/solr: line 52: $'\r': command not found
> bin/solr: line 87: syntax error near unexpected token `"$HOME/.solr.in.sh"'
> 'in/solr: line 87: `                   "$HOME/.solr.in.sh" \
>
> Is there any other way I can run the SolrCloud using "java -jar start.jar"
> options?
>
>
>
>
> --
>
> Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
> уважением
> *i.A. Jürgen Wagner*
> Head of Competence Center "Intelligence"
> & Senior Cloud Consultant
>
> Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
> Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
> E-Mail: juergen.wagner@devoteam.com, URL: www.devoteam.de
> ------------------------------
> Managing Board: Jürgen Hatzipantelis (CEO)
> Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
> Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
>
>
>

Re: issue in launching SolrCloud windows/cygwin

Posted by "Jürgen Wagner (DVT)" <ju...@devoteam.com>.
Hello Anurag,
  the CRLF problem with Cygwin can be cured by running the scripts all
through this filter:

tr -d '\r' < $script > $script.new ; mv $script.new $script

with $script holding the path of the script to be massaged.

Generally, however, I would advise to use the standard scripts only for
testing or demonstration purposes as you're very likely to have to
change parameters or settings for your production environment, anyway.
Using the latest Jetty is one such example.

Best regards,
--Jürgen

On 19.10.2014 08:51, Anurag Sharma wrote:
> Here is the issue am facing issue in using the 'solr' script on Windows
> with cygwin terminal:
>
> $ bin/solr -e cloud
> bin/solr: line 16: $'\r': command not found
> bin/solr: line 17: $'\r': command not found
> bin/solr: line 46: $'\r': command not found
> which: no lsof in
> (/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
> Files/TortoiseSVN/bin:/cygdrive/c/Program
> Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
> Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
> (x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
> bin/solr: line 52: $'\r': command not found
> bin/solr: line 87: syntax error near unexpected token `"$HOME/.solr.in.sh"'
> 'in/solr: line 87: `                   "$HOME/.solr.in.sh" \
>
>
> further
> $ bin/solr start -cloud -d node1 -p 8983
> bin/solr: line 16: $'\r': command not found
> bin/solr: line 17: $'\r': command not found
> bin/solr: line 46: $'\r': command not found
> which: no lsof in
> (/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
> Files/TortoiseSVN/bin:/cygdrive/c/Program
> Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
> Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
> (x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
> bin/solr: line 52: $'\r': command not found
> bin/solr: line 87: syntax error near unexpected token `"$HOME/.solr.in.sh"'
> 'in/solr: line 87: `                   "$HOME/.solr.in.sh" \
>
> Is there any other way I can run the SolrCloud using "java -jar start.jar"
> options?
>


-- 

Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
уважением
*i.A. Jürgen Wagner*
Head of Competence Center "Intelligence"
& Senior Cloud Consultant

Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
E-Mail: juergen.wagner@devoteam.com
<ma...@devoteam.com>, URL: www.devoteam.de
<http://www.devoteam.de/>

------------------------------------------------------------------------
Managing Board: Jürgen Hatzipantelis (CEO)
Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071



Re: issue in launching SolrCloud windows/cygwin

Posted by Anurag Sharma <an...@gmail.com>.
Hi Nazik,

Thanks for the response. The link mentioned by you is very useful.  I used
the windows cmd and started the cloud using solr.cmd script. The script is
very rich in taking multiple options.

Anurag

On Sun, Oct 19, 2014 at 5:01 PM, Nazik Huq <na...@gmail.com> wrote:

> Run Solr straight from the Windows cmd if CygWin isn't a requirement. For
> example, running "java -jar start.jar" from the "example" directory will
> start single instance Solr.
>
> To run SolrCloud follow the instructions in "Simple Two-Shard Cluster on
> the Same Machine" from this link http://bit.ly/1rlmYvF .
>
> @nazik_huq
>
> On Sun, Oct 19, 2014 at 2:51 AM, Anurag Sharma <an...@gmail.com> wrote:
>
> > Here is the issue am facing issue in using the 'solr' script on Windows
> > with cygwin terminal:
> >
> > $ bin/solr -e cloud
> > bin/solr: line 16: $'\r': command not found
> > bin/solr: line 17: $'\r': command not found
> > bin/solr: line 46: $'\r': command not found
> > which: no lsof in
> >
> >
> (/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
> > Files/TortoiseSVN/bin:/cygdrive/c/Program
> > Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
> > Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
> > (x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
> > bin/solr: line 52: $'\r': command not found
> > bin/solr: line 87: syntax error near unexpected token `"$HOME/.
> solr.in.sh
> > "'
> > 'in/solr: line 87: `                   "$HOME/.solr.in.sh" \
> >
> >
> > further
> > $ bin/solr start -cloud -d node1 -p 8983
> > bin/solr: line 16: $'\r': command not found
> > bin/solr: line 17: $'\r': command not found
> > bin/solr: line 46: $'\r': command not found
> > which: no lsof in
> >
> >
> (/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
> > Files/TortoiseSVN/bin:/cygdrive/c/Program
> > Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
> > Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
> > (x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
> > bin/solr: line 52: $'\r': command not found
> > bin/solr: line 87: syntax error near unexpected token `"$HOME/.
> solr.in.sh
> > "'
> > 'in/solr: line 87: `                   "$HOME/.solr.in.sh" \
> >
> > Is there any other way I can run the SolrCloud using "java -jar
> start.jar"
> > options?
> >
>

Re: issue in launching SolrCloud windows/cygwin

Posted by Nazik Huq <na...@gmail.com>.
Run Solr straight from the Windows cmd if CygWin isn't a requirement. For
example, running "java -jar start.jar" from the "example" directory will
start single instance Solr.

To run SolrCloud follow the instructions in "Simple Two-Shard Cluster on
the Same Machine" from this link http://bit.ly/1rlmYvF .

@nazik_huq

On Sun, Oct 19, 2014 at 2:51 AM, Anurag Sharma <an...@gmail.com> wrote:

> Here is the issue am facing issue in using the 'solr' script on Windows
> with cygwin terminal:
>
> $ bin/solr -e cloud
> bin/solr: line 16: $'\r': command not found
> bin/solr: line 17: $'\r': command not found
> bin/solr: line 46: $'\r': command not found
> which: no lsof in
>
> (/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
> Files/TortoiseSVN/bin:/cygdrive/c/Program
> Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
> Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
> (x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
> bin/solr: line 52: $'\r': command not found
> bin/solr: line 87: syntax error near unexpected token `"$HOME/.solr.in.sh
> "'
> 'in/solr: line 87: `                   "$HOME/.solr.in.sh" \
>
>
> further
> $ bin/solr start -cloud -d node1 -p 8983
> bin/solr: line 16: $'\r': command not found
> bin/solr: line 17: $'\r': command not found
> bin/solr: line 46: $'\r': command not found
> which: no lsof in
>
> (/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
> Files/TortoiseSVN/bin:/cygdrive/c/Program
> Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
> Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
> (x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
> bin/solr: line 52: $'\r': command not found
> bin/solr: line 87: syntax error near unexpected token `"$HOME/.solr.in.sh
> "'
> 'in/solr: line 87: `                   "$HOME/.solr.in.sh" \
>
> Is there any other way I can run the SolrCloud using "java -jar start.jar"
> options?
>