Groups | Blog | Home
all groups > macromedia flash flashcom > november 2006 >

macromedia flash flashcom : fms doesnt work when i give my external ip



boliz
11/6/2006 12:00:00 AM
hi,
i installed FMS 2 and find it very easy to record and publish video steam, it
all works fine on my local computer.
when i open the ports 1935 in my router and open the fire wall to it i am
still unable to contact to the server
from the web, i insert the right ip (from whatismyip) in the client app and
tried to connect via rtmp to my computer
...nothing!!! localy it works!! remote no!!
please i need your help!!
mm_patrick
11/6/2006 12:00:00 AM
For troubleshooting you should configure FMS to work on port 80 and also try
with rtmpt. There still may be something blocking rtmp traffic somewhere.

Also, it would be wise to extend your client to be more verbose on the errors,
are you familiar with this?

boliz
11/6/2006 1:00:24 PM
where i need to change the port ? in the server.xml in the client and where
alse?
my iis configure on this port is it going to work this way? i need to make a
virtual folder to the application form the iis this way?
[Q] more verbose on the errors[/Q] - by using fault events and handlers, yes i
will add them.
to change to rtmpt protocol i only change the rtmpt to rtmp?
thanks
Boaz

boliz
11/6/2006 1:00:46 PM
where i need to change the port ? in the server.xml in the client and where
alse?
my iis configure on this port is it going to work this way? i need to make a
virtual folder to the application form the iis this way?
[Q] more verbose on the errors[/Q] - by using fault events and handlers, yes i
will add them.
to change to rtmpt protocol i only change from rtmpt to rtmp?
thanks
Boaz

boliz
11/6/2006 1:00:47 PM
where i need to change the port ? in the server.xml in the client and where
alse?
my iis configure on this port is it going to work this way? i need to make a
virtual folder to the application form the iis this way?
[Q] more verbose on the errors[/Q] - by using fault events and handlers, yes i
will add them.
to change to rtmpt protocol i only change from rtmpt to rtmp?
thanks
Boaz

mm_patrick
11/6/2006 1:22:39 PM
No, IIS is in no way related to Flash Media Server - actually the presence of
IIS may be a problem. FMS is a streaming media server, not a web server. The
best is to shut IIS off entirely or have it run on a port which is not used by
FMS at all.

There are two ways to edit the ports:

1. the quick & easy way (if you haven't touched the Adaptor.xml yet and if you
want to be able to change this back quickly)
go to FMS.ini and find this line:
ADAPTOR.HOSTPORT = :1935
(should be line 66)
to
ADAPTOR.HOSTPORT = :1935,80

2. The better way (= editing Adaptor.xml)

To change the ports, go to your Adaptor.xml (located in
FMS_ROOT/conf/_defaultRoot_) and edit this line (around ln 42)
<HostPort name="edge1" ctl_channel=":19350">${ADAPTOR.HOSTPORT}</HostPort>
the best configuration (performance-wise) if you want to run on multiple ports
is to assign internal ports for each of the communication ports, so replace the
above line with:
<HostPort name="edge1" ctl_channel=":19350">:1935</HostPort>
<HostPort name="edge2" ctl_channel=":19351">:80</HostPort>
(in that case the setting in fms.ini will be ignored - I usually cross-comment
this in fms.ini)

Please note that the [i]HostPort[/i] name and [i]ctl_channel[/i] parameters
need to be unique. Once you've made either of the changes, please restart your
server and watch the log files. If your server responds on both ports, you're
doing fine.

Let me know how this goes.


By the way - this is probably a good time for you to check out
flashmediaserver_managing.pdf in the documentation directory ;)


boliz
11/6/2006 3:03:34 PM
thank you for helping me...i am nit giving up on this!! here is the thing:
1. i took your option 1 change the ports in the fms.ini
2. i shut down iis
3. i changed the protocol to rtmpt on the client.
4. i shut down the fire wall of my net card.
5. i open this ports on my roter: 1935,80,1111,...
and still https://www.secure.telemz.co.il/test.html
do not register to my admin panel and do not transfer data
(i am adding fault event handlers now to see what they throw )
any idea?
mm_patrick
11/6/2006 5:50:23 PM
Make sure you print out everything (not just faults).

