red5-shutdown.sh not working

170 views
Skip to first unread message

Dominic Williams

unread,
Nov 1, 2011, 10:27:00 AM11/1/11
to red5in...@googlegroups.com
Hi,

With the builds since July 28 (r4259) some people may had problems with red5-shutdown.sh not working e.g.

java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint]
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:340)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
at org.red5.server.Shutdown.main(Shutdown.java:91)

The problem is caused by the inclusion of the rmiAdapterHost in the Shutdown code.

Reversing changes in src/org/red5/server/Shutdown.java as follows will fix problem

/*

if (null == args || args.length < 1) {

System.out.printf("Attempting to connect to RMI %s:9999\n", rmiAdapterHost);

url = new JMXServiceURL("service:jmx:rmi://" + rmiAdapterHost + ":9999/jndi/rmi://" + rmiAdapterHost + ":9999/red5");

} else {

System.out.printf("Attempting to connect to RMI %s:%s\n", rmiAdapterHost, args[0]);

url = new JMXServiceURL("service:jmx:rmi://" + rmiAdapterHost + ":" + args[0] + "/jndi/rmi://" + rmiAdapterHost + ":" + args[0] + "/red5");

if (args.length > 1) {

env = new HashMap<String, Object>(1);

String[] credentials = new String[] { args[1], args[2] };

env.put("jmx.remote.credentials", credentials);

}

}*/

env = new HashMap<String, Object>(1);

String[] credentials = new String[] { args[1], args[2] };

env.put("jmx.remote.credentials", credentials);

url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://:9999/red5");


Anyone out there know why JMX connection to localhost is failing on some machines? Maybe JMX is not binding to localhost or something?

Best, Dominic
Reply all
Reply to author
Forward
0 new messages