How to solve the problem of "Hostname verification of certificate failed. Certificate does not authenticate "

八月 18, 2016 10:08:06 上午 org.jivesoftware.smack.AbstractXMPPConnection callConnectionClosedOnErrorListener

警告: Connection closed with error

java.security.cert.CertificateException: Hostname verification of certificate failed. Certificate does not authenticate 192.168.6.16

at org.jivesoftware.smack.tcp.XMPPTCPConnection.proceedTLSReceived(XMPPTCPConnecti on.java:775)

at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$1000(XMPPTCPConnection.java :140)

at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPC onnection.java:1022)

at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPCon nection.java:956)

at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnecti on.java:971)

at java.lang.Thread.run(Thread.java:745)