I left you a private message.
TheOnly
11/6/2006 6:58:49 PM
mm_patrick
11/7/2006 12:00:00 AM
Hi TheOnly,

please give us more details about what the issue is.
It's advisable to create a small test client that gives you more verbose error
messages about what exactly is going wrong - I've just sent out the same code
to Boliz and anonymized it to post this in public so you can incorporate this
into your code if you haven't already done so. Please also check the devnet on
better code on NC handling - the following is basically a quick hack ;)


var my_nc:NetConnection = new NetConnection();
my_nc.connect("rtmp://yourhost/yourapp");
var subscribe_ns;

// when the NetConnection fires a status event, handle it;
// i.e. instantiate the NetStream when the connection succeeded;
// handle the error if not . That way you make sure that the netstream is only
initialized when a connection has been
// established.
my_nc.onStatus = function(info) {
// put in a TextArea component and call it trace_txt.txt to print out trace
messages in your test client
// later, you may want to put in a more sophisticated solution with
// functions to handle different success and error events,
// e.g. re-connect attempts.
trace_txt.text += "** NetConnection onStatus" + newline;
for(var p in info) {
trace_txt.text += " " + p + " : " + info[p] + newline;
}
if(info.code == "NetConnection.Connect.Success") {
// when connection is successful,
// create a stream to playback.
createStream(my_nc);
}
}
function createStream(my_nc) {

subscribe_ns = new NetStream(my_nc);

// my_video is a Video component on your stage
my_video.attachVideo(subscribe_ns)
subscribe_ns.play("sample_flv_movie");

subscribe_ns.onStatus = function(info) {
trace_txt.text += "** Stream onStatus" + newline;
for (var prop in info) {
trace_txt.text += " " + prop + " : " + info[prop] + newline;
}
// sample code for buttons
if(info.code == "NetStream.Play.Stop") {
// play_status = "stop";
//play_btn.label = "Play Video";
}

if(info.code == "NetStream.Play.Start") {
// play_status = "play";
// play_btn.label = "Pause";
}
}
}

TheOnly
11/7/2006 8:41:04 PM
I must be missing something....i grabbed the code you posted, changed the rtmp
address and this: subscribe_ns.play("test.flv");
I named my flvPlayBack component my_video yet I see no output at all in the
output window. I also created a text box called trace_txt.txt and nothing
appears in there either....

where am I wrong?

Thanks for your help on this.
boliz
11/7/2006 9:34:07 PM
hi,
after trying testing your code i am getting:

** NetConnection onStatus
level : error
code : NetConnection.Connect.Failed

when i am run this with my ip 89.0.146.191
i am locally transmitting video and i see that it is record in the admin panel
but when i try to run boazclient i am getting that error massage
you can download the file i am using here
http://www.secure.telemz.co.il/boazclient.html
and see the error ( it takes time to connect to my ip this is home computer)
what i can do next?

TheOnly
11/7/2006 9:41:17 PM
boliz
11/7/2006 9:47:33 PM
unbelievable!!!
thank you so much!!
flash_nub
11/14/2006 3:49:49 AM
[q][i]Originally posted by: [b][b]boliz[/b][/b][/i]
unbelievable!!!
thank you so much!!
Patrick you did it!! you are great!![/q]

Can you post what you did to solve the issue? I am having the same issue
here. I traced the problem to be a connection issue, but don't know where/what
to do to solve it. I disabled Windows Firewall and still won't work. I tried
using "rtmpt" and get connection failed.








Jay_student
1/30/2007 11:01:27 PM
[Q]Can you post what you did to solve the issue? I am having the same issue
here. I traced the problem to be a connection issue, but don't know where/what
to do to solve it. I disabled Windows Firewall and still won't work. I tried
using "rtmpt" and get connection failed.[/Q]

