Expand my Community achievements bar.

Secure RTMP and Linux

Avatar

Level 1
Maybe someone can help me solve this mystery.



I have successfully used RTMP on Windows XP and RHEL 4 with
Flex 2.0.1 FDS and integrated JRun, Adobe FlashPlayer 9,0,28,0



The application works with a self-signed certificate using
HTTPS and RTMPS on Windows XP with the client app running in IE 7
and Firefox 1.5. The server certificates are signed with a trusted
root certificate, which in turn is in the certificate stores.



If I build the application on Linux with the same RTMPS
configuration as on Windows XP (except the difference in server
names), HTTPS on Linux works fine, but I have no joy with RTMPS.



<channel-definition id="my-rtmps"
class="mx.messaging.channels.SecureRTMPChannel">

<endpoint uri="rtmps://{server.name}:2099"
class="flex.messaging.endpoints.SecureRTMPEndpoint"/>

<properties>

<idle-timeout-minutes>20</idle-timeout-minutes>


<client-to-server-maxbps>100K</client-to-server-maxbps>


<server-to-client-maxbps>100K</server-to-client-maxbps>


<keystore-file>/opt/fds2/jrun4/lib/keystore</keystore-file>

<keystore-password>****</keystore-password>

</properties>

</channel-definition>



The following log example lists what happens with the first
FDS fill operation that the client performs.

There are NO error or warning entries in the client or server
logs - the logs end as indicated.



Client Log:

========

2/9/2007 11:52:42.312 [DEBUG] test.Tools challenge user

2/9/2007 11:53:08.843 [DEBUG] mx.data.DataService.sites
cds-producer-sites-null DataService.fill() called with 1 arguments.


(Array)#0

[0] "Duster"

<==== Trace ends here with Linux server =======



(the same trace on XP continues as follows)

2/9/2007 11:53:08.843 [WARN] mx.messaging.Consumer Client ID
specified in subscribe is ignored when a session is assigned.

2/9/2007 11:53:08.843 [INFO] mx.messaging.Consumer
'cds-consumer-sites-null' consumer subscribe.

2/9/2007 11:53:08.859 [INFO] mx.messaging.Channel 'my-rtmps'
channel endpoint set to rtmps://localhost:2099

2/9/2007 11:53:08.859 [INFO] mx.messaging.Channel 'my-rtmps'
channel settings are:

<channel id="my-rtmps"
type="mx.messaging.channels.SecureRTMPChannel">

<endpoint uri="rtmps://{server.name}:2099"/>

<properties/>

</channel>

2/9/2007 11:53:08.875 [INFO] mx.messaging.Producer
'cds-producer-sites-null' producer sending message
'9E153EC6-2413-5C93-72B5-A810F80BEB21'



Server log:

========

02/09 15:12:06 user FlexMxmlServlet: init

02/09 15:12:07 INFO Loading configuration file
/opt/fds2/jrun4/servers/default/acesis/WEB-INF/flex/flex-webtier-config.xml

02/09 15:12:07 INFO Loading configuration file
/opt/fds2/jrun4/servers/default/acesis/WEB-INF/flex/flex-config.xml

02/09 15:12:07 INFO [cache] No existing dependency
information.

02/09 15:12:07 user FlexMxmlServlet: Starting Adobe Flex Web
Tier Compiler

02/09 15:12:07 user FlexMxmlServlet: Adobe Flex Web Tier
Compiler Build: 155539

02/09 15:12:07 user MessageBrokerServlet: init

02/09 15:12:10 user [Flex] 02/09/2007 15:12:10.834 [INFO]
[Configuration] Starting Adobe Flex Data Services 2 Express

02/09 15:12:10 user [Flex] 02/09/2007 15:12:10.838 [INFO]
[Configuration] Adobe Flex Data Services Build: 155539

02/09 15:12:10 user [Flex] 02/09/2007 15:12:10.914 [INFO]
[Configuration] Endpoint my-amf created with security: None

at URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/amf

02/09 15:12:10 user [Flex] 02/09/2007 15:12:10.991 [INFO]
[Configuration] Endpoint my-rtmps created with security: None

at URI: rtmps://{server.name}:2099

