msgbartop
Various ramblings-on, mostly about Red5
msgbarbottom

25 Jun 08 Bind exception

I've seen a few posts on the Red5 list where users encountered the "bind" exception when starting Red5; I just had it happen on my PC. Usually its a service running on your machine taking up port 80 (HTTP), port 443 (HTTPS), or 1935 (RTMP). This normally means that IIS, Apache, FMS, or Red5 are running and already bound to these ports; 99% of the time I don't see this issue because of the tight lock I keep on my running services. Today I got the exception and I traced it to Pidgin (an IM client like Trillian that does "them" all), the odd thing is that it was using port 1935 (RTMP). If you get the bind issue, check your running processes and kill-off or reconfigure them as needed. Using the following commands will show your bound ports:
in windows
netstat -an
in linux
netstat -pan
The linux command will give additional details such as the application/service name. For windows you can use TcpView or some similar application to determine the application holding the port.


View this Post in: Chinese(S) Chinese(T) French Arabic Bulgarian Croatian Czech Danish Dutch Finnish German Greek Hindi Italian Japanese Korean Norwegian Polish Portuguese Romanian Russian Spanish Swedish

Tags: , , , ,

12 Jun 08 Bootstraping Red5

Even being part of the Red5 development team, I always found adding or changing libraries a pain. To alleviate this I created a Bootstrap class. Its purpose is to look in the red5/lib directory and grab urls for all the jars contained therein and add them to a classpath. I have also added logic to keep only the most recent versions of libraries, although this logic could use some work and is not perfect. The code will miss libraries with slight name changes such as: jcl104-over-slf4j-1.5.0.jar vs. jcl-over-slf4j-1.5.2.jar.

Red5 previously had two ways to start up: standalone and war. The standalone method uses the classpath embedded in the /META-INF/manifest.mf located in the red5.jar; if your library was not listed here your application would not work, unless you placed it within your applications classpath. Your application classpath would consist of any class residing in your /WEB-INF/classes directory or in a jar located in your /WEB-INF/lib directory.

The bootstrap method of start up should also allow you to share libraries amongst your applications, I have found problems with some libraries like Hibernate but most issues seem to be resolved by updating Spring to 2.5. If you have problems you can always move the jar to your applications lib directory. So without further ado, here is how you launch Red5 using the bootstrap class:

java -Djava.security.manager -Djava.security.policy=conf/red5.policy
-cp red5.jar org.red5.server.Bootstrap

Note: The Bootstrap class is only available in version 0.7.1 and later


View this Post in: Chinese(S) Chinese(T) French Arabic Bulgarian Croatian Czech Danish Dutch Finnish German Greek Hindi Italian Japanese Korean Norwegian Polish Portuguese Romanian Russian Spanish Swedish

Tags: