【问题标题】:Ant media webrtc connecting to server gives java.security.cert.CertPathValidatorException连接到服务器的蚂蚁媒体 webrtc 给出 java.security.cert.CertPathValidatorException
【发布时间】:2021-02-08 04:59:19
【问题描述】:

我正在尝试连接到 Ant media webrtc 服务器wss://abcd.com:1234/demoApp/websocket。但是它总是抛出。

de.tavendo.autobahn.WebSocketReader: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
de.tavendo.autobahn.WebSocketWriter: Socket is closed

我正在使用 ant media webrtc 框架示例 android 示例并更改 URL。它在 antmedia 的测试服务器上运行良好

wss://test.antmedia.io:5443/demo1234/websocket(URL changed for security purposes)

但是我始终无法连接到主服务器。这是我用来连接服务器的android代码。

webRTCClient = WebRTCClient(this@LiveSessionActivity, this)
webRTCClient.setVideoRenderers(mLiveSessionBinding?.pipViewRenderer, mLiveSessionBinding?.localGLSurfaceView)
webRTCClient.init(ANT_MEDIA_URL, mLiveSessionViewModel?.streamKey, IWebRTCClient.MODE_PUBLISH, "null", intent)

非常感谢任何帮助。谢谢!

【问题讨论】:

    标签: android webrtc ant-media-server webrtc-android


    【解决方案1】:

    这是 v2.2.1 中的已知问题。您需要将chain.pem 文件设置为Ant Media Server。以下是说明:

    将chain.pem复制到conf。

    sudo cp /etc/letsencrypt/live/your_domain/chain.pem /usr/local/antmedia/conf
    

    PS:请将 your_domain 更改为您的域名地址。

    1- 添加这一行

    http.ssl_certificate_chain_file=conf/chain.pem
    

    之后

    http.ssl_certificate_file=conf/fullchain.pem
    

    /usr/local/antmedia/conf/red5.properties 文件中。

    2- 添加这一行

    <entry key="SSLCertificateChainFile" value="${http.ssl_certificate_chain_file}" />
    

    之后

    <entry key="SSLCertificateFile" value="${http.ssl_certificate_file}" /> 
    

    /usr/local/antmedia/conf/jee-container.xml 文件中

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-26
      • 2020-08-19
      • 2021-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多