My users can't connect

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Bax, Lapo, rjgtav

My users can't connect

Postby _Si_ » 16 Mar 2012, 15:16

Hi folks,

Another stumbling block I'm afraid. I've got my server up and running, we've had multiple tests internally (from a different network) and it all works fine.

I've now got one of our customers trying to test it with us, but they can't get a connection to the server. I think I'm struggling to understand the process of connection, can someone read this and make sure it makes sense.

User visits our website and loads up our flash.
Flash is cached in their machine and tries to connect from there to our-ip:9933
sfs2x does it's magic and connects them to other users

So surely if that's the case then the 3rd party's IP address should appear in our SFS2x logs when they tried to connect? (it doesn't at the moment)

Could it simply be their firewall is blocking traffic on port 9933? If so, is there a common port I should be using instead? I'm hoping to push this out across a great many institutions, all with varying firewalls. Is there a standard 'always' open port?

Once again thanks for any guidance,
Si
_Si_
 
Posts: 17
Joined: 11 Mar 2011, 15:14

Re: My users can't connect

Postby itsmylifesoham » 16 Mar 2012, 17:12

hi,

when a flash client from your customer's machine tries to connect it does not use the port 9933 on their machine, so it has nothing to with their firewall.

if 9933 port is blocked on the firewall of server machine which you are running sfs2x on, then it will be a problem for all the clients and not one.

from the flash client you need to first do sfs.connect() , i hope you have a proper sfs-config file which tells the ip to connect on and the port number. then send a login request like sfs.send(new loginrequest(username..... give in all the parameters like zone name etc.
once you are logged into zone you can join the user into any room.

i dont understand what you mean my sfs2x does its magic...if you have made all the above calls then only a user will be logged into zone and will be able to interact with the server.

if you can post the code you are using to connect it would help...
itsmylifesoham
 
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: My users can't connect

Postby itsmylifesoham » 16 Mar 2012, 17:17

also sometimes when the cutomer machine is behind company firewall or proxies sfs2x uses something called bluebox ... i think you should see this link for details: http://docs2x.smartfoxserver.com/GettingStarted/bluebox

you can see how to use bluebox when you are connecting to sfs at the above link. basically you will need to include a few lines
into your sfs-config.xml.
itsmylifesoham
 
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: My users can't connect

Postby _Si_ » 20 Mar 2012, 16:01

Hi, thanks for the reply.

We've done lots of tests from various machines and locations, it's just this customer's firewalled network which is the issue hence my fixation with it being a firewall problem.

Our system is a massive convolution of flash files so I'm not sure how to share just the pertinent parts. It does go through the process you mentioned though and I can see the rooms being created in the correct zone for our tests so I'm sure it's all working ok from that point of view.

I already had the bluebox settings in the config file as specified in that link, but I'm wondering if that's where the problem lies. Is there a way to get logs of who is hitting bluebox and what the result was? The sfs2x logs never list our users IP address so they're obviously not getting through to the server. They can hit our jetty page (our ip:8080) directly so the server is viewable to them, it's just when they try to hook up through the flash it goes wrong for them.

As I say all our customers will use a firewall so I need to get this figured out otherwise I'll be getting huge support issues.

Thanks again,
Si
_Si_
 
Posts: 17
Joined: 11 Mar 2011, 15:14

Re: My users can't connect

Postby _Si_ » 21 Mar 2012, 11:18

Right spent the last three hours hammering against this one, reading through the forum posts and trying to figure out what's going on.

I think it's the way I've set up (or not) BlueBox. Am I right in thinking to check if BlueBox is working I can just edit my sfs-config.xml and specify an invalid port number? I guess that will cause the connection to fail and it will fall back to BlueBox.

My problem is if I do that I just get a sandbox violation error saying it can't load data from myip:thedummyport. Which makes sense I suppose. I've tried putting that dummy port number into the crossdomain.xml file just to make sure it's not that causing issues but it doesn't help.

I'm not sure if it's related, but if I put our internal IP into the sfs-config.xml file I get a sandbox violation. If I use our external IP it works fine. Is this correct? The documentation says to use internal, but it's like it can't resolve that to our server and the location of the crossdomain.xml file.

Any help is greatly appreciated, desperate to get this up and running.

Thanks,
Si
_Si_
 
Posts: 17
Joined: 11 Mar 2011, 15:14

Re: My users can't connect

Postby Bax » 21 Mar 2012, 18:08

Are you running the latest SFS2X version? (2.0.1). If not please update.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
 
Posts: 3896
Joined: 29 Mar 2005, 09:50
Location: Italy

Re: My users can't connect

Postby _Si_ » 22 Mar 2012, 14:39

Hi. Yes I'm running 2.0.1, I installed it a couple of weeks ago before we started our testing, just to make sure if I had problems they weren't entirely self inflicted :)

Thanks,
Si
_Si_
 
Posts: 17
Joined: 11 Mar 2011, 15:14

Re: My users can't connect

Postby Bax » 23 Mar 2012, 11:13

Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
 
Posts: 3896
Joined: 29 Mar 2005, 09:50
Location: Italy

Re: My users can't connect

Postby _Si_ » 23 Mar 2012, 13:45

I've read the first thirty or so pages of search results for "bluebox" but I'm struggling to find a solution.

I did have a look at the one you mentioned, but it doesn't seem to be quite the same as mine. Their error seems to be generated by the BlueBox instance, mine just comes straight back from the ip.

Am I doing the right thing to test if bluebox is working? I've modified the port number in the sfs-config.xml to be incorrect, hoping it would revert to bluebox. Is that right? Here's the error if I do that:

## SecurityError: [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048: Security sandbox violation: http://mysite/flash.swf cannot load data from MYIP:9932."]
Connection Failure: Error #2048: Security sandbox violation: http://mysite/flash.swf cannot load data from MYIP:9932.

Where my connection is actually on 9933. I'm fairly certain the user I'm testing with isn't able to connect normally so it's having to go through BlueBox. i'm just trying to confirm that it's working for the code I've written.

Thanks.
_Si_
 
Posts: 17
Joined: 11 Mar 2011, 15:14

Re: My users can't connect

Postby Bax » 26 Mar 2012, 09:38

I'm not sure what you are doing wrong, but we tested the BlueBox behavior hundred of times and it works fine.
If you set the wrong port and the client config file has the <useBlueBox> parameter set to true, it will try to connect via http.
Try it using the simple examples we provide. You will find out that it works as expected.
Back to your problem... how do you get that error? I mean, where is it displayed? Also, are you sure you are not connecting, regardless that error is displayed? Because in certain conditions (during debug in flash IDE for example) that error might appear... but the client still connects as expected.

Also, if the client network is behind sophisticated proxies, event the BlueBox tunneling might be unable to foo them.
You may want to try the BB communication using our online BattleFarm example (see the demo page on the website).
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
 
Posts: 3896
Joined: 29 Mar 2005, 09:50
Location: Italy

Re: My users can't connect

Postby _Si_ » 03 Jul 2012, 14:03

Hi again. Right I've got a bit further, thanks. I've been able to force BlueBox to connect if I manually specify to do so, and it now seems to be falling back correctly to http if the socket doesn't work. Which is brilliant and is exactly what I need!

The only last problem now is down to almost all my users having firewalls with varying open port numbers. There's no way to guarantee either socket 9933 or http port 8080 being open. In fact 9/10 times I'd expect the socket to be closed and the http port to be remapped to something else.

Do I need to give BlueBox a port number for http connection, or will it just use the default open one? Would I do that by just leaving out the specification of the BlueBox port? If I do need to provide a port is it possible to provide a list of potential ports that I can add to as new users tell me their open ports?

I've had a few of my users running test cases, and so far unless they're logged in as an admin in their intranet who can bypass the firewall they're not being able to connect on either socket or http.

Hopefully once I can get people connecting I'll be able to run some wider scale tests of my actual game code and I should still be on track for a September launch.

Hugely appreciative of all your help,
Si
_Si_
 
Posts: 17
Joined: 11 Mar 2011, 15:14

Re: My users can't connect

Postby rjgtav » 03 Jul 2012, 14:19

Hi.
Well, at least port 80 is usually open, you should try using it in BlueBox. You can configure the httpPort on the external config.xml file that you load using the loadConfig() method.
Please keep in mind that a connection via HTTP is much slower than a socket one, and if your game needs a considerable amount of internet resources, it may be impossible for those users to play.
Skills: SFS Pro/Basic, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS
SFS Tutorials: http://sfs-tutor.blogspot.com/ - I no longer update it nor visit it. Some examples may be bugged.
If I take too long to reply, feel free to PM me
User avatar
rjgtav
 
Posts: 2811
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: My users can't connect

Postby _Si_ » 03 Jul 2012, 15:37

Unfortunately most of our users will have port 80 closed, their http ports tend to be reassigned to other random ports. Which is the cause for my concern.

I'm going to nudge as many as I can to open the socket for us, but it won't happen for all and can't be relied upon. I'll keep an eye on the speeds, thanks for the heads up. Our first few games are transfering minimal amounts of data anyway so it hope it won't be an issue to start with.

Cheers, Si.
_Si_
 
Posts: 17
Joined: 11 Mar 2011, 15:14

Re: My users can't connect

Postby Lapo » 11 Jul 2012, 10:36

Sorry I don't think I understand. If your clients have port 80 blocked by a firewall they won't even be able to get to your website. So there's really no way they can navigate anywhere.
Are you really sure about this? I have never heard of such restrictions, and I couldn't imagine a use case for blocking port 80. That's what 99% of the internet users use.

Please let us know the details.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
 
Posts: 16219
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: My users can't connect

Postby _Si_ » 11 Jul 2012, 13:02

Hi Lapo, thanks for the response.

Hopefully this is just me getting myself tangled in knots. Our current server setup is: apache running on 80 for http, 443 for ssl. Then sfs2x running 8080 for http and 9933 for socket. Which I presume is standard for single server installs?

A lot of our clients are on closed intranets where they remap their http port to be something other than 80 or 8080. I believe it's to do with content control or something, I just know it's pretty much common practice.

So for bluebox to work it needs to know the correct http port on the jetty server which in our case is 8080, right? So from my machine here not sat in a network, I force my code to use http rather than socket, it establishes a connection on 8080 and works fine.

We've had it tested by a client who has 8080 closed and the connection fails.

I think where I'm getting confused is the difference between our server port and their firewall ports. For instance, for me to hit the jetty server on 8080 my local traffic still goes out on port 80. But for BlueBox, am I telling it which port to connect through or which port to connect to. Does that question even make sense?

Appreciate any help here, like I say I think this is our last stumbling block and the part furthest from my comfort zone!

Thanks,
Si
_Si_
 
Posts: 17
Joined: 11 Mar 2011, 15:14

Next

Return to SFS2X Questions

Who is online

Users browsing this forum: No registered users and 2 guests