Re[Red5] d5 server works only on localhost - not from dynamic IP

2,360 views
Skip to first unread message

amman

unread,
Jul 19, 2011, 6:16:03 AM7/19/11
to red5in...@googlegroups.com

Hi everyone!

I (and 2 of my friend) started to use Red5, for our project.

I've installed Red5 0.9.1 in 2010 October, and yesterday i installed Apache
(more precisely Appserv).
Appserv is OK, i can check my index.html (which is in www folder) from an
external computer using "http://blabla.dyndns.info/" where "blabla" is my
dyndns domain, and the port which is listened by apache is 80 (default HTTP
port). So it works.
Yesterday I editted red5.properties, which contains the Red5 server
properties:

# Socket policy
policy.host=0.0.0.0
policy.port=843

# HTTP
http.host=localhost
http.port=8080
https.port=8443

# RTMP
rtmp.host=localhost
rtmp.port=1935
rtmp.io_threads=16
rtmp.connect_threads=4
rtmp.send_buffer_size=271360
rtmp.receive_buffer_size=65536
rtmp.ping_interval=1000
rtmp.max_inactivity=60000
rtmp.tcp_nodelay=true

Back in October we made a project (the project name is "room"), compiled it,
and deployed the .war file. It worked as intended, with an 123.324.454.3 fix
IP address (this IP address is fictional, the point is, that our IP was
fix).

Now i'm using dynamic IP, and that's why i needed the blabla.dyndns.info
adress.

Now the Red5 only works with localhost (With the settings above). On
blabla.dyndns.info/negyzet.swf you can reach the flash file, and it can
communicate with the Red5 server running on localhost. With
http://localhost:8080 i can reach the Red5 server (and the flash can connect
to the localhost Red5 server with
nc.connect("rtmp://localhost/room/room1");, where the "room" is the name of
the project, and "room1" is the scope's name , and the "rtmp" uses 1935 TCP
port)

But if I change the host to blabla.dyndns.info like this:
# HTTP
http.host=blabla.dyndns.info
http.port=8080
https.port=8443
# RTMP
rtmp.host=blabla.dyndns.info
rtmp.port=1935

then everything goes wrong.
I can't reach the Red5 at http://blabla.dyndns.info:8080/, i can't connect
to Red5 server in the Flash application with
nc.connect("rtmp://blabla.dyndns.info/room/room1"); .
What can be the problem? I tried to disable Windows Firewall (Win7) / ESET
Nod32, but nothing.

I made these portforwarding in my router:
public port | private port | protocol
-----------|------------|---------
80 | 80 | TCP
8080 | 8080 | TCP
1935 | 1935 | TCP

I just wanna open the Red5 server to the public, to be reachable from
anywhere with http://blabla.dyndns.info/, or to be connectable for a flash
client with nc.connect("rtmp://blabla.dyndns.info/");

The strangest thing is, when we used my 123.324.454.3 fix IP address, (from
our college) it worked as intended.

Please help me, i'm about to kill myself...

Thanks,
Amman
--
View this message in context: http://old.nabble.com/Red5-server-works-only-on-localhost---not-from-dynamic-IP-tp32089746p32089746.html
Sent from the Red5 - Interest/Users mailing list archive at Nabble.com.

amman

unread,
Jul 19, 2011, 4:57:13 PM7/19/11
to red5in...@googlegroups.com

I tried rtmpt, with half success (I used this gudie:
http://ashwinrayaprolu.wordpress.com/2011/04/04/red5-server-rtmpt-with-apache-as-webserver-and-flowplayer-configuration/
). rtmpt is very slow, and somehow it worked for me only in 1 direction.

Is there some other solution?

So the problem for the people who don't want to read the prevoius post:

Not so long ago (in 2010) there was a working Red5 server (with fix IP
address) in my college. I was able to reach it, and i was able to run my
Red5 server as well (http and rtmp server too).

Now I have an apache server on my laptop. I can reach it with
"http://blabla.dyndns.info/".
And i have a Red5 server too, but i can only reach it if it's properties the
host is localhost (so i need the "http://localhost:8080" URL to reach it
from browser, and "rtmp://localhost/myApp" string to connect to the server
in a flash application)

