Hi Miki,
Something might be wrong in your configuration files or service files.
Let’s see more details about your deployment:
elasticsearchjournalctl -u elasticsearch > /tmp/output.txt && cat /tmp/output.txt
tail -80 /var/log/elasticsearch/<elasticsearch|cluster-name>.log
cat /etc/elasticsearch/elasticsearch.yml
That’s all, once we can review the above commands we can continue helping you properly.
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/e39efc08-c776-401e-9571-3438781e1406%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Best Regards
Hi Miki,
I think it’s related to bootstrap.memory_lock: true, can you temporary comment/remove that line from
your elasticsearch.yml and restart the service?
If the node starts properly removing that line then we can restore it and review all other steps needed for that setting,
but in the first place, I want to discard any error related to that setting.
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/95508e8d-2bfb-490f-9190-d7cecece07be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Miki,
I think now that the OOM (out of memory) killer of Linux is killing your service, can we check system logs?
grep -iR 'killed process' /var/log
This command is also helpful here:
free -h
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/d51f324d-2191-4219-aa0b-6de2e2b6b07e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello again Miki,
Let’s hardcode the ulimit value for open files:
ulimit -n 65536
echo "* soft nofile 65536" >> /etc/security/limits.conf
echo "* hard nofile 65536" >> /etc/security/limits.conf
Now, restart the service, and look again for the logs:
systemctl daemon-reload
systemctl restart elasticsearch
Leave a CLI opened using this command:
tail -f /var/log/elasticsearch/elasticsearch.log
On the other hand, just some more questions:
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/9251d3bf-1805-4102-b8fe-3a8e07a9368b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/9251d3bf-1805-4102-b8fe-3a8e07a9368b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Miki,
Pretty weird, we are not looking at the right place I think.
The service is being killed but I don’t know who and why yet.
Add this line to your logging settings:
echo 'rootLogger.level = debug' >> /etc/elasticsearch/log4j2.properties
Now restart Elasticsearch.
Now if you can send me a file with the content of at least 200 lines of your Elasticsearch log it would be helpful.
With the above modification the log file will be more verbose, so please after your node is crashed again, execute the next command:
tail -200 /var/log/elasticsearch/elasticsearch.log > /tmp/output.txt
Then, send me the /tmp/output.txt content or the file so I can look for other technical logs that may help here.
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/2fef093c-7515-42b4-adee-a9bcc82ef3b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Miki,
Still not clear, it just says something/someone killed the service with no reason.
I’ve also tried with your exact configuration with no luck… (it worked for me).
Please, give us the output from the next command (/tmp/filtered.txt content):
journalctl -xb > /tmp/output-journal.txt
cat /tmp/output-journal.txt | grep -i -E "score|kill|elasticsearch" > /tmp/filtered.txt
rm -f /tmp/output-journal.txt
Please, send us the content of /tmp/filtered.txt, it may show something about the service killer.
Best regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/f2e29794-68e2-4378-95b9-d1a56ed09af3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello again Miki,
I’m still thinking about your problem, I could not reproduce your issue even using the same configuration.
Please, can you edit the Elasticsearch service? just for debug purposes.
Execute this:
systemctl edit elasticsearch
Add this content, then save and exit:
[Service]
LimitMEMLOCK=infinity
Now, please reload the service:
systemctl daemon-reload
systemctl restart elasticsearch
Also, paste the output of the next command just after restarting Elasticsearch and before it dies, please:
ps aux | grep java
So we can check how Elasticsearch is launched (the java command line being used).
Sorry about having too many questions but I could not reproduce the issue and its reason is not clear at all.
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/51aa92fb-c9f5-414d-88a2-8f520e2912a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Miki,
Sorry if I’m being repetitive, but I need to confirm some steps from our previous messages:
Regards,
Jesús

--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/cc1c2280-78e1-4b36-ae03-4c24a756955e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello again Miki,
After some messages with no results, please let me know about the next details so we can build an environment like yours. We’ve already done it, but we may differ at some steps.
// RPM based
rpm -qa elasticsearch
// Deb based
dpkg -l elasticsearch
cat /etc/os-release
ls -lh /etc/elasticsearch
ls -lh /usr/share/elasticsearch
ls -lh /var/lib/elasticsearch
ls -lh /tmp
df -h
lscpu
Thanks for your patience.
On the other hand, if you did the logger modifications, is there any debug log in /var/log/elasticsearch/<elasticfile>.log? they should include [DEBUG] in the logline.
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/0e2b9ce5-cc86-47e8-95e2-11d9e31b9117%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Miki,
From your latest logs I can see maybe these locations are not writable.
Can we try to force the user and group for Elasticsearch related files?
chown elasticsearch:elasticsearch -R /usr/share/elasticsearch
chown elasticsearch:elasticsearch -R /etc/elasticsearch
chown elasticsearch:elasticsearch -R /var/lib/elasticsearch
Restart the service:
systemctl restart elasticsearch
Let’s see again if it works or not.
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/b8e27cc7-0df3-4fe8-b60f-76c4e43f02a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello again Miki,
Is it possible that you have an orphan Java process running?
Since Elasticsearch uses the port 9200, let’s check if there is any other process using it:
netstat -nlp | grep 9200
Example output:
tcp6 0 0 172.16.1.2:9200 :::* LISTEN 3002/java
If that’s the case, kill it:
kill -9 3002 // using 3002 as the PID from my last output
In addition, and since your node is crashed, the next command should show nothing:
ps aux | grep 'elastic'
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/5e4abc40-1d0d-4358-8952-9d7137a4c108%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Mike,
Since you have two instances, can you share with us your elasticsearch.yml for both instances? (I've only seen one of them)
Also, the logs for that second instance would be useful.
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/32c4a0e3-a5b5-41b8-8043-52d60998135e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello again Miki,
At this point, I think your node.lock is corrupted.
Since it’s safe to delete it under certain situations like yours, let’s delete it please:
rm -f /var/lib/elasticsearch/nodes/0/node.lock
Now, restart Elasticsearch:
systemctl restart elasticsearch
If it’s still failing, please paste the logs of Elasticsearch from the restart until it crashed so we can check if the deletion took effect.
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/e946a6d7-51ca-4949-8a7b-f7abaa21eb17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/e3badb63-1fa5-40b2-b0c7-0d9564d96e8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Miki,
Same logs always, the logs under /var/log/elasticsearch/<clustername|elasticsearch>.log, otherwise, I can’t see our progress
in every modification/change we did.
Sorry about being frustrating but it’s the very first time I’ve seen this situation, it’s pretty weird.
Regards,
Jesús
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/80613d35-ee32-4258-845f-2d5b867632c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
proxy_pass http://localhost:5601/;--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/0674ff9f-803c-4c2a-92a1-85c849a7e1f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello SS
Sorry for the late response. I recommend you open a new thread always help with a non-related issue to this thread.
[2020-05-29T12:58:55,551][ERROR][o.e.g.GatewayMetaState ] [wazuh-node-1] failed to read or upgrade local state, exiting...
org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read /home/wazuh3/elasticsearch-7.5.1/data/nodes/0/_state/manifest-12290.st
This message usually means that there is a reading file problem due to wrong permissions, no data in the mentioned folder, corrupted data… etc. Could you please verify that your /home/wazuh3/elasticsearch-7.5.1/ folder is correct? Can you please share your elasticsearch.yml configuration file?
Best regards,
Alberto R