Skip navigation
6882 Views 8 Replies Latest reply: Sep 9, 2008 3:47 AM by klogger RSS
Bronze 39 posts since
Sep 5, 2008
Currently Being Moderated

Sep 8, 2008 2:53 AM

Red5, http bind with ssl

I am struggling a bit to find out any information about the problem I am having. I have the red5 plugin working on the http bind port of 8080 but I would like to get it working on SSL. In the openfire http bind setting page I have tried setting the ssl port to 8443 but when red5 is running I get this:

 

Error creating bean with name 'rtmpt.server' defined in class path resource [red5-core.xml]: Invocation of init method failed;

 

as well as several net.BindAddress errors in my openfire warn.log:

 

2008.09.08 00:35:56 failed SelectChannelConnector@0.0.0.0:8000
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind(Native Method)

 

In the openfire error log I get this repeating several times after I try and set the ssl port in the openfire web interface:

 

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Server' defined in class path resource [red5-rtmpt.xml]: Invocation of init method failed; nested exception is java.net.BindException: Address already in use
Caused by: java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind(Native Method)

 

Digging through the source code of the bean with id="rtmpt.server" (red5-core.xml) is this:

 

Server rtmptServer = (Server) appCtx.getBean("Server");
rtmptServer.start();

si it looks like the 'server' bean is the root of the problem.

 

I have tried changing the bean with id="server" port values but it didn't help.

 

The port does get set in the openfire database under the key httpbind.port.secure but it is always '0' after I reboot openfire in the web interface.

 

I can see in the red5-rtmpt.xml file that there is a section to uncomment for SSL. I haven't done that and I am a littel unsure of what I am doing so any advice would be appreciated.

 

If I remove the red5 plugin everything seems to go OK but I am unsure how to prove that. I can hit localhost:8443 and be given a 404 which is what I would expect without red5 running.

 

Could anyone please provide any suggestions or hints?

  • Septimusx Bronze 42 posts since
    Sep 5, 2008
    Currently Being Moderated
    Sep 8, 2008 10:10 AM (in response to klogger)
    Re: Red5, http bind with ssl

    I am pretty sure that the 'address already in use' message means that you are attempting to use the same port for two different things.  I had a similar problem when attempting to start openfire and found that I was trying to use the same port for client login as was already assigned for flash cross domain.  Sounds like you have already checked some of this out but if things work without the red5 plugin it seems to me that it (red5) is trying to using a port that openfire may already be using for something obscure.  Hope this helps or jogs some random ideas anyway.

      • Septimusx Bronze 42 posts since
        Sep 5, 2008
        Currently Being Moderated
        Sep 8, 2008 10:41 AM (in response to klogger)
        Re: Red5, http bind with ssl

        Frankly I don't know what the flash cross domain is either but you can see it under server information on the server manager tab in the admin console.  I don't know where it is set and it is probably a default since I didn't set it.  It doesn't matter if java isn't using your port it could be another process.  I would do a sudo netstat -l to see all the ports that are being listened on, it's probably something else using your port.  You may want to try this when you have red5 installed and when you don't to see what changes.  I have also found nmap to be helpful when I want to know what ports I have available and what is running on them.  for example running nmap against my localhost (127.0.0.1) gives me this result;  ( i ran a port scan -sS against myself 127.0.0.1 for ports ranging 1 thru 10000 -p 1-10000)

         

        [root@linux10 sparkweb]# nmap -sS 127.0.0.1 -p 1-10000

         

        Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2008-09-08 13:35 EDT
        Interesting ports on localhost.localdomain (127.0.0.1):
        (The 9981 ports scanned but not shown below are in state: closed)
        PORT     STATE SERVICE
        21/tcp   open  ftp
        22/tcp   open  ssh
        25/tcp   open  smtp
        80/tcp   open  http
        111/tcp  open  rpcbind
        443/tcp  open  https
        631/tcp  open  ipp
        3306/tcp open  mysql
        4750/tcp open  unknown
        5222/tcp open  unknown
        5223/tcp open  unknown
        5225/tcp open  unknown
        5229/tcp open  unknown
        5269/tcp open  unknown
        7070/tcp open  realserver
        7443/tcp open  unknown
        7777/tcp open  unknown
        9090/tcp open  zeus-admin
        9091/tcp open  unknown

         

        Nmap run completed -- 1 IP address (1 host up) scanned in 6.680 seconds

         

        This gives you a lot of info as to what is running on what ports on your machine.  again you may wish to run this when red5 is installed and again when it isnt.  nmap can be found at insecure.org

         

        hope this helps

          • Septimusx Bronze 42 posts since
            Sep 5, 2008
            Currently Being Moderated
            Sep 8, 2008 11:26 AM (in response to klogger)
            Re: Red5, http bind with ssl

            I would agree with what your thinking.  If I remember right anytime that openfire had a port conflict it just would not let me in at all even if  the conflict was not I the port I was trying to use.  I have to make sure that none of my ports conflicted.  I hope I have helped but I am afraid you have reached the limit of my useful information.  Good luck to you.

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points