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

Unable to install/start elastic search on local server #5003

Closed
dojutsu-user opened this issue Dec 14, 2018 · 7 comments
Closed

Unable to install/start elastic search on local server #5003

dojutsu-user opened this issue Dec 14, 2018 · 7 comments
Labels
Support Support question

Comments

@dojutsu-user
Copy link
Member

Docs Link - https://docs.readthedocs.io/en/latest/custom_installs/elasticsearch.html

These are the outputs of commands that i tried to run

$ java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)
$ sudo apt install ./elasticsearch-1.3.8.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'elasticsearch' instead of './elasticsearch-1.3.8.deb'
The following NEW packages will be installed:
  elasticsearch
0 upgraded, 1 newly installed, 0 to remove and 94 not upgraded.
Need to get 0 B/27.0 MB of archives.
After this operation, 30.9 MB of additional disk space will be used.
Get:1 /home/pikachu/Downloads/elasticsearch-1.3.8.deb elasticsearch all 1.3.8 [27.0 MB]
Selecting previously unselected package elasticsearch.
(Reading database ... 209267 files and directories currently installed.)
Preparing to unpack .../elasticsearch-1.3.8.deb ...
Unpacking elasticsearch (1.3.8) ...
dpkg: warning: unable to delete old directory '/var/lib/elasticsearch': Directory not empty
dpkg: warning: unable to delete old directory '/usr/lib/systemd/system': Directory not empty
Processing triggers for ureadahead (0.100.0-20) ...
Setting up elasticsearch (1.3.8) ...
Installing new version of config file /etc/init.d/elasticsearch ...
Installing new version of config file /etc/default/elasticsearch ...

Configuration file '/etc/elasticsearch/elasticsearch.yml'
 ==> Deleted (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** elasticsearch.yml (Y/I/N/O/D/Z) [default=N] ? 
Processing triggers for systemd (237-3ubuntu10.9) ...
Processing triggers for ureadahead (0.100.0-20) ...
$ /usr/share/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-analysis-icu/2.3.0
-> Installing elasticsearch/elasticsearch-analysis-icu/2.3.0...
Trying http://download.elasticsearch.org/elasticsearch/elasticsearch-analysis-icu/elasticsearch-analysis-icu-2.3.0.zip...
Downloading ...........DONE
Installed elasticsearch/elasticsearch-analysis-icu/2.3.0 into /usr/share/elasticsearch/plugins/analysis-icu
$ ps -p 1
  PID TTY          TIME CMD
    1 ?        00:00:08 systemd
$ sudo /bin/systemctl daemon-reload
$ sudo /bin/systemctl enable elasticsearch.service
Synchronizing state of elasticsearch.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable elasticsearch
Created symlink /etc/systemd/system/multi-user.target.wants/elasticsearch.service → /usr/lib/systemd/system/elasticsearch.service.
$ sudo systemctl start elasticsearch.service
$ curl http://localhost:9200
curl: (7) Failed to connect to localhost port 9200: Connection refused
$ sudo service elasticsearch status
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-12-14 15:58:19 IST; 17s ago
     Docs: http://www.elastic.co
  Process: 9381 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, stat
 Main PID: 9381 (code=exited, status=2)

Dec 14 15:58:19 amaterasu systemd[1]: Started Elasticsearch.
Dec 14 15:58:19 amaterasu elasticsearch[9381]: /usr/share/elasticsearch/bin/elasticsearch: 168: shift: can't shift that many
Dec 14 15:58:19 amaterasu systemd[1]: elasticsearch.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 14 15:58:19 amaterasu systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
...skipping...
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-12-14 15:58:19 IST; 17s ago
     Docs: http://www.elastic.co
  Process: 9381 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, stat
 Main PID: 9381 (code=exited, status=2)

Dec 14 15:58:19 amaterasu systemd[1]: Started Elasticsearch.
Dec 14 15:58:19 amaterasu elasticsearch[9381]: /usr/share/elasticsearch/bin/elasticsearch: 168: shift: can't shift that many
Dec 14 15:58:19 amaterasu systemd[1]: elasticsearch.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 14 15:58:19 amaterasu systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
@dojutsu-user dojutsu-user changed the title Unable install elastic search on local server Unable to install/start elastic search on local server Dec 14, 2018
@stsewd
Copy link
Member

stsewd commented Dec 14, 2018

I was having the same problem when installing on travis #4919 (comment), I guess it's because of the java version

@stsewd stsewd added the Support Support question label Dec 14, 2018
@dojutsu-user
Copy link
Member Author

I tried downgrading.

$ java -version
openjdk version "1.7.0_191"
OpenJDK Runtime Environment (Zulu 7.24.0.1-linux64) (build 1.7.0_191-b08)
OpenJDK 64-Bit Server VM (Zulu 7.24.0.1-linux64) (build 24.191-b08, mixed mode)

But still the same problem.
But ES6 works fine.

Is there any solution?

@stsewd
Copy link
Member

stsewd commented Dec 14, 2018

You can use docker

@dojutsu-user
Copy link
Member Author

dojutsu-user commented Dec 15, 2018

Thanks.
That was a nice idea.
Eventually, I have to create my own Dockerfile because the one on the docker hub doesn't come with elasticsearch-analysis-icu:2.3.0. And so the command python manage.py provision_elasticsearch thorws an error.

Anyone struggling with this issue, here's the content of the dockerfile

FROM elasticsearch:1.3.8
RUN /usr/share/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-analysis-icu/2.3.0

@stsewd is there a need to document this?

@stsewd
Copy link
Member

stsewd commented Dec 17, 2018

Not sure, I know that we suggest to use docker in the ES update #4722

@dojutsu-user
Copy link
Member Author

RTD now has latest version of ES 🎉
This can be closed.

@humitos
Copy link
Member

humitos commented Jan 28, 2019

These docs cover the search setup: https://docs.readthedocs.io/en/latest/development/search.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

3 participants