List Info

Thread: Connection problem with AS3 and Red5...




Connection problem with AS3 and Red5...
user name
2006-11-27 22:55:22
Hello all:

I've been working on a couple of Flex2 client applications for Red5. ; I've created a Red5Connection class which wraps the NetConnection class.  (Note:  I made sure to declare the encoding to be AMF0.)  I connect to Red5 via the following client function:

       public function connect(... args):void {
            log.debug("connect: " + args);
            if (!conn.connected) {
                // Attempt to connect to the server.
                conn.connect(getServerUrl(), args);
                // Start the connection timeout timer.
                timer = new Timer(timeOut, 1);
 ;               timer.addEventListener(TimerEvent.TIMER_COMPLETE, connectionTimedOut);
  ;              timer.start();
   ;         }
        }

Please take note of the function signature '... args'. Essentially it translates the comma delimited arguments of the function into an array for use within its body. When connecting using a call such as connect('carl', 'password'); I get the following error in Red5:

ERROR [26 Nov 2006 17:22:43,435] org.red5.server.net.rtmp.codec.RTMPProtocolDecoder (SLF4JLog.java:171) - Error in packet at 1934
java.lang.NumberFormatException: For input string: "length"
      ;  at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt (Integer.java:447)
       ; at java.lang.Integer.parseInt(Integer.java:497)
        at org.red5.io.object.Deserializer.readMixedArray(Deserializer.java:163)
   ;     at org.red5.io.object.Deserializer.deserialize(Deserializer.java :86)
        at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decodeNotifyOrInvoke(RTMPProtocolDecoder.java:559)
     ;   at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decodeInvoke(RTMPProtocolDecoder.java :494)
        at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decodeMessage(RTMPProtocolDecoder.java:350)
        at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decodePacket(RTMPProtocolDecoder.java:278)
        at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decode(RTMPProtocolDecoder.java:123)
        at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decodeBuffer(RTMPProtocolDecoder.java:92)
 ;       at org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder.decode(RTMPMinaProtocolDecoder.java:50)
      ;  at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:158)
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived (AbstractIoFilterChain.java:502)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:52)
      ;  at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived (AbstractIoFilterChain.java:777)
   ;     at org.apache.mina.common.support.AbstractIoFilterChain$1.messageReceived(AbstractIoFilterChain.java:111)
   ;     at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived (AbstractIoFilterChain.java:502)
        at org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(AbstractIoFilterChain.java:493)
        at org.apache.mina.transport.socket.nio.SocketIoProcessor.read (SocketIoProcessor.java:286)
        at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:246)
     ;   at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProcessor.java :44)
        at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:564)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)
     ;   at java.lang.Thread.run(Thread.java:613)
ERROR [26 Nov 2006 17:22:43,436] org.red5.server.net.rtmp.codec.RTMPProtocolDecoder (SLF4JLog.java:171) - Error decoding buffer
org.red5.server.net.protocol.ProtocolException: Error during decoding
  ;      at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decode(RTMPProtocolDecoder.java:134)
        at org.red5.server.net.rtmp.codec.RTMPProtocolDecoder.decodeBuffer(RTMPProtocolDecoder.java:92)
 ;       at org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder.decode(RTMPMinaProtocolDecoder.java:50)
      ;  at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:158)
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived (AbstractIoFilterChain.java:502)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:52)
      ;  at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived (AbstractIoFilterChain.java:777)
   ;     at org.apache.mina.common.support.AbstractIoFilterChain$1.messageReceived(AbstractIoFilterChain.java:111)
   ;     at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived (AbstractIoFilterChain.java:502)
        at org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(AbstractIoFilterChain.java:493)
        at org.apache.mina.transport.socket.nio.SocketIoProcessor.read (SocketIoProcessor.java:286)
        at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:246)
     ;   at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProcessor.java :44)
        at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:564)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)
     ;   at java.lang.Thread.run(Thread.java:613)
 
It would seem that Red5 is always expecting an integer when attempting to deserialize the incoming object.  I'd like to understand fully what is happening here so that I might be of some help in fixing the issue.  Any insight would be appreciated.

Regards,
Carl
--
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.
  - Dr. Seuss
Connection problem with AS3 and Red5...
user name
2006-11-27 23:11:14
Hi Carl,

