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

(David Pilato) #8

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:


(BSAI Techno Sales) #9

Is it ok if i paste in this way

(David Pilato) #10

Please don't post images of text as they are hardly readable and not searchable.

Instead paste the text and format it with </> icon. Check the preview window.

(BSAI Techno Sales) #11

Noted. Is it ok now ? Assume example as bsaitechnosales

(David Pilato) #12

Much better. Thanks.

Not sure how you installed elasticsearch. Did you follow all the steps mentioned in the installation guide?

(BSAI Techno Sales) #13

yes i did follow the steps. i followed online website for the installation

(David Pilato) #14

Can you tell me how you did install elasticsearch please?

(BSAI Techno Sales) #15

I follow the steps from this url

(Mark Walkom) #16

This is why.

That's ~3 years old. Check out https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html

(David Pilato) #17

I should have been more precise about "Did you follow all the steps mentioned in the installation guide?" :stuck_out_tongue:

(BSAI Techno Sales) #18

So how do i redo it again ? I am about to follow the below mentioned steps provided by this url https://www.elastic.co/guide/en/beats/libbeat/current/elasticsearch-installation.html

Let me know what you suggest ?


(BSAI Techno Sales) #19

Yes I did. I follow according to that url which i send you earlier

(BSAI Techno Sales) #20

Now I am getting following error. Please suggest

(David Pilato) #21

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'.


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.

(BSAI Techno Sales) #22

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"
find: ‘/run/user/1000/gvfs’: Permission denied
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*

(BSAI Techno Sales) #23

David R u there ?

(David Pilato) #24

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.

(BSAI Techno Sales) #25

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 --> https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html

Also i have uninstall SONARQUBE as well

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

Awaiting for your response

(David Pilato) #26

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.

(system) closed #27

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