как настроить ssl для red5 pro - PullRequest
0 голосов
/ 14 июля 2020

Я настроил файл хранилища ключей и файл доверенного хранилища в red5pro.properties, а также изменил настройку https в jee-контейнере. xml но я получаю какое-то исключение и не могу получить доступ к серверу red5pro. если я использую без https, он работает, но не работает с https. помогите мне решить эту проблему.

# red5pro.properties

# Socket policy
policy.host=0.0.0.0
policy.port=843

# HTTP
http.host=0.0.0.0
http.port=80
https.port=443
http.URIEncoding=UTF-8
http.max_headers_size=8192
http.max_keep_alive_requests=-1
http.max_threads=20
http.acceptor_thread_count=10
http.processor_cache=20

# RTMP
rtmp.host=0.0.0.0
rtmp.port=1935
rtmp.io_threads=8
rtmp.send_buffer_size=65536
rtmp.receive_buffer_size=65536
rtmp.ping_interval=1000
rtmp.max_inactivity=60000
rtmp.max_handshake_time=7000
rtmp.tcp_nodelay=true
rtmp.tcp_keepalive=false
rtmp.default_server_bandwidth=10000000
rtmp.default_client_bandwidth=10000000
rtmp.client_bandwidth_limit_type=2
rtmp.bandwidth_detection=false
rtmp.encoder_base_tolerance=5000
rtmp.encoder_drop_live_future=false
# traffic optimization hinting. to disable set traffic class set to -1
# low delay + high throughput == 24 (0x18)
rtmp.traffic_class=-1
# requested maximum length of the queue of incoming connections
rtmp.backlog=32
# the interval (seconds) between each throughput calculation
rtmp.thoughput_calc_interval=15
# enable use of the default mina acceptor
rtmp.default_acceptor=true
# socket i/o pool sizes used when default acceptor is disabled
rtmp.initial_pool_size=0
rtmp.max_pool_size=2
rtmp.max_processor_pool_size=8
rtmp.executor_keepalive_time=60000
mina.logfilter.enable=false
# scheduler configs (per application)
rtmp.scheduler.pool_size=8
rtmp.deadlockguard.sheduler.pool_size=8
# message executor configs (per application) - adjust these as needed if you get tasks rejected
rtmp.executor.core_pool_size=4
rtmp.executor.max_pool_size=32
rtmp.executor.queue_capacity=64
# drop audio packets when queue is almost full, to disable this, set to 0
rtmp.executor.queue_size_to_drop_audio_packets=60
# maximum amount of time allotted to process a single rtmp message / packet in milliseconds, set it             
as 0 to disable timeout
rtmp.max_handling_time=2000
# connection tweaks - dont modify unless you know what you're doing
rtmp.channel.initial.capacity=3
rtmp.channel.concurrency.level=1
rtmp.stream.initial.capacity=1
rtmp.stream.concurrency.level=1
rtmp.pending.calls.initial.capacity=3
rtmp.pending.calls.concurrency.level=1
rtmp.reserved.streams.initial.capacity=1
rtmp.reserved.streams.concurrency.level=1
# maximum packet size allowed in bytes
rtmp.max_packet_size=3145728

ws.host=0.0.0.0
ws.port=8081
wss.host=0.0.0.0
wss.port=8083

# RTMPS
rtmps.host=18.100.00.004
rtmps.port=8443
rtmps.ping_interval=5000
rtmps.max_inactivity=60000
rtmps.max_keep_alive_requests=-1
rtmps.max_threads=8
rtmps.acceptor_thread_count=2
rtmps.processor_cache=20
# RTMPS Key and Trust store parameters
rtmps.keystorepass=password
rtmps.keystorefile=C:/Users/Administrator/Desktop/CERCRT Files/keyfile/KeyStore.jks
rtmps.truststorepass=password
rtmps.truststorefile=C:/Users/Administrator/Desktop/CERCRT Files/keyfile/TrustStore.jks

# RTMPT
rtmpt.host=0.0.0.0
rtmpt.port=8088
rtmpt.ping_interval=5000
rtmpt.max_inactivity=60000
rtmpt.max_handshake_time=5000
rtmpt.max_keep_alive_requests=-1
rtmpt.max_threads=8
rtmpt.acceptor_thread_count=2
rtmpt.processor_cache=20
rtmpt.encoder_base_tolerance=5000
rtmpt.encoder_drop_live_future=true
# better setting for streaming media
rtmpt.target_reponse_size=32768
# best setting for small messages or shared objects
#rtmpt.target_reponse_size=8192
# max incoming messages to process at a time. the most that FP appears to send is 166
rtmpt.max_in_msg_process=166
# max time in millis that we will wait when offering data to the in or out queue
rtmpt.max_queue_offer_time=125
# max offer attempts
rtmpt.max_queue_offer_attempts=4

# Debug proxy (needs to be activated in red5-core.xml)
proxy.source_host=127.0.0.1
proxy.source_port=1936
proxy.destination_host=127.0.0.1
proxy.destination_port=1935

