I created a certificate using "./bin/elasticsearch-certutil cert --ca config/cert/elastic-ca.p12" command( without --dns ), then put it in the /es/config directory.
After that, I created another certificate using "./bin/elasticsearch-certutil cert --ca config/cert/elastic-ca.p12 --dns ", this certificate was used by my application to connect to ES.
Because of the first certificate in /es/config/ directory did not have dns, my application could not connect to ES even though the app's certificate have dns.
My solution is:
Replace the certificate without dns in /es/config/ directory with a new certificate that have dns.
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.