We have been using Elasticsearch with Zammad on an Ubuntu server for several months, and we recently moved the server to a new IP address. Because Elasticsearch was set up with the former IP address, the auto-generated SSL Certificate, "/etc/elasticsearch/certs/http_ca.crt", is not working with the new IP address. Specifically, it gives an error that the IP address does not match the one in the certificate.
We were wondering if there was a command to use that would regenerate this SSL Certificate based on the current IP settings? I tried using the
bin/elasticsearch-certutil
command but when I do that it says that there is "no such file or directory". I am unable to use that command, and based on my reading of the webpage:
I do not know if that would solve our issue as we are not trying to create a new Certificate Authority or a whole new set of certificates and keys, just the one that was generated on setup.
Please let me know if there is any more information that you would need to get a better idea of our situation, and thank you in advance for your help.
Thank you for linking that post. The situation is very similar, however we have not used the cert utility at all yet, we have only used the auto-generated SSL certificate. I tried using the
bin/elasticsearch-certutil
from the home directory. Sorry, I haven't used commands with 'bin' at the beginning before, should I run that from the /etc/elasticsearch directory?
We installed by following the instructions here:
Using the apt repository. I did not set up additional nodes as we only have the one server running Elastic Search.
For the certutil command page, would the certificate I want to regenerate be an "HTTP" certificate? There doesn't seem to be anything there about the default http_ca.crt or how to get it to regenerate, but if creating a new one is the way to go then I would definitely try that if I can get the command to work.
---
Hope this helps anyone facing the same issue!
If you're using Docker or Elastic Cloud, the steps are slightly different — happy to help if needed.
—
*Contributed by [Rafael Silva](https://www.linkedin.com/in/rafael-silva-observabilidade/), Observability Specialist & Elastic Enthusiast*
[GitHub: @rafasilva1984](https://github.com/rafasilva1984
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.