Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-06-2011, 03:58 PM   #1
gazuraz
Senior Member
 
Join Date: Dec 2008
Location: Serbia/ Smederevo
Posts: 297
Default RED5 - HOW to send ByteArray

After a year of pain and agony working whit moust unstable server online - red5, I can only say "Do not use it, if you want to keep your hair on your head!"

I have found a new bug related to sending ByteArrays over SharedObject

Here is red5 error log regarding issue

Code:
[ERROR] [NioProcessor-1] org.red5.server.net.rtmp.codec.RTMPProtocolEncoder - Error encoding object:
java.lang.RuntimeException: ByteArray objects not supported with AMF0
        at org.red5.io.amf.Output.writeByteArray(Output.java:526) [red5.jar:na]
        at org.red5.io.object.Serializer.serialize(Serializer.java:83) [red5.jar:na]
        at org.red5.io.object.Serializer.serialize(Serializer.java:64) [red5.jar:na]
        at org.red5.server.net.rtmp.codec.RTMPProtocolEncoder.doEncodeSharedObject(RTMPProtocolEncoder.java:651) [red5.jar:na]
        at org.red5.server.net.rtmp.codec.RTMPProtocolEncoder.encodeSharedObject(RTMPProtocolEncoder.java:592) [red5.jar:na]
        at org.red5.server.net.rtmp.codec.RTMPProtocolEncoder.encodeMessage(RTMPProtocolEncoder.java:531) [red5.jar:na]
        at org.red5.server.net.rtmp.codec.RTMPProtocolEncoder.encodePacket(RTMPProtocolEncoder.java:154) [red5.jar:na]
        at org.red5.server.net.rtmp.codec.RTMPProtocolEncoder.encode(RTMPProtocolEncoder.java:122) [red5.jar:na]
        at org.red5.server.net.rtmp.codec.RTMPMinaProtocolEncoder.encode(RTMPMinaProtocolEncoder.java:57) [red5.jar:na]
        at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:298) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:506) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1400(DefaultIoFilterChain.java:46) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:805) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.IoFilterAdapter.filterWrite(IoFilterAdapter.java:135) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:506) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1400(DefaultIoFilterChain.java:46) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:805) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.filterWrite(DefaultIoFilterChain.java:731) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:506) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireFilterWrite(DefaultIoFilterChain.java:498) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:428) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:369) [mina-core-2.0.0-RC1.jar:na]
        at org.red5.server.net.rtmp.RTMPMinaConnection.write(RTMPMinaConnection.java:248) [red5.jar:na]
        at org.red5.server.net.rtmp.Channel.write(Channel.java:124) [red5.jar:na]
        at org.red5.server.net.rtmp.Channel.write(Channel.java:104) [red5.jar:na]
        at org.red5.server.so.SharedObject.sendUpdates(SharedObject.java:316) [red5.jar:na]
        at org.red5.server.so.SharedObject.notifyModified(SharedObject.java:390) [red5.jar:na]
        at org.red5.server.so.SharedObject.endUpdate(SharedObject.java:659) [red5.jar:na]
        at org.red5.server.so.SharedObjectScope.endUpdate(SharedObjectScope.java:187) [red5.jar:na]
        at org.red5.server.so.SharedObjectScope.dispatchEvent(SharedObjectScope.java:585) [red5.jar:na]
        at org.red5.server.net.rtmp.RTMPHandler.onSharedObject(RTMPHandler.java:557) [red5.jar:na]
        at org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:189) [red5.jar:na]
        at org.red5.server.net.rtmp.RTMPMinaIoHandler.messageReceived(RTMPMinaIoHandler.java:180) [red5.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793) [mina-core-2.0.0-RC1.jar:na]
        at org.red5.server.net.filter.TrafficShapingFilter.messageReceived(TrafficShapingFilter.java:204) [red5.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969) [mina-core-2.0.0-RC1.jar:na]
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) [mina-core-2.0.0-RC1.jar:na]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_24]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_24]
        at java.lang.Thread.run(Thread.java:662) [na:1.6.0_24]
When sending data sender class gets synhronization event and reciver class doese not!!
gazuraz is offline   Reply With Quote
Old 12-14-2011, 04:34 AM   #2
peptobismol
Senior Member
 
Join Date: Oct 2005
Posts: 747
Default

I've sent ByteArray through POST with base64Encode. Works pretty well.
peptobismol is offline   Reply With Quote
Old 08-16-2012, 10:24 PM   #3
scottymo
Registered User
 
Join Date: Aug 2012
Posts: 1
Default Works in more recent server builds

I ran into the same problem while using the red5-1.0.0-RC1 release. I found the issue documented here:

(My link was removed by the forum. I tried to link to code.google.com/p/red5/issues/detail?id=145 here)

The last comment on that thread indicates that the problem was fixed as of Dec 2011. The RC1 release was announced Jan 2011, so I figured I had to build the Red5 server from source to have a server with the fix in it.

I built the Red5 server from source (as of SVN rev. 4395) and that fixed the problem.

I also just tried using the RC2 release, and that release doesn't seem to have the issue. As of this post, the RC2 release isn't advertised in the "News" section at red5.org, but it is available on their downloads page.
scottymo is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:43 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
RED5 - HOW to send ByteArrayRED5 - HOW to send ByteArray
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.