Red5 plugin help

I’m on a FreeBSD 6.4-Stable system. Have run Openfire & FastPath w/ Spark for some time. Currently Openfire 3.6.2. Installed SparkWeb last night with little difficulty, but wanted the additional FastPath features the Red5 plugin supports. I downloaded the red5-0.1.04.zip and copied the war into the plugins directory. Started OpenFire back up and it extracted correctly into a red5 directory. I rebuilt the codecs from src and placed asao2ulaw into the parent codec directory as specified. Verified HTTP Bind is set to 7070 and the system is now listening on that port (verified via netstat). I go to http://www.mysite.com:7070/red5/index.html and get:

HTTP ERROR: 404

NOT_FOUND

RequestURI=/red5/index.html

Powered by Jetty://

My error.log shows:

2008.12.06 00:32:36 [org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.jav a:507)] Error loading plugin: /usr/local/share/java/openfire/plugins/red5
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java :385)
at org.jivesoftware.openfire.container.PluginManager.access$300(PluginManager.java :47)
at org.jivesoftware.openfire.container.PluginManager$PluginMonitor.run(PluginManag er.java:1032)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101 (ScheduledThreadPoolExecutor.java:65)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodi c(ScheduledThreadPoolExecutor.java:142)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Schedu ledThreadPoolExecutor.java:166)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)

No other errors in other logs or anything relevant. Would appreciate any advice or assistance on how to correct and what to do from here. Thanks.

I realized I was running java 1.5 and 1.6 is a requirement here, so I updated that. The plugin then loaded and is now showing in OpenFire! Still, however not working (can’t access via :7070/red5/index.html) and the error changed…but it’s a stepforward. I did also rebuild OpenFire after the java upgrade.

error.log

2008.12.06 01:36:04 [org.jivesoftware.util.log.util.CommonsLogFactory$1.error(CommonsLogFactory.jav a:92)] Context initialization failed
org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition. Group resource
name [classpath*:beanRefContext.xml], factory key [default.context]; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from
URL [file:/usr/local/share/java/openfire/plugins/red5/WEB-INF/classes/beanRefContex t.xml]; nested exception is
java.lang.IllegalArgumentException: Class [org.springframework.jndi.config.JndiNamespaceHandler] does not implement
the NamespaceHandler interface
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML
document from URL [file:/usr/local/share/java/openfire/plugins/red5/WEB-INF/classes/beanRefContex t.xml]; nested
exception is java.lang.IllegalArgumentException: Class [org.springframework.jndi.config.JndiNamespaceHandler] does
not implement the NamespaceHandler interface
Caused by: java.lang.IllegalArgumentException: Class [org.springframework.jndi.config.JndiNamespaceHandler] does not
implement the NamespaceHandler interface

In addition there is now this in the warn.log:

2008.12.06 01:40:57 Committed before 404 null
2008.12.06 01:40:57 /red5/index.html
java.lang.IllegalStateException: Committed
at org.mortbay.jetty.Response.resetBuffer(Response.java:995)
at org.mortbay.jetty.Response.sendError(Response.java:240)
at org.mortbay.jetty.Response.sendError(Response.java:340)
at org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:398)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollect ion.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.j ava:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

You could try changing your http bind in openfore to 8080 and then connect port 8080 like http://yoiurdomain:8080/red5/ also check your file permissions or just try this address http://yourdomain:7070/red5/red5.html

HTTP ERROR: 503

SERVICE_UNAVAILABLE

RequestURI=/red5/red5.html

Powered by jetty://

I had seen the http bind port issue raised in a few other discussions, so I had already actually attempted that. Changed port to 8080, saved, verified (netstat showed 7070 was no longer being listened on and 8080 now was). Tried again to access with the same results. Restarted server with same results. Verified red5 and all subdirectories in the plugins folder are owned by the openfire user and it has full rwx, so it should have complete access, but still fails. I know the plugin is loaded and showing in the control panel on 9090, and http bind is working and listening. But for some reason the red5 http service isn’t being registered or loaded. It’s beyond me at this point.

Do you have the red5 server installed on the same computer as the openfire with the red5 plugin if not install and start you can get the red5 server from

here

I have a red5 server going on a Tomcat 6 server as well and it’s accessible at http://www.myvbtc.org:8081/red5/ and appears to be working. http://www.myvbtc.org:7070/red5/ (the openfire http bind) therefore still doesn’t work. I would assume that the Openfire plugin needs to connect to this then and it’s on 8081 instead of what it should be. However, if changing the http binding to 8081, then 2 servers would try listening on the same port. I guess I’m confused here on what should be connecting to what and where. Is there a back connection between a standalone Red5 server and the Openfire plugin? I was under the assumption it was fully functional without the standalone. Sorry for the ignorance, but trying to work it out. And yes, it’s all on the same BSD server. Thanks for your continued help Bruce.

ok next we test you flash media can you make an it works test.htm file as simple a one as you can then nav. to that file and see if you get a page now that your java is up to date we need to test if it is being stop from your systems flash binary .If you test.html file shows then it is you flash midea not working right.PS chmod 777 your red5 file as it is being accessed remotely

I created a test.html consisting of straight html and nothing else in openfire/plugins/red5/. I get the same 503 on http://www.myvbtc.org:7070/red5/test.html. The file is 777, as is the directory and owned by openfire. netstat still shows openfire is listening on 7070 for the http bind.

If I put the test.html in the tomcat red5 server (/usr/local/apache-tomcat6.0/webapps/red5/test.html), it works: http://www.myvbtc.org:8081/red5/test.html

your java is working your permissions are right do you have adabe flash installed in your open BSD system if not try installing then restart your computer and try again and also make sure your red5 server is running by using your cammnd line terminal to run the start command if you are using red5 .0.7 server it dos not install into services so it mite not be starting when you start your computer and mite not be running

I’m a bit confused on this one. I installed all the prerequisites as listed to run red5. (apache-tomcat-6.0.16, diablo-jdk-1.6.0.07.02_3, inputproto-1.4.2.1, javavmwrapper-2.3.2, kbproto-1.0.3, libICE-1.0.4_1,1, libSM-1.0.3_1,1, libX11-1.1.3_1,1, libXau-1.0.3_2, libXdmcp-1.0.2_1, libXext-1.0.3,1, libXi-1.1.3,1, libXp-1.0.0,1, libXt-1.0.5_1, libXtst-1.0.3_1, pkg-config-0.23_1, printproto-1.0.3, recordproto-1.13.2, xextproto-7.0.2, xproto-7.0.10_1) As far as the red5 on the Tomcat side, everything appears to be fine and working. On the Openfire side, however, I can’t access anything anywhere. It’s if the http bind is there and working, but not seeing anything. I’m not even sure if there is an Adobe Flash version for FreeBSD, but pretty sure I don’t have it. Just took a quick look for it in ports and it’s not there, so nothing easily installable either. I really don’t want to have to install anything commercial, which is one of the primary reasons I wanted to go this route. I thought red5 was the flash server…but again…confusion is setting in.

I have run openfire with red5 on both window and linux freeBSD is same as linux so use this flash is simple to install extract and openthe click the sh select run in terminall and it will install it self in linux and BSD you can get here

I have never run red5 in the tomcat always in the openfire plugins otherwise you will have connection problems

Tried the linux flash player install.

ERROR: Your operating system is not supported by the
Adobe Flash Player installer.

My clients are all windows boxes and do have flash. They seem to run sparkweb (the non-red5 version) fine and the flash works from the openfire server. The server is of course remote and I’m not connecting from it locally.

I did in the meantime move over some of the openfire specific apps to the tomcat server to see if they’d run and they for the most part do. I haven’t tested SIP functionality, and it’s giving a red5/viewer error (which doesn’t seem to be anywhere) but it’s a step forward. I did log into the red5 sparkweb version from there and at least saw the added functionality. http://www.myvbtc.org:8081/red5/red5.html Although I was really hoping to keep the red5 on openfire alone.

I think you will find both applications will fight for port 1935. If you do not get the red5 web service, it means the embedded red5 server inside the Openfire Red5 plugin has failed. We need to find out why?

Thank you Dele. I have no idea what I did, but I removed everything…all of red5 from Tomcat and removed the openfire red5 plugin. I shut down the Tomcat6 server altogether. Reloaded the openfire plugin. Started openfire up…and now the service is working on 7070. I’m still not sure exactly waht had happened, as I had the plugin going (and not working) before I tried the Tomcat way…but it appears to be resolved now. Started up Tomcat (without red5) and everything seems to still be working. So I better not touch it anymore. Thank you.

I believe I found it now, however. This last time (when everything worked) it appears openfire/red5 took over port 8000, which is reserved on my system for a streaming audio/radio server. I haven’t found where port 8000 is set, but that seems to be the difference. But for me, it’s not a good scenerio. I have to have the radio going.

Look at WEB-INF\classes\red5-rtmpt.xml







Change port number or comment out the whole section