手动源码编译 Jicofo 启动报错 unable to find valid certification path to requested target

WebRTC中文社区是一个为大家解决在使用WebRTC当中遇到问题所建立的社区,欢迎更多学习和使用WebRTC的人加入进来,一起建设。

完整报错如下:
Jicofo 2020-08-07 09:19:09.896 SEVERE: [16] org.jitsi.impl.protocol.xmpp.XmppProtocolProvider.log() Failed to connect/login: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
org.jivesoftware.smack.SmackException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.jivesoftware.smack.tcp.XMPPTCPConnection P a c k e t R e a d e r . p a r s e P a c k e t s ( X M P P T C P C o n n e c t i o n . j a v a : 1076 ) a t o r g . j i v e s o f t w a r e . s m a c k . t c p . X M P P T C P C o n n e c t i o n PacketReader.parsePackets(XMPPTCPConnection.java:1076) at org.jivesoftware.smack.tcp.XMPPTCPConnection PacketReader.parsePackets(XMPPTCPConnection.java:1076)atorg.jivesoftware.smack.tcp.XMPPTCPConnectionPacketReader.access 300 ( X M P P T C P C o n n e c t i o n . j a v a : 1000 ) a t o r g . j i v e s o f t w a r e . s m a c k . t c p . X M P P T C P C o n n e c t i o n 300(XMPPTCPConnection.java:1000) at org.jivesoftware.smack.tcp.XMPPTCPConnection 300(XMPPTCPConnection.java:1000)atorg.jivesoftware.smack.tcp.XMPPTCPConnectionPacketReader 1. r u n ( X M P P T C P C o n n e c t i o n . j a v a : 1016 ) a t j a v a . l a n g . T h r e a d . r u n ( T h r e a d . j a v a : 748 ) C a u s e d b y : j a v a x . n e t . s s l . S S L H a n d s h a k e E x c e p t i o n : P K I X p a t h b u i l d i n g f a i l e d : s u n . s e c u r i t y . p r o v i d e r . c e r t p a t h . S u n C e r t P a t h B u i l d e r E x c e p t i o n : u n a b l e t o f i n d v a l i d c e r t i f i c a t i o n p a t h t o r e q u e s t e d t a r g e t a t s u n . s e c u r i t y . s s l . A l e r t . c r e a t e S S L E x c e p t i o n ( A l e r t . j a v a : 131 ) a t s u n . s e c u r i t y . s s l . T r a n s p o r t C o n t e x t . f a t a l ( T r a n s p o r t C o n t e x t . j a v a : 327 ) a t s u n . s e c u r i t y . s s l . T r a n s p o r t C o n t e x t . f a t a l ( T r a n s p o r t C o n t e x t . j a v a : 270 ) a t s u n . s e c u r i t y . s s l . T r a n s p o r t C o n t e x t . f a t a l ( T r a n s p o r t C o n t e x t . j a v a : 265 ) a t s u n . s e c u r i t y . s s l . C e r t i f i c a t e M e s s a g e 1.run(XMPPTCPConnection.java:1016) at java.lang.Thread.run(Thread.java:748) Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alert.createSSLException(Alert.java:131) at sun.security.ssl.TransportContext.fatal(TransportContext.java:327) at sun.security.ssl.TransportContext.fatal(TransportContext.java:270) at sun.security.ssl.TransportContext.fatal(TransportContext.java:265) at sun.security.ssl.CertificateMessage 1.run(XMPPTCPConnection.java:1016)atjava.lang.Thread.run(Thread.java:748)Causedby:javax.net.ssl.SSLHandshakeException:PKIXpathbuildingfailed:sun.security.provider.certpath.SunCertPathBuilderException:unabletofindvalidcertificationpathtorequestedtargetatsun.security.ssl.Alert.createSSLException(Alert.java:131)atsun.security.ssl.TransportContext.fatal(TransportContext.java:327)atsun.security.ssl.TransportContext.fatal(TransportContext.java:270)atsun.security.ssl.TransportContext.fatal(TransportContext.java:265)atsun.security.ssl.CertificateMessageT12CertificateConsumer.checkServerCerts(CertificateMessage.java:646)
at sun.security.ssl.CertificateMessage T 12 C e r t i f i c a t e C o n s u m e r . o n C e r t i f i c a t e ( C e r t i f i c a t e M e s s a g e . j a v a : 465 ) a t s u n . s e c u r i t y . s s l . C e r t i f i c a t e M e s s a g e T12CertificateConsumer.onCertificate(CertificateMessage.java:465) at sun.security.ssl.CertificateMessage T12CertificateConsumer.onCertificate(CertificateMessage.java:465)atsun.security.ssl.CertificateMessageT12CertificateConsumer.consume(CertificateMessage.java:361)
at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:376)
at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:451)
at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:428)
at sun.security.ssl.TransportContext.dispatch(TransportContext.java:184)
at sun.security.ssl.SSLTransport.decode(SSLTransport.java:154)
at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1198)
at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1107)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:400)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:372)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.proceedTLSReceived(XMPPTCPConnection.java:810)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.access 1200 ( X M P P T C P C o n n e c t i o n . j a v a : 151 ) a t o r g . j i v e s o f t w a r e . s m a c k . t c p . X M P P T C P C o n n e c t i o n 1200(XMPPTCPConnection.java:151) at org.jivesoftware.smack.tcp.XMPPTCPConnection 1200(XMPPTCPConnection.java:151)atorg.jivesoftware.smack.tcp.XMPPTCPConnectionPacketReader.parsePackets(XMPPTCPConnection.java:1071)
… 3 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)
at sun.security.validator.Validator.validate(Validator.java:271)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:312)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:128)
at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:630)
… 17 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434)
… 23 more

在/etc/jitsi/jicofo/sip-communicator.properties中添加org.jitsi.jicofo.ALWAYS_TRUST_MODE_ENABLED=true
在重启jicofo

已解决:我的是手动根据源码编译安装的,在~/.sip-communicator/sip-communicator.properties
这个文件(没有这个文件可以手动创建这个文件)里添加 org.jitsi.jicofo.ALWAYS_TRUST_MODE_ENABLED=true 。

在这里插入图片描述

你可能感兴趣的:(WebRTC,jitsi,prosody)