Not able to get logs from sidecar

Hi,
This is what I got after sending the command:
● elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-11-18 11:30:33 EST; 1min 11s ago
Docs: http://www.elastic.co
Main PID: 2912 (code=exited, status=1/FAILURE)

Nov 18 11:30:33 smc-B325 elasticsearch[2912]: at com.fasterxml.jackson.core.json.JsonReadContext.setCurrentName(JsonReadContext.java:198)
Nov 18 11:30:33 smc-B325 elasticsearch[2912]: at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:372)
Nov 18 11:30:33 smc-B325 elasticsearch[2912]: at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:52)
Nov 18 11:30:33 smc-B325 elasticsearch[2912]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:675)
Nov 18 11:30:33 smc-B325 elasticsearch[2912]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:650)
Nov 18 11:30:33 smc-B325 elasticsearch[2912]: at org.elasticsearch.common.settings.Settings.access$500(Settings.java:82)
Nov 18 11:30:33 smc-B325 elasticsearch[2912]: at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1135)
Nov 18 11:30:33 smc-B325 elasticsearch[2912]: … 8 more
Nov 18 11:30:33 smc-B325 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Nov 18 11:30:33 smc-B325 systemd[1]: elasticsearch.service: Failed with result ‘exit-code’.
~

I looked it up and found 1 possible cause that “he data directory of Elasticsearch needs to be writable for the elasticsearch user.” . I am going to find out how to change the permission on a folder on ubuntu and try that. Unless you think, there is some other problem.
This is what I got:
smc@smc-B325:~ sed -e 's/[#;].*//;/^\s*/d’ “$@” /etc/elasticsearch/*
sed: can’t read /etc/elasticsearch/*: Permission denied

Thank you.

I changed the owner of etc/Elasticsearch search folder to Elasticsearch and changed java heap size to 500mb. One of these two actions resulted in successfully starting the elasticsearch service.
status output looks like:
smc@smc-B325:~$ systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor>
Active: active (running) since Thu 2020-11-19 10:49:17 EST; 1min 37s ago
Docs: http://www.elastic.co
Main PID: 3880 (java)
Tasks: 37 (limit: 4563)
Memory: 696.4M
CGroup: /system.slice/elasticsearch.service
└─3880 /bin/java -Xms500m -Xmx500m -XX:+UseConcMarkSweepGC -XX:CMS>

Nov 19 10:49:17 smc-B325 systemd[1]: Started Elasticsearch.

I still have `While retrieving data for this widget, the following error(s) occurred:

Connection refused (Connection refused).` 

issue though. If you can think of anything else, please let me know. I will continue to debug this.
Thank you.

Hi,
Since I was trying so many different things, finally i commented out:
#Default: 192.168.0.107:9000
#http_publish_uri = http://192.168.0.107:9000

#Default: 192.168.0.107:9000

#http_external_uri = http://192.168.0.107:9000

and changed elasticsearch setting:
Default: http://127.0.0.1:9200
ofc changed elasticsearch.yml network.host to 127.0.0.1

I thank you for taking time and helping me. I appreciate it.
thanks and regards…

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