You are not logged in.

#1 2025-04-22 15:29:50

HossamMaghrabi
Member
Registered: 2024-04-26
Posts: 31

Error in running Elasticsearch after installation[resolved]

Hello,

During the installation of Elasticsearch, I got a "Permission denied" error message when I was trying the

 [admin@archlinux etc]$ elasticsearch-keystore create 

command in the running step https://wiki.archlinux.org/title/Elasticsearch#Running.

Following is the command and Error Message.

[admin@archlinux etc]$ elasticsearch-keystore create
warning: ignoring JAVA_HOME=/usr/lib/jvm/default-runtime; using bundled JDK
/usr/bin/elasticsearch-env: line 93: cd: /usr/share/elasticsearch/config: Permission denied

ERROR: unable to create temporary keystore at [/srv/http/magento2/app/etc/elasticsearch.keystore.tmp], write permissions required for [/srv/http/magento2/app/etc] or run [elasticsearch-keystore upgrade], with exit cod

Regards..

Last edited by HossamMaghrabi (2025-04-30 13:27:13)

Offline

#2 2025-04-26 15:10:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,384

Re: Error in running Elasticsearch after installation[resolved]

From the link you provided, the command is preceded by a '#'.  That is the default shell prompt for the root user.   Throughout the Arch Linux site (and most other Linux sites), that notation is used to indicate you must execute the command as root.

If you have setup 'sudo' for your user, you could run 'sudo elasticsearch-keystore create'. Alternatively, you can use the command 'su' to change to the root user if you know the root password.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2025-04-26 16:17:31

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,746
Website

Re: Error in running Elasticsearch after installation[resolved]

Mod note: moving to AUR Issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2025-04-26 20:23:54

HossamMaghrabi
Member
Registered: 2024-04-26
Posts: 31

Re: Error in running Elasticsearch after installation[resolved]

Thanks ewaller

When I moved to next step and run

curl http://127.0.0.1:9200

command, I got the below error message.

 
[root@archlinux config]# curl http://127.0.0.1:9200
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\", charset=\"UTF-8\"","ApiKey"]}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\", charset=\"UTF-8\"","ApiKey"]}},"status":401}

Last edited by HossamMaghrabi (2025-04-26 20:24:41)

Offline

#5 2025-04-28 11:25:41

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,628

Re: Error in running Elasticsearch after installation[resolved]

You have looked at https://www.elastic.co/docs/deploy-mana … c-security ?

(archwiki links to https://www.elastic.co/guide/en/elastic … setup.html , but that document may be out of date and links the above one)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2025-04-29 15:35:51

HossamMaghrabi
Member
Registered: 2024-04-26
Posts: 31

Re: Error in running Elasticsearch after installation[resolved]

Hello Lone_Wolf
Regrettably, I attempted to utilize the links you provided, but the issue remains unresolved. Could you please connect me with the team who created the Elasticsearch installation document on Arch Wiki?

Regard

Offline

#7 2025-04-30 10:07:22

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,628

Re: Error in running Elasticsearch after installation[resolved]

Arch wiki pages are created and maintained by individuals in their spare time, you can see who worked on a page in the page history.

https://wiki.archlinux.org/index.php?ti … on=history shows only minor changes since january 2023.

Your best chance to get in contact with archlinux people actively using elasticsearch probably is adding a comment to its aur page.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#8 2025-04-30 13:25:30

HossamMaghrabi
Member
Registered: 2024-04-26
Posts: 31

Re: Error in running Elasticsearch after installation[resolved]

Thanks Lone_Wolf.

The issue has been resolved after adding this line

 xpack.security.enabled: false 

into the /etc/elasticsearch/elasticsearch.yml file to turn off Magento security features.

Regard

Offline

Board footer

Powered by FluxBB