Same probleem here, turned of my XAMPP uploaded the tester a webserver and
tried to connect to rtmp://myip/myapp
But i dind't even get a netconnection.failed

Windows FireWall is of and FMS is going over 1935 and 80

I'm lost...
calmchess333
2/1/2007 3:36:16 PM
ummm there isn't a problem with fms configuration it seems to me that "walmart
routers" hate opening the FMS ports for some reason unknown to me I tried to
get mine to work for two days and couldn't get it done finally I unplugged my
router and connected directly into the modem and everything worked fine....this
really wasn't a problem for me becuase I run a firewall and intrusion detection
software which has the same functionality as the router including NAT.
Jay_student
2/1/2007 3:41:03 PM
213joey
2/8/2007 9:46:05 AM
http://myinteryou.net/bill/TestStateButtons.html

I cannot seem to get this to record and I think it is the rtmp address. I did
the above things like in the adaptor.xml file and It will not work.
what is the deal, MAN, this is a lot of hours. my brain is tired please help
also. it is almost there I can feel it, it just needs to commect to the FMS
server from the remote server WHY! I did put the allow web with IP address in
the adaptor.xml file
213joey
2/8/2007 9:47:45 AM
Jay_student
2/8/2007 2:13:33 PM
Could it be possible that my internet provider is blocking does ports?
skyMan707
3/1/2007 11:07:02 PM
I have installed the developers version of FMS on my home PC and I have
developed small application from the various tutorials. Everything works fine
when using it locally. My problem is exactly as described in this thread to
this point. The connection is failing when connecting from a flash client
running on external web server! i have checked and double-checked the settings
and different ways to use the rtmp: and rtmpt: i have even put to echo the
error messages. When trying to connect from external site always getting:
NetConnection.Connect.Failed

I do have a wireless router installed on my local PC where the FMS server is.
I have tried editing fms's xml files (only the allow tags), restarting the
server, etc. and everything else under the sun!! PLEASE HELP!!! spent many
days on this!!
I have not seen many others posts on this type of problem....
calmchess333
3/2/2007 6:34:43 PM
I finally have answer to all of you who are seeking this question.


