Installing elasticsearch on red hat linux - error command not found


(Preeti Jain) #1

Hi all,

I'm installing elasticsearch version 1.0.1 on red hat linux.
I have placed elastic search in directory /opt so the path till bin looks
like /opt/elasticsearch-1.0.1/bin
when I'm trying to start elasticsearch as
$ bin/elasticsearch -f
I get error message elasticsearch: command not found
Tried changing the permission on elasticsearch file, after that the error
changed to bin/elasticsearch: line 116: syntax error: unexpected end of file
I also tried using the service wrapper but facing the same issue

JAVA_HOME and ES_HOME env variables are properly set

could anyone help?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b2291df5-c407-4e4a-ac61-a2aba7795dc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Sumit Gupta) #2

Hi,

Check this one may be help.

https://gist.github.com/wingdspur/2026107

Thanks & Regards,
Sumit Gupta


(Ivan Brusic) #3

How did you install Elasticsearch? Did you use a download [1] or some other
binary distribution such as RPM?

If by chance, you simply cloned the Github repository, that is not the
correct way to install Elasticsearch. Use a downloadable version instead.

[1] http://www.elasticsearch.org/download

--
Ivan

On Tue, Mar 11, 2014 at 6:30 AM, Preeti Jain itspreeti@gmail.com wrote:

Hi all,

I'm installing elasticsearch version 1.0.1 on red hat linux.
I have placed elastic search in directory /opt so the path till bin looks
like /opt/elasticsearch-1.0.1/bin
when I'm trying to start elasticsearch as
$ bin/elasticsearch -f
I get error message elasticsearch: command not found
Tried changing the permission on elasticsearch file, after that the error
changed to bin/elasticsearch: line 116: syntax error: unexpected end of
file
I also tried using the service wrapper but facing the same issue

JAVA_HOME and ES_HOME env variables are properly set

could anyone help?

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b2291df5-c407-4e4a-ac61-a2aba7795dc4%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/b2291df5-c407-4e4a-ac61-a2aba7795dc4%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCbrGHM%2BYiYCuW1kQX2azf4_NMmEcMyDw9NfMKsmfvb0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Preeti Jain) #4

I downloaded it properly from the website.

Regards,
Preeti

On Wednesday, March 12, 2014 12:45:40 AM UTC+5:30, Ivan Brusic wrote:

How did you install Elasticsearch? Did you use a download [1] or some
other binary distribution such as RPM?

If by chance, you simply cloned the Github repository, that is not the
correct way to install Elasticsearch. Use a downloadable version instead.

[1] http://www.elasticsearch.org/download

--
Ivan

On Tue, Mar 11, 2014 at 6:30 AM, Preeti Jain <itsp...@gmail.com<javascript:>

wrote:

Hi all,

I'm installing elasticsearch version 1.0.1 on red hat linux.
I have placed elastic search in directory /opt so the path till bin looks
like /opt/elasticsearch-1.0.1/bin
when I'm trying to start elasticsearch as
$ bin/elasticsearch -f
I get error message elasticsearch: command not found
Tried changing the permission on elasticsearch file, after that the error
changed to bin/elasticsearch: line 116: syntax error: unexpected end of
file
I also tried using the service wrapper but facing the same issue

JAVA_HOME and ES_HOME env variables are properly set

could anyone help?

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b2291df5-c407-4e4a-ac61-a2aba7795dc4%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/b2291df5-c407-4e4a-ac61-a2aba7795dc4%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/15186ffd-f35e-41ed-ae2c-445c6efc3572%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Mark Walkom) #5

Use the rpm, not the zip/tar.gz.

Otherwise run /opt/elasticsearch-1.0.1/bin/elasticsearch -f

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 12 March 2014 14:35, Preeti Jain itspreeti@gmail.com wrote:

I downloaded it properly from the website.

Regards,
Preeti

On Wednesday, March 12, 2014 12:45:40 AM UTC+5:30, Ivan Brusic wrote:

How did you install Elasticsearch? Did you use a download [1] or some
other binary distribution such as RPM?

If by chance, you simply cloned the Github repository, that is not the
correct way to install Elasticsearch. Use a downloadable version instead.

[1] http://www.elasticsearch.org/download

--
Ivan

On Tue, Mar 11, 2014 at 6:30 AM, Preeti Jain itsp...@gmail.com wrote:

