# Graylog 4.0 connects to elasticsearch via HTTPS

**URL:** <https://community.graylog.org/t/graylog-4-0-connects-to-elasticsearch-via-https/19585>\
**Category:** Graylog Central (peer support)\
**Created:** [April 23, 2021, 1:26pm UTC](https://community.graylog.org/t/graylog-4-0-connects-to-elasticsearch-via-https/19585 "2021-04-23T13:26:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![michielp](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@michielp](https://community.graylog.org/u/michielp)\
**Post date:** [April 23, 2021, 1:26pm UTC](https://community.graylog.org/t/graylog-4-0-connects-to-elasticsearch-via-https/19585/1 "2021-04-23T13:26:51Z")

</div>

Hi,

I try to deploy a graylog 4 where the elasticsearch runs on https.

I’m using the same configuration as graylog 3.1.

But when I try to connect to the es server I get error:  
javax.net.ssl.SSLPeerUnverifiedException: Hostname 172.19.0.131 not verified:

In the file /etc/ssl/certs/java/cacerts I have trusted that server.

> root@graylog01:~# keytool -list -keystore /etc/ssl/certs/java/cacerts -storepass XXXX -alias 172.19.0.131  
> 172.19.0.131, Apr 19, 2021, trustedCertEntry,  
> Certificate fingerprint (SHA1): BD:7B:9E:87:AB:22:BC:34:92:70:AE:DF:C8:A9:C7:41:DA:A9:E9:9B

The cert of that server is:

> -----BEGIN CERTIFICATE-----  
> MIIFDzCCAvegAwIBAgIUEY8DReq+pTaDasGSGXL1hMFTn0swDQYJKoZIhvcNAQEL  
> BQAwFzEVMBMGA1UEAwwMMTcyLjE5LjAuMTMxMB4XDTE5MTIxNjExMjgxMloXDTI5  
> MTIxMzExMjgxMlowFzEVMBMGA1UEAwwMMTcyLjE5LjAuMTMxMIICIjANBgkqhkiG  
> 9w0BAQEFAAOCAg8AMIICCgKCAgEAsse/9WWVVCIXdimCWW56+Yv5AkNhF2B4cRRe  
> hLcyTLrdyN6c13ucYp6c203lpTlIubLjgivENZxcLeyYjRNn0XU4nP/b6Msv/TTu  
> 7kgUy3X8yutjgK90d/jwqfU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ye9rAircsCcmvcszmHaSmqLnxBou9K+F9  
> 15aV7eyUaQXS5VfITDPedFkp+hmTAGqbyHSA+txBgaFRPXAJlFp41zr+FDf2EdpW  
> W2Ix8NbMCdbFJxUggLiP+gOKMzD5HMtvuDOVASCgNShhZZNw0kPg3nH9G/2QLlMj  
> 9SREM1zOiUlixW5YPEW+EdrqZ9fhxy9ZFIk25e3ibbOdK/u69iDF0kN2KoTaFJ/p  
> PvdDUd7of6Sk52K0LLeaV404FcAs0QCOojGZvYdjZmdnc6xVBIsw6moM7r4mbdic  
> JRXzOrZnjjNjN8KiVFiuXm3yzKELIEnu1OpyGry/ovwJjKYYklZiz+UsXLYeYYYv  
> z1d+  
> -----END CERTIFICATE-----

---

<div class="post-metadata">

**Author:** ![gsmith](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/gsmith/32/1222_2.png) [@gsmith](https://community.graylog.org/u/gsmith)\
**Post date:** [April 23, 2021, 9:49pm UTC](https://community.graylog.org/t/graylog-4-0-connects-to-elasticsearch-via-https/19585/2 "2021-04-23T21:49:10Z")

</div>

@michielp  
Hello,  
Maybe I can help.

> [@michielp](#):
>
> javax.net.ssl.SSLPeerUnverifiedException: Hostname 172.19.0.131 not verified:

I not sure what you used to make your Certs but the error might be from a couple issues.

Make sure the application has access to the Certs being used. The right certificates were inserted into the Keystore and the application has access to that keystore. The certs were configured incorrectly.  
I have accually received this error before because I inserted the wrong certificate in the keystore.

As for troubleshooting further we need some more information.  
If your unsure you can find more information here

[Details you should always include](https://community.graylog.org/t/community-guidelines/6649#details)

Hope that helps

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [May 7, 2021, 9:49pm UTC](https://community.graylog.org/t/graylog-4-0-connects-to-elasticsearch-via-https/19585/3 "2021-05-07T21:49:19Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
