Невозможно транслировать WebRTC на Red5Pro 5.2.0 - PullRequest
0 голосов
/ 14 апреля 2019

Мы пытаемся использовать трансляцию по умолчанию через веб-страницу WebRTC, которая поставляется с сервером Red5Pro

https://hostname -здесь / жить / broadcast.jsp? Хост = имя хоста-здесь

Клиентские журналы:

[live]:: Publish options:
{
  "protocol": "wss",
  "port": 8083,
  "app": "live",
  "streamMode": "live",
  "mediaElementId": "red5pro-publisher",
  "iceServers": [
    {
      "urls": "stun:stun2.l.google.com:19302"
    }
  ],
  "iceTransport": "udp",
  "bandwidth": {
    "audio": 56,
    "video": 750
  },
  "mediaConstraints": {
    "audio": true,
    "video": {
      "width": {
        "min": 640,
        "max": 640
      },
      "height": {
        "min": 480,
        "max": 480
      },
      "frameRate": {
        "min": 8,
        "max": 24
      }
    }
  },
  "host": "hostname-here",
  "streamName": "teststream2"
}
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.931Z - [red5pro-sdk] debug: (RTCPublisher) [publish]
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.931Z - [red5pro-sdk] debug: (R5ProPublisherSocket) [websocket:setup] wss://hostname-here:8083/live?id=teststream2.
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.932Z - [red5pro-sdk] debug: (R5ProPublisherSocket) [teardown] >>
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.932Z - [red5pro-sdk] debug: (R5ProPublisherSocket) [WebSocket(wss://hostname-here:8083/live?id=teststream2)] close() >>
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.933Z - [red5pro-sdk] debug: (R5ProPublisherSocket) << [WebSocket(wss://hostname-here:8083/live?id=teststream2)] close()
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.933Z - [red5pro-sdk] debug: (R5ProPublisherSocket) << [teardown]
red5pro-sdk.min.js:formatted:255 WebSocket connection to 'wss://hostname-here:8083/live?id=teststream2' failed: Error during WebSocket handshake: Unexpected response code: 400
createWebSocket @ red5pro-sdk.min.js:formatted:255
t.create @ red5pro-sdk.min.js:formatted:1830
value @ red5pro-sdk.min.js:formatted:2196
value @ red5pro-sdk.min.js:formatted:5680
(anonymous) @ r5pro-publisher-failover.js:393
promisify @ r5pro-publisher-failover.js:338
publish @ r5pro-publisher-failover.js:377
(anonymous) @ r5pro-publisher-failover.js:198
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.727Z - [red5pro-sdk] warn: (R5ProPublisherSocket) [websocketerror]: Error from WebSocket. error.
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.728Z - [red5pro-sdk] debug: ([window:orientation]) [removeOrientationChangeHandler]:: onorientationchange removed.
3r5pro-publisher-failover.js:311 [Red5ProPublisher] Connect.Failure.
r5pro-publisher-failover.js:405 [live]:: Error in publish request: [object Event]
(anonymous) @ r5pro-publisher-failover.js:405
Promise.catch (async)
(anonymous) @ r5pro-publisher-failover.js:403
promisify @ r5pro-publisher-failover.js:338
publish @ r5pro-publisher-failover.js:377
(anonymous) @ r5pro-publisher-failover.js:198
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.731Z - [red5pro-sdk] warn: (R5ProPublisherSocket) [websocketclose]: 1006
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.732Z - [red5pro-sdk] debug: (RTCPublisher) RTCPublisher
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.732Z - [red5pro-sdk] debug: (R5ProPublishPeer) [teardown]

Журналы сервера:


[WARN] [NioProcessor-20] org.red5.net.websocket.WebSocketConnection - Closing connection with status: 1002
[WARN] [NioProcessor-20] org.red5.net.websocket.codec.WebSocketDecoder - Handshake failed
org.red5.net.websocket.WebSocketException: Handshake failed, path not enabled
    at org.red5.net.websocket.codec.WebSocketDecoder.parseClientRequest(WebSocketDecoder.java:302)
    at org.red5.net.websocket.codec.WebSocketDecoder.doHandShake(WebSocketDecoder.java:186)
    at org.red5.net.websocket.codec.WebSocketDecoder.doDecode(WebSocketDecoder.java:98)
    at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:180)
    at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:253)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1114)
    at org.apache.mina.filter.ssl.SslHandler.flushScheduledEvents(SslHandler.java:323)
    at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:565)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1114)
    at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:121)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:634)
    at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:539)
    at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$1200(AbstractPollingIoProcessor.java:68)
    at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1242)
    at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1231)
    at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:683)
    at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Сервер Red5Pro имеет действительный сертификат SSL и публичный IP. Версия 5.2.0, порты 8081 и 8083 открыты.

У нас есть библиотеки, упомянутые в этот ответ установлены

1 Ответ

0 голосов
/ 14 апреля 2019

Оказалось, что причиной проблемы было отключение плагина WebRTC.

Не уверен, почему я не сразу понял это.Возможно, меня смутили сообщения в журнале о плагине WebSocket и ошибке WebSocket

[INFO] [main] com.red5pro.license.LicenseManager - addListener: Red5Pro-Clustering
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: com.red5pro.cluster.plugin.ClusterPlugin
[INFO] [main] com.red5pro.license.LicenseManager - addListener: Red5Pro-RTSP-Plugin
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: com.red5pro.rtsp.plugin.RTSPPlugin
[INFO] [main] com.red5pro.activation.ProPluginator - Version - server: RED5/1,0,10,0 pro: 5.2.0.b271-release
[INFO] [main] com.red5pro.activation.ProPluginator - Operating system: Linux version: 4.15.0-1023-azure
[INFO] [main] com.red5pro.activation.ProPluginator - Processor arch: amd64 available: 2
[INFO] [main] com.red5pro.activation.ProPluginator - Memory - free: 190632384 total: 251002880 max: 1626734592
[INFO] [main] com.red5pro.activation.ProPluginator - Starting Red5 Professional, pluginator version 5.2.0.271-RELEASE - b22d2d1 (on: 10.12.2018 09:38)
[INFO] [main] com.red5pro.override.internal.ProvisionResolverService - setting MBR spliterator ~
[INFO] [main] com.red5pro.override.internal.ProvisionResolverService - inspecting prewire
[INFO] [main] com.red5pro.license.LicenseManager - addListener: Red5Pro-SecondScreen-Websockets
[INFO] [main] com.red5pro.activation.ProPluginator - Red5 Professional Activating
[INFO] [main] com.red5pro.activation.ProPluginator - Plugination activation waiting for server to settle...
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: com.red5pro.activation.ProPluginator
[INFO] [main] com.red5pro.license.LicenseManager - addListener: Red5Pro-Cloudstorage
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: com.red5pro.media.storage.CloudstoragePlugin
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: org.red5.net.websocket.WebSocketPlugin
[INFO] [main] com.red5pro.license.LicenseManager - addListener: Red5Pro-AutoScale
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: com.red5pro.clustering.autoscale.AutoScale
[INFO] [main] org.red5.net.websocket.WebSocketTransport - WebSocket (wss) will be bound to [0.0.0.0:8083]

Может быть, это кому-нибудь поможет.

...