Carl Sziebert schrieb:
[...]
>     ERROR [26 Nov 2006 17:22:43,435]
>     org.red5.server.net.rtmp.codec.RTMPProtocolDecoder
>     (SLF4JLog.java:171) - Error in packet at 1934
>     java.lang.NumberFormatException: For input string:
"length"
>             at
>    
java.lang.NumberFormatException.forInputString(NumberFormatE
xception.java:48)
[...]
> It would seem that Red5 is always expecting an integer
when attempting
> to deserialize the incoming object.  I'd like to
understand fully what
> is happening here so that I might be of some help in
fixing the issue. 
> Any insight would be appreciated.

this bug has been fixed in r1543, so you can either run the
trunk of Red5
or wait for the next version which will include this fix.

Joachim


_______________________________________________
Red5devs mailing list
Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org

Connection problem with AS3 and Red5...
user name
2006-11-27 23:11:14
Hi Carl,

Carl Sziebert schrieb:
[...]
>     ERROR [26 Nov 2006 17:22:43,435]
>     org.red5.server.net.rtmp.codec.RTMPProtocolDecoder
>     (SLF4JLog.java:171) - Error in packet at 1934
>     java.lang.NumberFormatException: For input string:
"length"
>             at
>    
java.lang.NumberFormatException.forInputString(NumberFormatE
xception.java:48)
[...]
> It would seem that Red5 is always expecting an integer
when attempting
> to deserialize the incoming object.  I'd like to
understand fully what
> is happening here so that I might be of some help in
fixing the issue. 
> Any insight would be appreciated.

this bug has been fixed in r1543, so you can either run the
trunk of Red5
or wait for the next version which will include this fix.

Joachim


_______________________________________________
Red5devs mailing list
Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org

Connection problem with AS3 and Red5...
user name
2006-11-27 23:49:17
Thanks very much Joachim.  I'll pull the latest.

Carl

On 11/27/06, Joachim Bauch < jojostruktur.de">jojostruktur.de> wrote:
Hi Carl,

Carl Sziebert schrieb:
[...]
>&nbsp; &nbsp;  ERROR [26 Nov 2006 17:22:43,435]
>&nbsp; &nbsp;  org.red5.server.net.rtmp.codec.RTMPProtocolDecoder
>; &nbsp; &nbsp; (SLF4JLog.java:171) - Error in packet at 1934
>&nbsp;   ; java.lang.NumberFormatException : For input string: "length"
&gt; &nbsp; &nbsp; &nbsp;   ; &nbsp;  at
>&nbsp; &nbsp;  java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
[...]
>; It would seem that Red5 is always expecting an integer when attempting
> to deserialize the incoming object.&nbsp; I'd like to understand fully what
> is happening here so that I might be of some help in fixing the issue.
>; Any insight would be appreciated.

this bug has been fixed in r1543, so you can either run the trunk of Red5
or wait for the next version which will include this fix.

Joachim


_______________________________________________
Red5devs mailing list
Red5devsosflash.org">Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org



--
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.
&nbsp; - Dr. Seuss
Connection problem with AS3 and Red5...
user name
2006-11-27 23:49:17
Thanks very much Joachim.  I'll pull the latest.

Carl

On 11/27/06, Joachim Bauch < jojostruktur.de">jojostruktur.de> wrote:
Hi Carl,

Carl Sziebert schrieb:
[...]
>&nbsp; &nbsp;  ERROR [26 Nov 2006 17:22:43,435]
>&nbsp; &nbsp;  org.red5.server.net.rtmp.codec.RTMPProtocolDecoder
>; &nbsp; &nbsp; (SLF4JLog.java:171) - Error in packet at 1934
>&nbsp;   ; java.lang.NumberFormatException : For input string: "length"
&gt; &nbsp; &nbsp; &nbsp;   ; &nbsp;  at
>&nbsp; &nbsp;  java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
[...]
>; It would seem that Red5 is always expecting an integer when attempting
> to deserialize the incoming object.&nbsp; I'd like to understand fully what
> is happening here so that I might be of some help in fixing the issue.
>; Any insight would be appreciated.

this bug has been fixed in r1543, so you can either run the trunk of Red5
or wait for the next version which will include this fix.

Joachim


_______________________________________________
Red5devs mailing list
Red5devsosflash.org">Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org



--
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.
&nbsp; - Dr. Seuss
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )