Graylog 4.0 connects to elasticsearch via HTTPS

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/jwqfUta8iNp/5Jy6skF2r4VCd4iIHBUDZwip7pb9+VLn/k
U1b6OxODeOJ04w3PNClXo4obkxPGG8yqh1d1bxHazMY3AkC8864P4RRDDXEbxY6T
XW4VGI+o/p7LSdKVnOn54yldKde7ppEiPeQAnHKJgzVc6VhSvs4COXVZXkTKa1nW
S0b+MRIJ2ISWbGre1K3Sn4rSZsPdRIzv9eqc94V3ccunycL0clr6cVoJO6QL3lBX
WYK94QqTfBmS+DOFwTjDeCwjjLGOnEoYG08edFbl4Rtzz5O1+CKKagrTi6VllElR
EgPTIpRWQ9OWvlOxO8RPDcmRBmtsehT39Pf0kIl/3rOO2a+QoFjskKWonCoGpxLx
RRVw5oCm0KEXwUi056TUUlRyGnQ6yitrEm7zP1QkcsiUM7d37jyyZGfoRKwSJguy
GnV4giqxHfv3I83096DkAKFysB4ujgsAV7/fWIe/NGXeg5Wfc73Lpe3XysLxBV/3
bGm9T1QwO1zZlxaWxGln3zyAS1yCGhQLr91IN7ikyL8HO/n5ghc2XWEAyMExpuLw
hhi8A/8CAwEAAaNTMFEwHQYDVR0OBBYEFH1NXsVFApFtFabFxFWuWgFp1c1NMB8G
A1UdIwQYMBaAFH1NXsVFApFtFabFxFWuWgFp1c1NMA8GA1UdEwEB/wQFMAMBAf8w
DQYJKoZIhvcNAQELBQADggIBAC3yiy+ChiHbNZrj7D30BI2zO/IkcPzpNZZC2cSn
wH/60J/O27HjGlKPeEqL3+ge29v3+WrdtrFWZlcmT4et8pNhy+tUhJTvEK2170fg
4tRqomev9q7qwCnU6hLkzc9zi0ZJTn8npbfNCz3xnggGflGMzVkqkbfoeTp0zsHz
mz7h9HNGtnprWJF2VWRXVzx+JKFkax9SdBNRs3Ksgvng2dC11+xYZSkPvGlY2JpO
DWSxWetMT++exJcJcCxSsY/EYc4Lyh1qpZVxHuE7VyGTv8U3UWGbUKCvcOB5xdY+
ZeOfa5Vj3ZyZL8QC0kciTE281kE5e2/ye9rAircsCcmvcszmHaSmqLnxBou9K+F9
15aV7eyUaQXS5VfITDPedFkp+hmTAGqbyHSA+txBgaFRPXAJlFp41zr+FDf2EdpW
W2Ix8NbMCdbFJxUggLiP+gOKMzD5HMtvuDOVASCgNShhZZNw0kPg3nH9G/2QLlMj
9SREM1zOiUlixW5YPEW+EdrqZ9fhxy9ZFIk25e3ibbOdK/u69iDF0kN2KoTaFJ/p
PvdDUd7of6Sk52K0LLeaV404FcAs0QCOojGZvYdjZmdnc6xVBIsw6moM7r4mbdic
JRXzOrZnjjNjN8KiVFiuXm3yzKELIEnu1OpyGry/ovwJjKYYklZiz+UsXLYeYYYv
z1d+
-----END CERTIFICATE-----

@michielp
Hello,
Maybe I can help.

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

Hope that helps

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