Ticket #862 (closed Bug: Fixed)

Opened 18 months ago

Last modified 17 months ago

red5-shutdown.bat does not correctly stop red5 on windows

Reported by: Squall867 Owned by: mondain
Priority: Major Component: App Server
Version: Keywords:
Cc:

Description

Hi, I know many people already ask this, but I cannot find any good examples and I'm getting crazy! I just want to make a simple sum function: client gives a and b, and the server returns a+b.

This is my server source(project name is myRed5):

package org.red5.core;

//imports

public class Application extends ApplicationAdapter {

/** {@inheritDoc} */
@Override
public boolean connect(IConnection conn, IScope scope, Object[] params) {

appScope = scope;
System.out.println("Receive connection from: "+conn.getHost());
return true;

}

public int sum(int a,int b){

return a+b;

}

/** {@inheritDoc} */
@Override
public void disconnect(IConnection conn, IScope scope) {

super.disconnect(conn, scope);

}

}

And in client I call it this way:

var conn:NetConnection = new NetConnection();
conn.connect(" rtmp://localhost/myRed5");
conn.call("sum",handler,(4,5));

Server side i get a Method sum with parameters[4] not found in org.red5.core.Application@5b642c

How can I solve this??

Change History

Changed 18 months ago by Squall867

  • priority changed from Minor to Major

Ok, solved: I just had to restart server.
Anyway there IS a bug, when starting red5 in eclipse: at least on windows 7 the shutdown scripts is not working! The server stops but, if you go see in windows active processes, you'll find a java32.exe process running and this is red5 server!
Indeed, if you don't forcely stop this process, at the 2nd red5 start you'll get a "adress and port already bound".

Changed 18 months ago by azack

  • summary changed from Problem with remote call: no method is found to red5-shutdown.bat does not correctly stop red5 on windows

Updating summary to reflect change in comment

Changed 17 months ago by mondain

  • status changed from new to closed
  • resolution set to Fixed

The scripts are not meant to be run from inside eclipse. If you want to an ez was to start, stop and debug in eclipse we suggest that you use the Red5 plugin. If you insist upon stopping red5 from inside eclipse without the plugin, just look at what the Shutdown class does and launch it from inside eclipse.

Note: See TracTickets for help on using tickets.