# JMX
jmx.rmi.host=18.188.84.174
jmx.rmi.port=9999
jmx.rmi.sport=9998
jmx.rmi.port.remoteobjects=
jmx.keystorepass=password
jmx.mina.monitor.enable=false
jmx.mina.poll.interval=1000
# Whether to always create the registry in-process, not attempting to 
# locate an existing registry at the specified port. Set to "true" in order
# to avoid the overhead of locating an existing registry when you always intend
# to create a new registry in any case.
jmx.registry.create=true
# Whether or not the MBeanServerFactoryBean should attempt to locate a running 
# MBeanServer before creating one
jmx.reuse.existing.server=true
# Whether to register the MBeanServer with the MBeanServerFactory, making it 
# available through MBeanServerFactory.findMBeanServer()
jmx.register.factory=true
# Whether any threads started for the JMXConnectorServer should be started as daemon threads
jmx.daemon=true
# Whether the JMXConnectorServer should be started in a separate thread
jmx.threaded=true

# Server properties
# max events to send in a single update
so.max.events.per.update=64
so.scheduler.pool_size=4
keyframe.cache.entry.max=500
war.deploy.server.check.interval=600000
fileconsumer.delayed.write=true
fileconsumer.queue.size=120
fileconsumer.wait.for.keyframe=true
subscriberstream.buffer.check.interval=5000
subscriberstream.underrun.trigger=100
subscriberstream.max.pending.frames=10
subscriberstream.max.sequential.frames=10
broadcaststream.auto.record=false

# jee-container. xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:lang="http://www.springframework.org/schema/lang"
   xsi:schemaLocation="http://www.springframework.org/schema/beans         
http://www.springframework.org/schema/beans/spring-beans.xsd
                       http://www.springframework.org/schema/lang         
http://www.springframework.org/schema/lang/spring-lang.xsd">

<!-- War deployer -->
<bean id="warDeployer" class="org.red5.server.tomcat.WarDeployer">
    <property name="checkInterval" value="${war.deploy.server.check.interval}"/>
    <property name="webappFolder" value="${red5.root}/webapps"/>
    <!-- Expand war files prior to startup of the remaining services -->
    <property name="expandWars" value="true" />
</bean>
<bean id="tomcat.server" class="org.red5.server.tomcat.TomcatLoader" depends-on="context.loader" 
lazy-init="true">
    <property name="websocketEnabled" value="true" />
    <property name="webappFolder" value="${red5.root}/webapps" />
    <property name="connectors">
        <list>
            <bean name="httpConnector" class="org.red5.server.tomcat.TomcatConnector">
                <property name="protocol" value="org.apache.coyote.http11.Http11Nio2Protocol" />
                <property name="address" value="${http.host}:${http.port}" />
                <property name="redirectPort" value="${https.port}" />
            </bean>
            <bean name="httpsConnector" class="org.red5.server.tomcat.TomcatConnector">
                <property name="secure" value="true" />
                <property name="protocol" value="org.apache.coyote.http11.Http11Nio2Protocol" />
                <property name="address" value="${http.host}:${https.port}" />
                <property name="redirectPort" value="${http.port}" />
                <property name="connectionProperties">
                    <map>
                        <entry key="port" value="${https.port}" />
                        <entry key="redirectPort" value="${http.port}" />
                        <entry key="SSLEnabled" value="true" />
                        <entry key="sslProtocol" value="TLSv1.2" />

                        <entry key="useServerCipherSuitesOrder" value="true" />
                        <entry key="keystoreFile" value="${rtmps.keystorefile}" />
                        <entry key="keystorePass" value="${rtmps.keystorepass}" />
                        <entry key="truststoreFile" value="${rtmps.truststorefile}" />
                        <entry key="truststorePass" value="${rtmps.truststorepass}" />
                        <entry key="clientAuth" value="false" />
                        <entry key="allowUnsafeLegacyRenegotiation" value="false" />
                        <entry key="maxHttpHeaderSize" value="${http.max_headers_size}"/>
                        <entry key="maxKeepAliveRequests" value="${http.max_keep_alive_requests}"/>
                        <entry key="keepAliveTimout" value="-1"/>
                        <entry key="useExecutor" value="true"/>
                        <entry key="maxThreads" value="${http.max_threads}"/>
                        <entry key="acceptorThreadCount" value="${http.acceptor_thread_count}"/>
                        <entry key="processorCache" value="${http.processor_cache}"/>
                    </map>
                </property>
            </bean>
        </list>
    </property>
    <property name="baseHost">
        <bean class="org.apache.catalina.core.StandardHost">
            <property name="name" value="${http.host}" />
        </bean>
    </property>
</bean>

</beans>

server.log