Hi all,

I'm installing elasticsearch version 1.0.1 on red hat linux.
I have placed elastic search in directory /opt so the path till bin
looks like /opt/elasticsearch-1.0.1/bin
when I'm trying to start elasticsearch as
$ bin/elasticsearch -f
I get error message elasticsearch: command not found
Tried changing the permission on elasticsearch file, after that the
error changed to bin/elasticsearch: line 116: syntax error: unexpected
end of file
I also tried using the service wrapper but facing the same issue

JAVA_HOME and ES_HOME env variables are properly set

could anyone help?

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/b2291df5-c407-4e4a-ac61-a2aba7795dc4%
40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/b2291df5-c407-4e4a-ac61-a2aba7795dc4%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/15186ffd-f35e-41ed-ae2c-445c6efc3572%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/15186ffd-f35e-41ed-ae2c-445c6efc3572%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAEM624ZCc5ejvHxLW-Y7nM%2BqXZ%3D_wfH9T7vs6qJveVfS38EhSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(David Pilato) #6

Without -f which is no more needed on 1.0 :slight_smile:

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 12 mars 2014 à 04:39, Mark Walkom markw@campaignmonitor.com a écrit :

Use the rpm, not the zip/tar.gz.

Otherwise run /opt/elasticsearch-1.0.1/bin/elasticsearch -f

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 12 March 2014 14:35, Preeti Jain itspreeti@gmail.com wrote:
I downloaded it properly from the website.

Regards,
Preeti

On Wednesday, March 12, 2014 12:45:40 AM UTC+5:30, Ivan Brusic wrote:
How did you install Elasticsearch? Did you use a download [1] or some other binary distribution such as RPM?

If by chance, you simply cloned the Github repository, that is not the correct way to install Elasticsearch. Use a downloadable version instead.

[1] http://www.elasticsearch.org/download

--
Ivan

On Tue, Mar 11, 2014 at 6:30 AM, Preeti Jain itsp...@gmail.com wrote:
Hi all,

I'm installing elasticsearch version 1.0.1 on red hat linux.
I have placed elastic search in directory /opt so the path till bin looks like /opt/elasticsearch-1.0.1/bin
when I'm trying to start elasticsearch as
$ bin/elasticsearch -f
I get error message elasticsearch: command not found
Tried changing the permission on elasticsearch file, after that the error changed to bin/elasticsearch: line 116: syntax error: unexpected end of file
I also tried using the service wrapper but facing the same issue

JAVA_HOME and ES_HOME env variables are properly set

could anyone help?

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b2291df5-c407-4e4a-ac61-a2aba7795dc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/15186ffd-f35e-41ed-ae2c-445c6efc3572%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAEM624ZCc5ejvHxLW-Y7nM%2BqXZ%3D_wfH9T7vs6qJveVfS38EhSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/DCB293A2-B947-4AEC-BFF4-5970DCF663B9%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.


(Jörg Prante) #7

Maybe you installed and unpacked the zip in an uncommon way, and the result
has Windows line feeds and/or wrong permissions?

Use tar.gz on RHEL. It works here. Also service wrapper, it works
flawlessly.

Do not forget to install Oracle 7 Java.

Jörg

On Tue, Mar 11, 2014 at 2:30 PM, Preeti Jain itspreeti@gmail.com wrote:

Hi all,

I'm installing elasticsearch version 1.0.1 on red hat linux.
I have placed elastic search in directory /opt so the path till bin looks
like /opt/elasticsearch-1.0.1/bin
when I'm trying to start elasticsearch as
$ bin/elasticsearch -f
I get error message elasticsearch: command not found
Tried changing the permission on elasticsearch file, after that the error
changed to bin/elasticsearch: line 116: syntax error: unexpected end of
file
I also tried using the service wrapper but facing the same issue

JAVA_HOME and ES_HOME env variables are properly set

could anyone help?

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b2291df5-c407-4e4a-ac61-a2aba7795dc4%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/b2291df5-c407-4e4a-ac61-a2aba7795dc4%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHH88csGdG120LWPoBLfD4E%2BWuiCNhPGNWvONhwNSHraw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Prashant Agrawal) #8

If you have copied the files from windows to linux and then executing ES.
Then try dos2unix elasticseacrh and then run ES


(system) #9