高级版音视频无法接起

海草集后端 11月前 310

查看imserver的error log,如下:

2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:114) - An unexpected exception was caught while processing MQTT message. Closing Netty channel. CId=2f03f61b-235a-47e1-9d2a-76e7026918c91701855658352, cause=null, errorMessage=Connection reset by peer
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - sun.nio.ch.FileDispatcherImpl.read0(Native Method)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - sun.nio.ch.IOUtil.read(IOUtil.java:192)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
2023-12-08 18:10:58,092 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
2023-12-08 18:10:58,093 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
2023-12-08 18:10:58,093 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
2023-12-08 18:10:58,093 ERROR [n-n-worker2] (NettyMQTTHandler.java:117) - java.lang.Thread.run(Thread.java:745)
最新回复 (8)
  • x86 11月前
    引用 2
    跟这个没关系,需要看下 Android 或者 iOS 日志
  • 海草集后端 11月前
    引用 3

    janus按照文档使用docker方式启动

    ---------------------------------------------------
      Starting Meetecho Janus (WebRTC Server) v1.0.3
    ---------------------------------------------------
    
    Checking command line arguments...
    Debug/log level is 4
    Debug/log timestamps are enabled
    Debug/log colors are enabled
    [Fri Dec  8 10:39:01 2023] Adding 'vmnet' to the ICE ignore list...
    [Fri Dec  8 10:39:01 2023] Adding 'docker' to the ICE ignore list...
    [Fri Dec  8 10:39:01 2023] Using 172.17.我们的内网IP as local IP...
    [Fri Dec  8 10:39:01 2023] Token based authentication disabled
    [Fri Dec  8 10:39:01 2023] Initializing recorder code
    [Fri Dec  8 10:39:01 2023]   -- Using temporary extension .tmp
    [Fri Dec  8 10:39:01 2023] RTP port range: 20000 -- 40000
    [Fri Dec  8 10:39:01 2023] Using nat_1_1_mapping for public IP: 我们的外网IP
    [Fri Dec  8 10:39:01 2023] Initializing ICE stuff (Lite mode, ICE-TCP candidates disabled, half-trickle, IPv6 support disabled)
    [Fri Dec  8 10:39:01 2023] ICE port range: 20000-40000
    [Fri Dec  8 10:39:01 2023] Crypto: OpenSSL >= 1.1.0
    [Fri Dec  8 10:39:01 2023] No cert/key specified, autogenerating some...
    [Fri Dec  8 10:39:01 2023] Fingerprint of our certificate: 32:A3:A9:6A:C4:27:AB:53:0C:9B:E4:0F:43:FF:2C:69:DA:30:A4:CC:DE:B0:3C:61:6F:DD:93:96:C9:29:47:37
    [Fri Dec  8 10:39:01 2023] [WARN] Data Channels support not compiled
    [Fri Dec  8 10:39:01 2023] Event handlers support disabled
    [Fri Dec  8 10:39:01 2023] Plugins folder: /var/janus/janus/lib/janus/plugins
    [Fri Dec  8 10:39:01 2023] Loading plugin 'libjanus_recordplay.so'...
    [Fri Dec  8 10:39:01 2023] JANUS Record&Play plugin initialized!
    [Fri Dec  8 10:39:01 2023] Loading plugin 'libjanus_videoroom.so'...
    [Fri Dec  8 10:39:01 2023] VideoRoom will use alphanumeric IDs, not numeric
    [Fri Dec  8 10:39:01 2023] [WARN] IPv6 disabled, will only create VideoRoom forwarders to IPv4 addresses
    [Fri Dec  8 10:39:01 2023] JANUS VideoRoom plugin initialized!
    [Fri Dec  8 10:39:01 2023] Transport plugins folder: /var/janus/janus/lib/janus/transports
    [Fri Dec  8 10:39:01 2023] Loading transport plugin 'libjanus_pfunix.so'...
    [Fri Dec  8 10:39:01 2023] Sessions watchdog started
    [Fri Dec  8 10:39:01 2023] Joining Janus requests handler thread
    [Fri Dec  8 10:39:01 2023] [WARN] No Unix Sockets server started, giving up...
    [Fri Dec  8 10:39:01 2023] [WARN] The 'janus.transport.pfunix' plugin could not be initialized
    [Fri Dec  8 10:39:01 2023] Loading transport plugin 'libjanus_mqtt.so'...
    debug: before first read
    debug: after a read
    debug: after last read
    receive msg is HTTP/1.1 200 OK
    content-type: application/json;charset=utf-8
    content-encoding: utf-8
    content-length: 14
    
    127.0.0.1:1883
    receive content is 127.0.0.1:1883
    HTTP/1.1 200 OK
    content-type: application/json;charset=utf-8
    content-encoding: utf-8
    content-length: 14
    
    127.0.0.1:1883[Fri Dec  8 10:39:01 2023] MQTT SSL support disabled
    [Fri Dec  8 10:39:01 2023] Connected to MQTT broker: automatic reconnect
    [Fri Dec  8 10:39:01 2023] Subscribing to MQTT topic to-janus
    [Fri Dec  8 10:39:01 2023] MQTT client has been successfully subscribed to MQTT topic: to-janus
  • 海草集后端 11月前
    引用 4
    跟推送服务有关系吗
  • x86 11月前
    引用 5
    没关系,高级版音视频只和专业版im-server,janus,客户端的高级版音视频sdk有关
  • 海草集后端 11月前
    引用 6

    帮忙分析下,janus服务的日志,这是哪里配置的有问题吗

    127.0.0.1:1883[Sat Dec  9 07:18:26 2023] MQTT SSL support disabled
    [Sat Dec  9 07:18:26 2023] Connected to MQTT broker: automatic reconnect
    [Sat Dec  9 07:18:26 2023] Subscribing to MQTT topic to-janus
    [Sat Dec  9 07:18:26 2023] MQTT client has been successfully subscribed to MQTT topic: to-janus
    [Sat Dec  9 07:18:58 2023] Creating new session: 4741035318135677; 0x7f91880018e0
    [Sat Dec  9 07:18:58 2023] Creating new handle in session 4741035318135677: 1848268790921863; 0x7f91880018e0 0x7f9188002420
    [Sat Dec  9 07:19:00 2023] Creating new session: 1233092740209787; 0x7f9188002010
    [Sat Dec  9 07:19:00 2023] Creating new handle in session 1233092740209787: 3118794190720945; 0x7f9188002010 0x7f91880067e0
    [Sat Dec  9 07:19:00 2023] [3118794190720945] Creating ICE agent (ICE Lite mode, controlled)
    [Sat Dec  9 07:19:01 2023] [1848268790921863] Creating ICE agent (ICE Lite mode, controlled)
    [Sat Dec  9 07:19:08 2023] [WARN] [3118794190720945] ICE failed for component 1 in stream 1, but let's give it some time... (trickle pending, answer received, alert not set)
    [Sat Dec  9 07:19:08 2023] [WARN] [1848268790921863] ICE failed for component 1 in stream 1, but let's give it some time... (trickle pending, answer received, alert not set)
    [Sat Dec  9 07:19:13 2023] [WARN] [3118794190720945] ICE failed for component 1 in stream 1, but we're still waiting for some info so we don't care... (trickle pending, answer received, alert not set)
    [Sat Dec  9 07:19:13 2023] [WARN] [1848268790921863] ICE failed for component 1 in stream 1, but we're still waiting for some info so we don't care... (trickle pending, answer received, alert not set)
    [Sat Dec  9 07:1
    
        [Sat Dec  9 07:19:22 2023] [WARN] [3118794190720945] ICE failed for component 1 in stream 1, but we're still waiting for some info so we don't care... (trickle pending, answer received, alert not set)
    [Sat Dec  9 07:19:23 2023] [WARN] [1848268790921863] ICE failed for component 1 in stream 1, but we're still waiting for some info so we don't care... (trickle pending, answer received, alert not set)
    [Sat Dec  9 07:19:23 2023] [ERR] [ice.c:janus_ice_check_failed:1963] [3118794190720945] ICE failed for component 1 in stream 1...
    [Sat Dec  9 07:19:23 2023] [janus.plugin.videoroom-0x7f9170003370] No WebRTC media anymore; 0x7f91880067e0 0x7f9188006920
    [Sat Dec  9 07:19:23 2023] [3118794190720945] WebRTC resources freed; 0x7f91880067e0 0x7f9188002010
    [Sat Dec  9 07:19:23 2023] [ERR] [ice.c:janus_ice_check_failed:1963] [1848268790921863] ICE failed for component 1 in stream 1...
    [Sat Dec  9 07:19:23 2023] [janus.plugin.videoroom-0x7f91700014e0] No WebRTC media anymore; 0x7f9188002420 0x7f9188002140
    [Sat Dec  9 07:19:23 2023] [1848268790921863] WebRTC resources freed; 0x7f9188002420 0x7f91880018e0
    ^C
  • HeavyRain 11月前
    引用 7
    能看到ICE错误,可能的问题:
    1,docker启动时的参数 docker_ip需要是服务器的公网IP
    2,janus服务配置中指定端口范围默认是20000-40000,需要开放这些UDP端口
  • HeavyRain 11月前
    引用 8
    如果上面解决不了问题,可以看一下janus服务上的说明,如果还是解决不了,请把IM服务日志改成同步的(修改方法 https://docs.wildfirechat.cn/faq/server.html 问题43),然后把日志发给 support@wildfirechat.cn
  • x86 11月前
    引用 9

    更新

    问题的最终原因是:内部还有防火墙,没开udp端口

    可以参考这儿检查 udp 端口的连通性

返回