开发者

Red5 Problem with connecting from remote client

开发者 https://www.devze.com 2023-02-25 18:11 出处:网络
So I have this issue. The issue is I am unable to connect to my red5 server from a remote client. I also have not found any tutorials on how to install red5 so that remote clients can connect to it. H

So I have this issue. The issue is I am unable to connect to my red5 server from a remote client. I also have not found any tutorials on how to install red5 so that remote clients can connect to it. However, here is what I have d开发者_开发问答one...

Inside My MXML Flex File I try to connect to the computers IP that the server is running on(My Server is running from within Eclipse). The line for connecting looks like this netConnection.connect(rtmp://192.168.2.12/myApp, true); All that happens is after a lot of minutes go by, I just get NetConnection.Connect.Failed and there is no log being output by Eclipse. Almost like it never even registers the connection that the remote client is trying to make.

The other interesting thing is that I am ABLE to connect to my Red5 Server using a different computer within my local home network just fine. But only when it is remote I am unable to connect.

I have changed my Red5-web.properties file and added this... webapp.contextPath=/myApp webapp.virtualHosts=*, 127.0.0.1, localhost, 192.168.2.14, 174.122.104.3 The 174 one is my website where the Flex Swf Resides on.

I think maybe somehow my computer is not setup or configured to allow these remote connections and is rejecting them or something, I'm not quite sure why a remote client can't connect. Does anyone have any idas?

Your help is greatly appreciated.


You may uninstall the red5 and reinstall it.

When it ask you the server ip address type your server's LAN adress (192.168.2.* or 10.0.0.* whatever). This solved my problem.


In my opinion, if you have at least one domain name that you own, the best way for you to go is to set up an Apache Http Server to your server machine, and create subdomains for both red5, rtmp and rtmpt. Make the Apache handle your incoming requests, and decide their correct routing there.

In case you don't own a domain, or the previous way is too time-taking to set up and get it work, you should just make sure that the ip address you're trying to connect to is not an internal IP.

In your example above you are trying to connect from the client to a 192.168... address. If you try to connect to it from within your LAN, it works, since that ip there is registered to your machine.
But when you take your notebook to your neighbor, and using his internet connection to access your site and connect to red5, the client (flex application) will also try to connect to that 192.168..., and your neighbor's router has no idea about your LAN, probably it doesn't have such an internal IP address either, but SURELY cannot connect to your server.

So instead of using 192.168... in your connection string, you should try using your external IP address (the 174... one):

netConnection.connect("rtmp://174.122.104.3/myApp", true);

This will work always, as far as you have a static IP address.

Also make sure, that your red5 server is accessible over the 80 port, or if it's not, specify the correct port number there.


For that you can do following thing... These steps I took and it's solved my problem...

1.During the installation, you must have given ip 127.0.0.1 (localhost) and port :5080
2.firstly open the port (5080 and  1935) on firewall. 

Visit http://windows.microsoft.com/en-in/windows/open-port-windows-firewall#1TC=windows-7

3.Now to go red5->conf->red5.properties and open this file in notepad++. (or any other editor)
4.repalce http.host and rtmp.host ip with your ip address (ipv4)
5.start the red5 service.
6.Now check http://yourip:5080

It will start working, and you can access it from other system also (in the same network Obviously )

0

精彩评论

暂无评论...
验证码 换一张
取 消