2020-07-14 04:36:10,254 [pool-13-thread-2] WARN  c.r.webrtc.plugin.WebRTCPlugin - Exception testing:     
AVCEncoder
java.lang.UnsatisfiedLinkError: 'long com.red5pro.media.transform.codec.AVCEncoder.open(int, int, 
int, int, int)'
at com.red5pro.media.transform.codec.AVCEncoder.open(Native Method)
at com.red5pro.webrtc.plugin.WebRTCPlugin.b(Unknown Source)
at com.red5pro.webrtc.plugin.WebRTCPlugin.doStartProPlugin(Unknown Source)
at com.red5pro.activation.ProPluginator.a(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
atjava.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP 
oolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
2020-07-14 04:36:10,258 [pool-13-thread-2] INFO  c.r.webrtc.plugin.WebRTCPlugin - Decoder check 
completed: com.red5pro.webrtc.codec.AVCifCauldron
2020-07-14 04:36:10,259 [pool-13-thread-2] INFO  c.r.webrtc.plugin.WebRTCPlugin - Decoder check 
completed: com.red5pro.webrtc.codec.AACifCauldron
2020-07-14 04:36:10,260 [pool-13-thread-2] INFO  c.r.webrtc.plugin.WebRTCPlugin - Decoder check 
completed: com.red5pro.webrtc.codec.MP3ifCauldron
2020-07-14 04:36:10,261 [pool-13-thread-2] WARN  c.r.webrtc.plugin.WebRTCPlugin - Exception testing: 
com.red5pro.jmfext.codec.video.h264.CauldronH264Encoder
java.lang.UnsatisfiedLinkError: 'long com.red5pro.media.transform.codec.OpenH264Encoder.open(int, 
int, int, int, int)'
at com.red5pro.media.transform.codec.OpenH264Encoder.open(Native Method)
at com.red5pro.jmfext.codec.video.h264.CauldronH264Encoder.open(Unknown Source)
at com.red5pro.webrtc.plugin.WebRTCPlugin.b(Unknown Source)
at com.red5pro.webrtc.plugin.WebRTCPlugin.doStartProPlugin(Unknown Source)
at com.red5pro.activation.ProPluginator.a(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
atjava.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP 
oolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
2020-07-14 04:36:10,264 [pool-13-thread-2] INFO  c.r.j.c.a.opus.CauldronOpusEncoder - Settings - 
bandwidth: auto bitrate: 64000 DTX: false FEC: false
2020-07-14 04:36:10,265 [pool-13-thread-2] WARN  c.r.webrtc.plugin.WebRTCPlugin - Exception testing: 
com.red5pro.jmfext.codec.audio.opus.CauldronOpusEncoder
java.lang.UnsatisfiedLinkError: 'long com.red5pro.media.transform.codec.NOpusEncoder.open(int, int, 
int)'
at com.red5pro.media.transform.codec.NOpusEncoder.open(Native Method)
at com.red5pro.jmfext.codec.audio.opus.CauldronOpusEncoder.doOpen(Unknown Source)
at org.jitsi.impl.neomedia.codec.AbstractCodec2.open(Unknown Source)
at com.red5pro.webrtc.plugin.WebRTCPlugin.b(Unknown Source)
at com.red5pro.webrtc.plugin.WebRTCPlugin.doStartProPlugin(Unknown Source)
at com.red5pro.activation.ProPluginator.a(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
atjava.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP 
oolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
2020-07-14 04:36:10,268 [pool-13-thread-2] WARN  c.r.webrtc.plugin.WebRTCPlugin - Exception testing: 
com.red5pro.jmfext.codec.audio.opus.CauldronOpusDecoder
java.lang.UnsatisfiedLinkError: 'long com.red5pro.media.transform.codec.NOpusDecoder.open(int, int)'
at com.red5pro.media.transform.codec.NOpusDecoder.open(Native Method)
at com.red5pro.jmfext.codec.audio.opus.CauldronOpusDecoder.doOpen(Unknown Source)
at org.jitsi.impl.neomedia.codec.AbstractCodec2.open(Unknown Source)
at com.red5pro.webrtc.plugin.WebRTCPlugin.b(Unknown Source)
at com.red5pro.webrtc.plugin.WebRTCPlugin.doStartProPlugin(Unknown Source)
at com.red5pro.activation.ProPluginator.a(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
2020-07-14 04:36:10,271 [pool-13-thread-2] INFO  c.r.webrtc.plugin.WebRTCPlugin - Codec preflight 
check     
completed
2020-07-14 04:36:16,287 [Connection Checker] INFO  c.r.s.stream.Red5ProConnManager - Pro connections;     
Total count: 0, WebRTC ports allocated: 0, edge-proxy: 0, re-streamers: 0, sm-pulses:0
2020-07-14 04:36:46,283 [Connection Checker] INFO  c.r.s.stream.Red5ProConnManager - Pro connections;         
Total count: 0, WebRTC ports allocated: 0, edge-proxy: 0, re-streamers: 0, sm-pulses:0
2020-07-14 04:37:16,283 [Connection Checker] INFO  c.r.s.stream.Red5ProConnManager - Pro connections; 
Total count: 0, WebRTC ports allocated: 0, edge-proxy: 0, re-streamers: 0, sm-pulses:0
...