Re: Exception thrown in Red5

11 views
Skip to first unread message

Freddie

unread,
Aug 9, 2010, 8:08:33 AM8/9/10
to red5
It's been a while, but I finally found some time to look into the
problem.

It happens with the jar application.
the client side code looks like this:

String loginname = arguments[0];
String cameraCode = arguments[1];
String cameraStatus = arguments[2];
String showVideo = arguments[3]

RemotingClient client = new RemotingClient("http://red5server:5080/
red5app/gateway");

client.setCredentials(loginname, password);
Object[] methodArgs = new Object[]{cameraCode, cameraStatus,
showVideo};
client.invokeMethod("cameraStatusUpdate", methodArgs);

and the response I get:

5:58.430 [Thread-0] DEBUG o.a.c.h.params.DefaultHttpParams - Set
parameter http.connection.timeout = 30000
13:45:58.430 [Thread-0] DEBUG o.r.s.net.remoting.RemotingClient -
RemotingClient created - url: http://red5server:5080/red5app/gateway
timeout: 30000 http manager:
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager@6f34a7d8
13:45:58.431 [Thread-0] DEBUG o.r.s.net.remoting.RemotingClient -
RemotingClient created - url: http://red5server:5080/red5app/gateway
timeout: 30000
13:45:58.431 [Thread-0] DEBUG o.r.s.net.remoting.RemotingClient -
RemotingClient created - url: http://red5server:5080/red5app/gateway
13:45:58.431 [Thread-0] DEBUG o.r.s.net.remoting.RemotingClient -
invokeMethod url: http://red5server:5080/red5app/gateway
13:45:58.431 [Thread-0] DEBUG o.r.s.net.remoting.RemotingClient -
RemotingClient encodeInvoke - method: cameraStatusUpdate params:
[default, activity_stop, true]
13:45:58.431 [Thread-0] DEBUG org.red5.io.object.Serializer -
serialize
13:45:58.431 [Thread-0] DEBUG org.red5.io.object.Serializer -
writeComplex
13:45:58.431 [Thread-0] DEBUG org.red5.io.object.Serializer -
writeListType
13:45:58.431 [Thread-0] DEBUG org.red5.io.object.Serializer -
writeArrayType
13:45:58.431 [Thread-0] DEBUG org.red5.io.object.Serializer -
writeXMLType
13:45:58.431 [Thread-0] DEBUG org.red5.io.object.Serializer -
serialize
13:45:58.431 [Thread-0] DEBUG org.red5.io.object.Serializer - Wrote as
basic
13:45:58.431 [Thread-0] DEBUG org.red5.io.object.Serializer -
serialize
13:45:58.431 [Thread-0] DEBUG org.red5.io.object.Serializer - Wrote as
basic
13:45:58.432 [Thread-0] DEBUG org.red5.io.amf.Output - writeArray -
array: [default, activity_stop, true] serializer:
org.red5.io.object.Serializer@4178460d
13:45:58.432 [Thread-0] DEBUG org.red5.io.object.Serializer -
serialize
13:45:58.432 [Thread-0] DEBUG org.red5.io.object.Serializer - Wrote as
basic
13:45:58.432 [Thread-0] DEBUG org.red5.io.object.Serializer -
serialize
13:45:58.432 [Thread-0] DEBUG org.red5.io.object.Serializer - Wrote as
basic
13:45:58.432 [Thread-0] DEBUG org.red5.io.object.Serializer -
serialize
13:45:58.432 [Thread-0] DEBUG org.red5.io.object.Serializer - Wrote as
basic
13:45:58.432 [Thread-0] DEBUG o.r.s.net.remoting.RemotingClient -
Client: org.apache.commons.httpclient.HttpClient@3f3f210f
13:45:58.432 [Thread-0] DEBUG
o.a.c.h.MultiThreadedHttpConnectionManager -
HttpConnectionManager.getConnection: config =
HostConfiguration[host=http://red5server:5080], timeout = 0
13:45:58.432 [Thread-0] DEBUG
o.a.c.h.MultiThreadedHttpConnectionManager - Getting free connection,
hostConfig=HostConfiguration[host=http://red5server:5080]
13:45:58.432 [Thread-0] DEBUG o.a.c.httpclient.HttpConnection - Open
connection to red5server:5080
13:45:58.442 [Thread-0] DEBUG httpclient.wire.header - >> "POST /
red5app/gateway HTTP/1.1[\r][\n]"
13:45:58.442 [Thread-0] DEBUG o.a.c.httpclient.HttpMethodBase - Adding
Host request header
13:45:58.442 [Thread-0] DEBUG httpclient.wire.header - >> "User-Agent:
Jakarta Commons-HttpClient/3.1[\r][\n]"
13:45:58.442 [Thread-0] DEBUG httpclient.wire.header - >> "Host:
red5server:5080[\r][\n]"
13:45:58.443 [Thread-0] DEBUG httpclient.wire.header - >> "Content-
Length: 129[\r][\n]"
13:45:58.443 [Thread-0] DEBUG httpclient.wire.header - >> "Content-
Type: application/x-amf[\r][\n]"
13:45:58.443 [Thread-0] DEBUG httpclient.wire.header - >> "[\r][\n]"
13:45:58.443 [Thread-0] DEBUG httpclient.wire.content - >> "[0x0][0x0]
[0x0][0x1][0x0][0xb]Credentials[0x1][0x0][0x0][0x0])[0x8][0x0][0x0]
[0x0][0x0][0x0][0x6]userid[0x2][0x0][0x5]1x5ip[0x0][0x8]password[0x2]
[0x0][0x4]axis[0x0][0x0][0x9][0x0][0x1][0x0]
[0x12]cameraStatusUpdate[0x0][0x0][0x0][0x0][0x0]&[\n]"
13:45:58.443 [Thread-0] DEBUG httpclient.wire.content - >> "[0x0][0x0]
[0x0][0x3][0x2][0x0][0x7]default[0x2][0x0][\r]activity_stop[0x2][0x0]
[0x4]true"
13:45:58.443 [Thread-0] DEBUG o.a.c.h.m.EntityEnclosingMethod -
Request body sent
13:45:58.454 [Thread-0] DEBUG httpclient.wire.header - << "HTTP/1.1
500 Internal Server Error[\r][\n]"
13:45:58.454 [Thread-0] DEBUG httpclient.wire.header - << "HTTP/1.1
500 Internal Server Error[\r][\n]"
13:45:58.454 [Thread-0] DEBUG httpclient.wire.header - << "Server:
Apache-Coyote/1.1[\r][\n]"
13:45:58.454 [Thread-0] DEBUG httpclient.wire.header - << "Set-Cookie:
JSESSIONID=F8AF8E642DE82E9B9B8267832F0F5F6C; Path=/red5app[\r][\n]"
13:45:58.454 [Thread-0] DEBUG httpclient.wire.header - << "Content-
Type: text/html;charset=utf-8[\r][\n]"
13:45:58.454 [Thread-0] DEBUG httpclient.wire.header - << "Content-
Length: 1000[\r][\n]"
13:45:58.454 [Thread-0] DEBUG httpclient.wire.header - << "Date: Mon,
09 Aug 2010 11:45:28 GMT[\r][\n]"
13:45:58.454 [Thread-0] DEBUG httpclient.wire.header - << "Connection:
close[\r][\n]"
13:45:58.454 [Thread-0] DEBUG httpclient.wire.header - << "[\r][\n]"
13:45:58.454 [Thread-0] DEBUG o.a.c.httpclient.HttpMethodBase - Cookie
accepted: "$Version=0; JSESSIONID=F8AF8E642DE82E9B9B8267832F0F5F6C;
$Path=/red5app"
13:45:58.454 [Thread-0] DEBUG o.r.s.net.remoting.RemotingClient -
Result code: 500
13:45:58.455 [Thread-0] ERROR o.r.s.net.remoting.RemotingClient -
Error while invoking remoting method.
java.lang.RuntimeException: Didn't receive success from remoting
server.
at
org.red5.server.net.remoting.RemotingClient.invokeMethod(RemotingClient.java:
357) [AXISListener.jar:na]
at com.centric.AXISServer.handleClientSocket(AXISServer.java:59)
[AXISListener.jar:na]
at com.centric.network.GenericServer.run(GenericServer.java:49)
[AXISListener.jar:na]
at java.lang.Thread.run(Thread.java:637) [na:1.6.0_20]
13:45:58.455 [Thread-0] DEBUG httpclient.wire.content - <<
"<html><head><title>Apache Tomcat/6.0.24 - Error report</
title><style><!--H1 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-
family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-
family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;} P {font-family:Tahoma,Arial,sans-
serif;background:white;color:black;font-size:12px;}A {color : black;}
A.name {color : black;}HR {color : #525D76;}--></style> </
head><body><h1>HTTP Status 500 - </h1><HR size="1"
noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b>
<u></u></p><p><b>description</b> <u>The server encountered an internal
error () that prevented it from fulfilling this request.</u></p><HR
size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></
html>"
13:45:58.455 [Thread-0] DEBUG o.a.c.httpclient.HttpMethodBase - Should
close connection in response to directive: close
13:45:58.455 [Thread-0] DEBUG o.a.c.httpclient.HttpConnection -
Releasing connection back to connection manager.
13:45:58.455 [Thread-0] DEBUG
o.a.c.h.MultiThreadedHttpConnectionManager - Freeing connection,
hostConfig=HostConfiguration[host=http://red5server:5080]
13:45:58.455 [Thread-0] DEBUG o.a.c.h.util.IdleConnectionHandler -
Adding connection at: 1281354358455
13:45:58.455 [Thread-0] DEBUG
o.a.c.h.MultiThreadedHttpConnectionManager - Notifying no-one, there
are no waiting threads



On Apr 12, 11:17 am, Freddie <freddie.til...@gmail.com> wrote:
> I'll try to create something reproducable..
>
> Freddie
>
> On Apr 9, 7:33 pm, Mondain <mond...@gmail.com> wrote:
>
>
>
> > I vaguely recall it.. definitely need more info though..
>
> > Paul
>
> > On Fri, Apr 9, 2010 at 8:51 AM, Andy Shaules <bowljo...@gmail.com> wrote:
> > >  That apears to be the AMF caller in an enumeration of RTMPClLients.
>
> > > Paul, thats the one I showed you a couple weeks ago.
>
> > > I havn't been able to enter it in trac, but Im sure this error in the same
> > > one.
>
> > > ----- Original Message -----
> > > *From:* Mondain <mond...@gmail.com>
> > > *To:* red5in...@googlegroups.com
> > > *Sent:* Friday, April 09, 2010 8:12 AM
> > > *Subject:* Re: [Red5] Exception thrown in Red5
>
> > >Freddie,
> > > We're going to need a lot more information before we can troubleshoot this.
> > > Please create a ticket in trac (http://trac.red5.org/) and add all the
> > > info you have about reproducing this issue.
>
> > > Paul
>
> > > On Fri, Apr 9, 2010 at 2:56 AM,FreddieTilley<freddie.til...@gmail.com>wrote:
>
> > >> Hi we are currently running a red5 0.9.1 server on windows and we are
> > >> getting the following exception:
>
> > >> java.lang.ClassCastException:
> > >> org.red5.server.net.rtmp.RTMPMinaConnection cannot be cast to
> > >> org.red5.server.api.remoting.IRemotingConnection
> > >>        at
> > >> org.red5.server.net.remoting.codec.RemotingProtocolEncoder.encode(RemotingP rotocolEncoder.java:81)
> > >> [red5.jar:na]
> > >>        at
> > >> org.red5.server.net.servlet.AMFGatewayServlet.sendResponse(AMFGatewayServle t.java:278)
> > >> [red5.jar:na]
> > >>        at
> > >> org.red5.server.net.servlet.AMFGatewayServlet.serviceAMF(AMFGatewayServlet. java:190)
> > >> [red5.jar:na]
> > >>        at
> > >> org.red5.server.net.servlet.AMFGatewayServlet.service(AMFGatewayServlet.jav a:119)
> > >> [red5.jar:na]
> > >>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> > >> [javaee-api-5.1.1.jar:5.1.1]
> > >>        at
> > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:290)
> > >> [catalina-6.0.24.jar:na]
> > >>        at
> > >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:206)
> > >> [catalina-6.0.24.jar:na]
> > >>        at
> > >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava:233)
> > >> [catalina-6.0.24.jar:na]
> > >>        at
> > >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava:191)
> > >> [catalina-6.0.24.jar:na]
> > >>        at
> > >> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas e.java:465)
> > >> [catalina-6.0.24.jar:na]
> > >>        at
> > >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 7)
> > >> [catalina-6.0.24.jar:na]
> > >>        at
> > >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 2)
> > >> [catalina-6.0.24.jar:na]
> > >>        at
> > >> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
> > >> [catalina-6.0.24.jar:na]
> > >>        at
> > >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a:109)
> > >> [catalina-6.0.24.jar:na]
> > >>        at
> > >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> > >> [catalina-6.0.24.jar:na]
> > >>        at
> > >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
> > >> [tomcat-coyote-6.0.24.jar:na]
> > >>        at
> > >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Htt p11Protocol.java:588)
> > >> [tomcat-coyote-6.0.24.jar:na]
> > >>        at
> > >> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> > >> [tomcat-coyote-6.0.24.jar:na]
> > >>        at java.lang.Thread.run(Unknown Source) [na:1.6.0_17]
>
> > >> Now I've read on the devel mailing list that the issue was being
> > >> looked into (for 0.9.0 RC2 I believe)
> > >> My question is, is this a serious issue? We get the exception quite often.
>
> > >> The clients connecting to the server are actionscript 3.0 flash Flex
> > >> 3, and a single java based Remoting Client.
> > >> But when the exception occurs I do not know.
>
> > >> Thanks!
> > >>Freddie
>
> > > --
> > >http://gregoire.org/
> > >http://code.google.com/p/red5/
> > >http://code.google.com/p/blue5/
>
> > --http://gregoire.org/http://code.google.com/p/red5/http://code.google....

Andy Shaules

unread,
Aug 9, 2010, 11:31:20 AM8/9/10
to red5in...@googlegroups.com
Whats the service name?

'client.invokeMethod("cameraStatusUpdate", methodArgs);'

Should be something like :

client.invokeMethod("serviceName.cameraStatusUpdate", methodArgs);

Reply all
Reply to author
Forward
0 new messages