Elasticsearch listening on /127.0.0.1:9001 . Also shows Main PID: 12471 (code=exited, status=1/FAILURE) error messages- ubuntu server 16.04.3

Actually when I said

Much better.

I was wrong. You are using the citation icon instead of </>.

So please fix the format. It should be like:

bsaitechnosales@storage:~/Downloads$ sudo /etc/init.d/elasticsearch start
Starting elasticsearch: /etc/init.d/elasticsearch: line 108: daemon:
command not found

bsaitechnosales@storage:~/Downloads$ 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 Thu 2018-01-11 16:59:06 +0545; 8s ago
Docs: http://www.elastic.co
Process: 28630 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 28630 (code=exited, status=1/FAILURE)

Jan 11 16:59:06 storage systemd[1]: Started Elasticsearch.
Jan 11 16:59:06 storage elasticsearch[28630]: /usr/share/elasticsearch/bin/elasticsearch-env: line 70: /etc/sysconfig/elasticsearch: Permission denied
Jan 11 16:59:06 storage systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Jan 11 16:59:06 storage systemd[1]: elasticsearch.service: Unit entered failed state.
Jan 11 16:59:06 storage systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
...skipping...

Thanks.

Then about your question. This is important indeed:

line 70: /etc/sysconfig/elasticsearch: Permission denied

It indicates that this file can not be read by elasticsearch. Which probably means that you did not clean all the existing files before reinstalling.

I'd probably check the rights for this file.

lets do from start. I have uninstall elasticsearch in following way. Now
let's start in a clean way. Please suggest me the steps for installing
elasticsearch. This time i would like to follow your instructions

(1) Remove previous versions of ElasticSearch:

sudo apt-get --purge autoremove elasticsearch

(2) Remove the ElasticSearch directories:

sudo rm -rf /var/lib/elasticsearch/
sudo rm -rf /etc/elasticsearch
sudo rm -rf /opt/sonar/elasticsearch
sudo rm -rf /usr/share/elasticsearch/

(3) Search and Remove
bsaitechnosales@storage:~$ sudo find / "elasticsearch" | grep "elasticsearch"
/etc/systemd/system/multi-user.target.wants/elasticsearch.service
/root/Downloads/elasticsearch-6.1.1.rpm
/root/Downloads/elasticsearch-2.3.1.deb
/home/bsaitechnosales/Downloads/elasticsearch-6.1.1.rpm
/tmp/hsperfdata_elasticsearch
find: ‘/run/user/1000/gvfs’: Permission denied
/opt/sonar/lib/common/elasticsearch-rest-client-5.6.3.jar
/opt/sonar/lib/common/elasticsearch-5.6.3.jar
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/peek-1.0.1/lib/peek/adapters/elasticsearch.rb
find: ‘elasticsearch’: No such file or directory
bsaitechnosales@storage:~$ sudo rm -rf /tmp/hsperfdata_elasticsearch
bsaitechnosales@storage:~$ sudo rm -rf etc/systemd/system/multi-user.target.wants/elasticsearch*

David R u there ?

Yes. But it happens that people are sleeping or doing other stuff.
Read this and specifically the "Also be patient" part.

Again, please format your code.

I can see by chance that Sonar is supposed to use a 5.6 version but you are trying to install a 6.1 version. There is a chance that this is not going to work.

Anyway, to install elasticsearch, please follow the guide @warkolm linked to previously.

Once again would like to confirm first and then only i trigger the command. I will be following below steps for elasticsearch installation steps. Please guide me

The below steps is taken from this url --> Install Elasticsearch with Debian Package | Elasticsearch Guide [8.11] | Elastic

Also i have uninstall SONARQUBE as well

Now would like to follow your footsteps for both eleasticsearch and sonarqube.

Awaiting for your response

I can't tell for sonarqube and as I said at the beginning you should ask in sonarqube forums about this.

I just noted that IMO it's useless to install elasticsearch 6.x as Sonarqube seems to expect a version 5.x. But I imagine that sonarqube installation guide mentions that.

Then, if you install elasticsearch and follow the exact steps that you linked to, it should be fine. If not, please copy and paste here all the steps you did and the output of each command.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.