Hello there,
I have installed Elasticsearch trough the apt on my vps ubuntu 20.04, i just followed the installation guide from here : Install Elasticsearch with Debian Package | Elasticsearch Guide [7.17] | Elastic
I checked all was running with "curl myip:9200", it returned that all was working fine...
But a few time later, my service wouldn't start normally... i tried to do so many things by searching a solution on the web...
It's the first time i use Elasticsearch but i need it to install magento 2 so i hope someone can help me pls !
There is my error i got on the status :
Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them
@Arkoos62 Welcome to the community!
What @rugenl is saying is the error in that last screen shot (and please do not use screen shots) Indicates a bind error... like the address is already take or can not bind
Thanks mate
Sorry for the screen i didn't know...
I understand where the problem is coming from but i don't understand what am i supposed to bind in my config file
my vps is hosted by micisoft azure and they gave me a public ip adress and in the config file i binded this adress at "network.host"
but it failed to start with this config...
but when i bind my localhost adress it's working so i'm lost pls explain me
thanks for all mates
Well I am not an expert on azure but in GCP you bind to the internal NIC / Address .. that Internal Address is then in turn bound to the external address by GCP networking... then I can access Elasticsearch via the external address.
and I can bind to _ens4_ the network interface name ... see Here
I suspect Azure works similar
Did you try to access it from the external address? This is most likely more an Azure thing than an Elasticsearch thing.
Also incase anyone else has not said it ... do not bind your Elasticsearch / Kibana to and external IP unless you have enabled security (Auth / Auth and SSL)
well, i'm not an expert of network but i think azure is similar yes, when i run ifconfig i have the same adress on inet line as my private adress configured on azure panel
then i have a second paragraph always in ifconfig that show my localhost adress on inet line
sry mate but i was a bad student in networking course and i don't know what i have to bind so in my config (for me it's not "ens4" but "eth0")
i tried to bind my external adress in network.host and the service cannot start
can you explain your last sentence pls ?
Elasticsearch, and any other service, only can bind to IP address that are available on the host, which is not your case.
Normally on cloud provider when you get an external IP address, this IP address will be associated to your instance, but will not be available directly to the host, so, for the operating system this IP address does not exists.
What happens is that when the cloud provider receives a connection on the external IP address associated to your instance, it will redirect the connection to the private IP address of your instance and is on that private IP address that you should bind Elasticsearch or other services.
Try to change your network.host configuration to use your private IP address or _eth0_, both should have the same effect.
Also, as @stephenb already said, do not expose your Elasticsearch instance without having enabled the security features.
Yes i tried it works but i didn't know if this could work proprely with this binding
If it works samely so i agree with you
i'm so dumb, is it serious ?
I have an other question...
when i run curl to check if Elasticsearch is working proprely, i can't run it with my external ip adress, is it normal ?
(it works when i run curl with my private adress which is binded in my config yml)
You need to check it in the Magento documentation, but elasticsearch probably doesn't need to accessible to any external client, just for the Magento.
Also, if you can't access using your external IP Address, you should check your network configurations to see the access rules, this is a cloud/network issue, not an elasticsearch issue.
Ok thanks i will ask to a magento dev or it's mb write somewhere in the doc
I think i can but you alert me that it's maybe dangerous to bind it without the security features, i was asking what i have to do to secure my elasticsearch instance
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.