When the Flash Player encounters the connect() method, it attempts to connect
to your FCS following a very specific pattern. It first attmpts to connect
over port 1935, then port 433, then port 80 and then it automatically attempts
to tunnel through by sending rtmp data over http also called RTMPT it turns
out the automatic sequence of attempts is fine for many situations however you
may find some users can't make a connection (well , the NetConnection can't)
because their firewall blocks data from traveling through port 1935. If those
users can connect to any website surely they can use port 80 .And even if their
setup blocks rtmp surely they can use RTMPT over port 80 because its really
just plain http ...you might think the final attempt by flash player RTMPT on
port 80 to be failsafe however the problem is that if you are running your
webserver on the same machine as FMS then they can't both use port 80 at the
same time....a perfectly legitimate solution is to use to computers one for the
webserver and one for FMS ......two computers probably means you need to
specify the domain in your rtmp (rtmp://mydomain.com/video).

To force the flash player to try to connect through a specific port other than
the defaults as specified above.....write rtmp as
.....my_nc.connect("rtmp::8500/mydomain.com/video);

FlashMX2004 by Phillip Kerman
calmchess333
3/2/2007 6:35:46 PM
I finally have answer to all of you who are seeking this question.


When the Flash Player encounters the connect() method, it attempts to connect
to your FCS following a very specific pattern. It first attmpts to connect
over port 1935, then port 433, then port 80 and then it automatically attempts
to tunnel through by sending rtmp data over http also called RTMPT it turns
out the automatic sequence of attempts is fine for many situations however you
may find some users can't make a connection (well , the NetConnection can't)
because their firewall blocks data from traveling through port 1935. If those
users can connect to any website surely they can use port 80 .And even if their
setup blocks rtmp surely they can use RTMPT over port 80 because its really
just plain http ...you might think the final attempt by flash player RTMPT on
port 80 to be failsafe however the problem is that if you are running your
webserver on the same machine as FMS then they can't both use port 80 at the
same time....a perfectly legitimate solution is to use to computers one for the
webserver and one for FMS ......two computers probably means you need to
specify the domain in your rtmp (rtmp://mydomain.com/video).

To force the flash player to try to connect through a specific port other than
the defaults as specified above.....write rtmp as
.....my_nc.connect("rtmp::8500/mydomain.com/video);

FlashMX2004 by Phillip Kerman
calmchess333
3/2/2007 6:36:40 PM
I finally have answer to all of you who are seeking this question.


When the Flash Player encounters the connect() method, it attempts to connect
to your FCS following a very specific pattern. It first attmpts to connect
over port 1935, then port 433, then port 80 and then it automatically attempts
to tunnel through by sending rtmp data over http also called RTMPT it turns
out the automatic sequence of attempts is fine for many situations however you
may find some users can't make a connection (well , the NetConnection can't)
because their firewall blocks data from traveling through port 1935. If those
users can connect to any website surely they can use port 80 .And even if their
setup blocks rtmp surely they can use RTMPT over port 80 because its really
just plain http ...you might think the final attempt by flash player RTMPT on
port 80 to be failsafe however the problem is that if you are running your
webserver on the same machine as FMS then they can't both use port 80 at the
same time....a perfectly legitimate solution is to use to computers one for the
webserver and one for FMS ......two computers probably means you need to
specify the domain in your rtmp (rtmp://mydomain.com/video).

To force the flash player to try to connect through a specific port other than
the defaults as specified above.....write rtmp as
.....my_nc.connect("rtmp::8500/mydomain.com/video);

FlashMX2004 by Phillip Kerman
skyMan707
3/2/2007 9:20:02 PM
Thanks for the detailed explanation. Unfortunately it did not still work!!
Let me explain my landscape and perhaps it may trigger something in someone's
mind.

i) I have an cable internet connection (from ISP) to my Router. (The router is
a wireless-N Broadband router model WRT300N).

ii) From the router i have a direct cable connect to the desktop PC. On this
PC, I have installed the FMS2. All my test applications work properly when i am
doing the testing from this PC. For example, I use rtmp:/livecast to
test a webcam conferencing test appliaction (swf file).
rtpmp:localhost/livecast also works, rtmp:1935/livecast also works, etc.
livecast being my test application. I have a connect to address text field
into which i enter the rtmp address - so i do not have to keep recompiling my
swf file!
(Please Note: there is NO webserver running on this PC only FMS2). When i do
ipconfig, i get an IP address xxx.xxx.x.100 (xxx to mask my actual address)

iii) I have a notebook, which has a wireless card. (IP address xxx.xxx.x.101).
I have copied the same swf file to my notebook which i used on the PC.
There is NO webserver or FMS2 running on this Notebook. When i run the copied
over swf file and i use the various ways of entering the rtmp and address in
the connect to address field, i always get NetConnection.Connect.Failed

So now my testing is all within my home network and does not even attempt to
use an external website! just locally connected systems on the same wireless
network. If it can work in this scenario, then i am confident that if and when
i park my swf file on an external website, the home PC will be able provide the
streaming service. Also, if it works in the scenario just described, i will be
able to develop the full application and then get hosting for theFMS services.

I really appreciate any help with this. It is driving me NUTS!!!!


calmchess333
3/2/2007 9:57:58 PM
pssst goto the media server folder in program files go into the conf folder
and open up adapter.xml in notepad ........change from port 80 to port 1033
open up port 1033 in your firewall and router.........open up the other two
ports in your firewall and router...if it works then you know that the problem
is because both FMS and your webserver are trying to use port 80 ......if all
of this fails I'd say that the only solution is to put the webserver on a
computer and FMS on a second computer.
calmchess333
3/2/2007 10:00:10 PM
skyMan707
3/2/2007 10:20:04 PM
Thanks for all the help. I have actually resolved the problem!!!! There was
nothing wrong in my rtmp syntax, etc. I went into the
conf/_defaultRoot_/Adaptor.xml file and all of a sudden i noticed that in the
<HostPort name ... tag, the port address was 19350 instead of 1935. I took
the zero off at the end and BINGO!!!, everything works locally and remotelly!

here is the line i have now:

<HostPort name="edge1" ctl_channel=":1935,80">${ADAPTOR.HOSTPORT}</HostPort>


Hope this helps other folks as well. Thanks to user calmchess333, who
attempted to help. Appreciate the help.
calmchess333
3/2/2007 10:27:05 PM
calmchess333
3/2/2007 10:31:45 PM
hey remember though that a user might not connect remotely if they are
blocking port 1935 with their firewall and your FMS server and webserver are
both trying to use port80....I'd definately sniff my connection to see what
ports FMS is actually using to connect remotely.......what you have posted
above is definately good though ....thats what was wrong on my end too......i
must have been blind not to have realized it myself!
Flakx
3/9/2007 5:39:13 PM
Right well, im having the same problem......

I've altered the adaptor XML and i still can't connect. - i changed the port
from 19350 to 1935.
I've opened port forwarding etc. on my router.

I've tried rtmp:// and rtmpt://

Both with no success.

main_nc.connect("RTMP//**.***.***.***/drawing");

*= my ip address :P

So any further ideas??


Thanks
Andy.

skyMan707
3/9/2007 7:24:20 PM
You know, after i had posted my solution, I ended up having the same problem
the next day. Weird!!! So, i unstalled the FMS and downloaded another copy of
the FMS and did the re-install all over again. (Touch-wood) everything has
been working fine since then!
my current Adaptor.xml has the following line and it works fine.

<HostPort name="edge1" ctl_channel=":19350">${ADAPTOR.HOSTPORT}</HostPort>

One thing i do remember is that, when the installation is finished, the
pop-up window that says, do you want this services to automatically start at
the computer start-up time... well let the services start automatically.
Also make sure that the ip address you are using matchs with the address given
when you do the ipconfig command in the DOS window (start -- run --cmd window)
Hope it helps. Good luck.

Flakx
3/9/2007 11:03:54 PM
right well i tried to use the original 19350 port and opened that on my router.


*sigh*

didn't change anything its stil broken.

Gona try as you did reinstalling the whole server.

Also a quick clarity question, im right in thinking i only need to have my swf
on my site ?

ill post when it all goes belly up again

hehe
Flakx
3/10/2007 10:25:02 PM
grr,

i have no idea what is not working, i've altered the neccessary parts from
what i can tell in the .xml files,

my port forwarding seems to be working but nothing is being detected by the
server itself.

hmmm
really needing help now guys and gals

anyone got any other ideas??? or maybe some .xml sample files :D

thanks
Andy.
Flakx
3/11/2007 12:00:00 AM
I have two computers, my webserver is somwhere in the countryside of England and my Server is in a small room in my house lol.

calmchess333
3/11/2007 2:36:12 AM
have you read my other posts on the subject? its not a configuration problem
its the fact that you have FMS and a webserver running on the same
computer...get two computers one for FMS and one for your webserver.
Flakx
3/13/2007 12:00:00 AM
Hmm, having looked at my router logs it seems that the server is dispatching
the information back from the server to a random IP. Anyone got any ideas?
presumebly this could be an error within the actionscript.

function initSharedObject() {
main_nc = new NetConnection();
main_nc.onStatus = function(info) {
if (info.code == "NetConnection.Connect.Success") {
drawing_so = SharedObject.getRemote("drawing", main_nc.uri, true);
drawing_so.onSync = function(list) {
for (var n in list) {
var line_obj = this.data[list[n].name];
draw_mc.moveTo(line_obj.x1, line_obj.y1);
draw_mc.lineTo(line_obj.x2, line_obj.y2);
}
};
drawing_so.connect(main_nc);
} else {
trace("ERROR: " + info.code);
}
};

main_nc.connect("RTMP://xx.xxx.xxx.xxx/app/drawing");
}
AddThis Social Bookmark Button