Skip navigation
betheflexcoder
Currently Being Moderated

Flex AIR iOS application with rtmps

Jan 23, 2012 4:03 PM

Hi,

 

If I am accessing flex AIR application from Mac or iOS (iPad) using secure rtmp then it gives me error. It is not able to connect to the server.  I have a self signed certificate generated using java keytool. I have configured it on tomcat and it works for the ssl in browser with https://localhost:8080, but fails when using rtmps from flex application especially in Mac and iPad.  It works in Android tablet and windows machine though.

 

Here is the configuration in I gave in the server for ssl.

 

<server id="secure-nio-server" class="flex.messaging.socketserver.SocketServer">

        <properties>

            <keystore-file>D:/keystore.jks</keystore-file>
            <keystore-password>password</keystore-password>
     
        </properties>

    </server>

 

<channel-definition id="mobility-rtmp"

      class="mx.messaging.channels.SecureRTMPChannel">

      <endpoint url="rtmps://{server.name}:@flex.rtmp.port@"

        class="flex.messaging.endpoints.SecureRTMPEndpoint"/>
   <server ref="secure-nio-server">
 
      <properties>

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

        <!-- for deployment on WebSphere, must be mapped to a WorkManager available in the web application's jndi context.

        <websphere-workmanager-jndi-name>java:comp/env/wm/MessagingWorkManage r</websphere-workmanager-jndi-name>

        -->

</properties>
</server>
    </channel-definition>

 

Here is the exception I am getting on server side.

 

INFO: [LCDS] 01/21/2012 17:14:44.258 [ERROR] [SocketServer.General] Thread[secure-nio-server-WorkerThread-2,5,main] failed to read Connection '521330370' or process the data; Connection is in the 'Handshaking' state and will be forced closed.
javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.closeInbound(Unknown Source)
at flex.messaging.socketserver.SSLConnection.handshake(SSLConnection.jav a:298)
at flex.messaging.socketserver.Connection$ConnectionReader.run(Connectio n.java:845)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Jan 21, 2012 5:14:44 PM org.apache.catalina.core.ApplicationContext log
INFO: [LCDS] 01/21/2012 17:14:44.258 [DEBUG] [SocketServer.General] Thread[secure-nio-server-WorkerThread-2,5,main] Connection '521330370' has changed state to: Closing
Jan 21, 2012 5:14:44 PM org.apache.catalina.core.ApplicationContext log
INFO: [LCDS] 01/21/2012 17:14:44.258 [DEBUG] [SocketServer.General] Thread[secure-nio-server-WorkerThread-2,5,main] closing Connection '521330370'.
Jan 21, 2012 5:14:44 PM org.apache.catalina.core.ApplicationContext log
INFO: [LCDS] 01/21/2012 17:14:44.258 [DEBUG] [SocketServer.General] Thread[secure-nio-server-WorkerThread-2,5,main] Connection '521330370' has changed state to: Closed
Jan 21, 2012 5:14:44 PM org.apache.catalina.core.ApplicationContext log
INFO: [LCDS] 01/21/2012 17:14:44.258 [DEBUG] [SocketServer.General] Thread[secure-nio-server-WorkerThread-2,5,main] closed Connection '521330370'.
Jan 21, 2012 5:14:44 PM org.apache.catalina.core.ApplicationContext log
INFO: [LCDS] 01/21/2012 17:14:44.258 [DEBUG] [SocketServer.General] Thread[secure-nio-server-WorkerThread-2,5,main] Connection '521330370' finished a read. -1 bytes were read.

 

Please help.

 

 

Thanks,

Swathi.

 
Replies
  • Currently Being Moderated
    Jan 24, 2012 2:39 AM   in reply to betheflexcoder

    I would suggest taking up this question on the AIR for iOS forums, since Data Services uses the RTMP Channel and connection capability provided by AIR. I believe adding the certificate to your login keychain might be of assistance on Mac.

     
    |
    Mark as:
  • Currently Being Moderated
    Calculating status...
    Mar 8, 2012 4:58 AM   in reply to betheflexcoder

    Did you get anywhere with this, I'm having a similar issue?

     

    I have an Air app that works fine using rtmp in iOS but not rtmps (it works fine in Android for both). The release notes for 3.1 (http://kb2.adobe.com/cps/923/cpsid_92350.html) suggest there was a problem for rtmps on iOS, but I'm using the latest 3.1 SDK version.

     

    I'm suspecting an SSL certificate issue as in Android I get prompted as to whether I trust the certificate, but not on the iPhone. I have installed the certificate manually but to no avail.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 27, 2012 6:40 AM   in reply to MrCodeghost

    @ MrCodeghost

    Hi,

         As you have mentioned in the post that "I have an Air app that works fine using rtmp in iOS".

         Does your Air app have audio/video publish or recieving capabilitites?

         If yes then I want to ask that did you face any abrupt stopping of the audio/video stream after 18-20 mins?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 27, 2012 7:08 AM   in reply to Subodh K Sharma

    Yes we publish video and audio from the handset, but I'm afraid I've never had anything publish for that long so haven't seen any issue at the length of time.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 27, 2012 7:25 AM   in reply to MrCodeghost

    Thanks

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2013 11:33 AM   in reply to Subodh K Sharma

    Hi,

     

    I am working on an AIR app that works using rtmps on ios (iPAD). the rtmps connection with audio stream works fine until it timesout after 18 - 20 mins. The timeout time is random, but on an average most time outs occur at 20 mins. My problem seems to be close to your question. If so, do you any explanation / solution to it.

     

    Thanks

    kalyan

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 29, 2013 1:38 PM   in reply to sreeramkalyan

    Hi Kalyan,

    What value of the renderMode you are using for the app?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points