02/09 15:12:10 user [Flex] 02/09/2007 15:12:10.994 [INFO]
[Configuration] Endpoint my-secure-polling-amf created with
security: None

at URI:
https://{server.name}:9100/{context.root}/messagebroker/amfsecurepolling

02/09 15:12:10 user [Flex] 02/09/2007 15:12:10.995 [INFO]
[Configuration] Endpoint my-polling-amf created with security: None

at URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling

02/09 15:12:11 user [Flex] 02/09/2007 15:12:11.003 [INFO]
[Configuration] Endpoint my-http created with security: None

at URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/http

02/09 15:12:11 user [Flex] 02/09/2007 15:12:11.009 [INFO]
[Configuration] Endpoint my-secure-amf created with security: None

at URI:
https://{server.name}:9100/{context.root}/messagebroker/amfsecure

02/09 15:12:11 user [Flex] 02/09/2007 15:12:11.021 [INFO]
[Configuration] Endpoint my-rtmp created with security: None

at URI: rtmp://{server.name}:2038

02/09 15:12:11 user [Flex] 02/09/2007 15:12:11.023 [INFO]
[Configuration] Endpoint my-secure-http created with security: None

at URI:
https://{server.name}:9100/{context.root}/messagebroker/httpsecure

02/09 15:12:11 user [Flex] 02/09/2007 15:12:11.366 [INFO]
[Endpoint.RTMP] RTMPS-Server listening on port:2099

02/09 15:12:11 user [Flex] 02/09/2007 15:12:11.372 [INFO]
[Endpoint.RTMP] RTMP-Server listening on port:2038

02/09 15:12:11 user FlexSwfServlet: init

02/09 15:12:11 user FlexInternalServlet: init

02/09 15:13:08 user jrun.servlet.RedirectServlet: init

02/09 15:13:08 user FileServlet: init

02/09 15:13:27 user ServletInvoker: init

2007-02-09 15:14:48,391 INFO [RTMPS-Server]
security.SessionRegistry (SessionRegistry.java:340) - Created:
flex.messaging.endpoints.rtmp.RTMPFlexSession@1827002

(the previous entry is from a
FlexSessionListener#sessionCreated(FlexSession) implementation)

02/09 15:14:48 user [Flex] 02/09/2007 15:14:48.393 [DEBUG]
[Endpoint.RTMP] Created worker thread: RTMPS-Worker-0

02/09 15:14:48 user [Flex] 02/09/2007 15:14:48.396 [DEBUG]
[Endpoint.RTMP] Created worker thread: RTMPS-Worker-1

02/09 15:14:48 user [Flex] 02/09/2007 15:14:48.399 [DEBUG]
[Endpoint.RTMP] Created worker thread: RTMPS-Worker-2

02/09 15:14:48 user [Flex] 02/09/2007 15:14:48.488 [DEBUG]
[Endpoint.RTMP] Created worker thread: RTMPS-Worker-3

02/09 15:14:48 user [Flex] 02/09/2007 15:14:48.522 [DEBUG]
[Endpoint.RTMP] Created worker thread: RTMPS-Worker-4

<==== Trace ends here ====



The server log shows that the Flex session is created, RTMPS
worker threads are created, but then any messaging just stops.
There is no response to the fill operation as you can see in both
logs.



Firewalls are out of the picture - client and server are
connected via OpenVPN, Windows Firewall on the client is off. As
mentioned already, the exact same setup (with the same VPN) works
when using RTMP instead of RTMPS.



Just in case I've tried several different ports for RTMPS:
2099, 2039, 9105 and probably some others I don't recall anymore.



Any and all help would be appreciated - I'm out of ideas.

--

Jürgen Failenschmid

2 Replies

Avatar

Level 2
Jürgen,

We just spent a few days struggling with this very same
problem. It seems to only occur when using JDK1.5. RTMPS seems to
work well with JDK1.4 or 6 (Note I don't think 6 is supported
though)



Cheers,

-Vito



Avatar

Level 1
This was eventually tracked down together with Adobe's help
as a problem in the RTMPS-related implementation of LC DS and fixed
in a hotfix for LC DS 2.6



- Jürgen