The first problem (it's not a big problem, just a little): if i set Red5 to
my dynamic dns address like this: http.host=blabla.dyndns.info (it in the
red5.properties; now we don't about the port, it's irrelevant) and this:
rtmp.host=blabla.dyndns.info i can't reach it from browser, and i can't
connect to the application on the server from a flash app.
And this is the second and the big problem.

I need to reach rtmp from outside of my laptop (so from the
rtmp://blabla.dyndns.info) but i can't. I tried the rtmpt solution which i
linked above.

Can someone help me?
--
View this message in context: http://old.nabble.com/Red5-server-works-only-on-localhost---not-from-dynamic-IP-tp32089746p32094731.html

Rajdeep Rath

unread,
Jul 19, 2011, 5:01:01 PM7/19/11
to red5in...@googlegroups.com
check if port is open 1935

Mondain

unread,
Jul 20, 2011, 12:53:27 AM7/20/11
to red5in...@googlegroups.com
Red5 doesn't bind to your FQDN, or maybe I should say that Mina nor Java bind to the FQDN. Binding is done on an IP address, supply the IP and it will work. With your previous configuration you have been given the false impression that it bound to the FQDN, but in actuality Java resolved the FQDN supplied and bound to the returned IP. What also may be confusing here is the webapp.virtualHosts property in your applications red5-web.properties file; it may contain FQDN's and / or IP addresses, all of which are resolved internally within Red5 itself.

I hope that helps.

Regards,
Paul

Rajdeep Rath

unread,
Jul 20, 2011, 2:51:26 AM7/20/11
to red5in...@googlegroups.com
Also if you are using dyndns, download their dynamic update client. That will map your ip to a dns name each time your ip changes automatically. This way you can always access red5 using the dns name:5080

amman

unread,
Jul 20, 2011, 5:11:56 AM7/20/11
to red5in...@googlegroups.com

Hi there!

Now i can't try the suggestions, because i can't connect to my laptop via
remote desktop somehow (in the morning i wasn't able to reach the apache
server, and it was working yesterday... Anyway I'll find out why when i'm at
home.

I'm using dydns' auto update client, it's working.
I know it because I've configured the apache with blabla.dyndns.info host
name (and port 80), and it was working as intended. Only the red5 was the
bad girl... It works only on local (the http (TCP port 8080) and rtmp (TCP
port 1935) as well...).

I'll read about this FQDN later (now i'm at work), but are you saying, that
i should add the "blabla.dyndns.info" to webapp.virtualHosts in
red5-web.properties? As i remember there is a '*' in there like this:
webapp.virtualHosts=* (and if it's like regexp it means 'anything', but
maybe i'm not correct). Or not? :O (i will check this first, now i read
something about it, maybe this is the problem)

Thank you both!

Amman

--
View this message in context: http://old.nabble.com/Red5-server-works-only-on-localhost---not-from-dynamic-IP-tp32089746p32097684.html

amman

unread,
Jul 20, 2011, 12:46:01 PM7/20/11
to red5in...@googlegroups.com

I'm at home, and the internet is OK, so i am able to sniff around the
problem.

Now apache works perfectly on port 80 (and on port 8080 as well), with my
blabla.dyndns.info address.
But red5 says no for this. I tried to set red5 to my external IP like this
(meanwhile i shutted down apache service):
http.host=188.x.x.133 (or blabla.dyndns.info)
http.port=8080 (or 80)

When i'm trying to access in browser like 188.36.194.133:8080 (or
188.36.194.133:80; or with blabla.dyndns address) nothing happens (errors:
the browser cannot connect to it (chrome); timeout (firefox)).

Can you tell me about this FQDN problem Mondain?
And i can't understand this sentence: "Binding is done on an IP address,
supply the IP and it will work". How do you mean "supply the IP"? I should
write somewhere something? :S

Thanks for your patience, waiting for you answer.

Best Regard,
Amman

--
View this message in context: http://old.nabble.com/Red5-server-works-only-on-localhost---not-from-dynamic-IP-tp32089746p32100944.html

Cristian Constante

unread,
Jul 20, 2011, 1:07:41 PM7/20/11
to red5in...@googlegroups.com
If you are behind a firewall/router, check that ports 5080, 1935 must
be redirected to your host.
Regards.

2011/7/20, amman <iqi...@freemail.hu>:

--
Enviado desde mi dispositivo móvil

*Cristian Constante*
Ingeniero de Sistemas de Información
Especialista en Telecomunicaciones
Móvil (57) 300.202.4076

Ronaldo Rigoni ...

unread,
Jul 20, 2011, 1:13:12 PM7/20/11
to red5in...@googlegroups.com
Dont miss to configure the ip 0.0.0.0 in your red5.properties, to be a dynamic IP.
Regards

[]'s,
Ronaldo Rigoni
Arquiteto de Software

amman

unread,
Jul 20, 2011, 2:54:10 PM7/20/11
to red5in...@googlegroups.com

Hi!
I'm behind a firewall (windows firewall, and nod32) and a router too. But i
did the port forwading on router and i enabled the ports 80, 8080, 5080,
1935 on firewall.

How do i mean "configure the ip 0.0.0.0 in your red5.properties, to be a
dynamic IP"?

isn't it enough to write there my blabla.dyndns.info dynamic address (like
my first post in this thread) like http.host=blabla.dyndns.info ??

And how do you mean, that some port must redirected? I forwarded them. It's
the same, right?

--
View this message in context: http://old.nabble.com/Red5-server-works-only-on-localhost---not-from-dynamic-IP-tp32089746p32101922.html

Cristian Constante

unread,
Jul 20, 2011, 4:52:22 PM7/20/11
to red5in...@googlegroups.com
Uhmmmm, i don´t think so, type localhost or 127.0.0.1 or lan ip address. Try it and tell us.

2011/7/20 amman <iqi...@freemail.hu>



--
Cristian Constante

amman

unread,
Jul 21, 2011, 2:15:33 AM7/21/11
to red5in...@googlegroups.com

Okay guys. Now i'm confused. I used my LAN IP for Red5. With portforward it
worked like hell, now i have configured it, and it's working beautiful (i
can access to red5 http, and rtmp as well).

It seems, i have to read more about portforwarding and web services.

Thanks for everyone!

--
View this message in context: http://old.nabble.com/Red5-server-works-only-on-localhost---not-from-dynamic-IP-tp32089746p32105125.html

Reply all
Reply to author
Forward
0 new messages