I am getting following exception.
2017-08-07 14:05:21,992 ERROR o.e.c.s.Sniffer [pool-3-thread-1] [test- rest] error while sniffing nodes javax.net.ssl.SSLPeerUnverifiedException: Host name 'xx.xx.xx.xx' does not match the certificate subject provided by the peer (EMAILADDRESS=xyz@test.com, CN=abc.test.com, OU=test, O=test, L=test, ST=test, C=test)
at org.apache.http.nio.conn.ssl.SSLIOSessionStrategy.verifySession(SSLIOSessionStrategy.java:208)
at org.apache.http.nio.conn.ssl.SSLIOSessionStrategy$1.verify(SSLIOSessionStrategy.java:188)
at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:368)
at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:509)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:120)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588)
at java.lang.Thread.run(Unknown Source)
I could see in ElasticsearchHostsSniffer in sniffer.jar uses publish_address, which is an IP in my case.
I have certificates installed with host name (abc.test.com) but publish_address coming as IP and I can't generate certificate for IP(xx.xx.xx.xx).
Can someone suggest how to change publish_address and make it host name (abc.test.com) ?