Connection Issue

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

Moderators: Lapo, Bax

Post Reply
oalasergiu
Posts: 19
Joined: 02 Feb 2014, 21:47

Connection Issue

Post by oalasergiu »

Hello everyone,

I've just started using this amazing product, and unfortunately ran into some problems.

Here's what's going wrong:
No one can connect to my smartfoxserver2x, neither LAN nor WAN (I tried to connect from 2 machines in my LAN).

I'm sure I've done post-installation steps properly; I have 9933 port open and forwarded to my machine and I have a Static IP.

Also, in the SFS2x's control panel -> server configuration I have added Socket Addresses of my machine's LAN Ip.
Through my public IP, anyone can see the SFS2x' default page, access the administration tools etc. but cannot connect to the server. It always says "Can't connect to server!".

Any clues what it can be?

Thanks in advance!
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Connection Issue

Post by Bax »

Did you update the client so that it connects to the right IP address? I'm asking because all the examples by default try to connect locally (127.0.0.1).
Paolo Bax
The SmartFoxServer Team
oalasergiu
Posts: 19
Joined: 02 Feb 2014, 21:47

Re: Connection Issue

Post by oalasergiu »

Hey Bax,

Thanks for your reply.

Yes, I'm updating the IP in examples to my public IP address.

Sorry I forgot to mention that.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Connection Issue

Post by Bax »

What client technology are you using?
Paolo Bax
The SmartFoxServer Team
oalasergiu
Posts: 19
Joined: 02 Feb 2014, 21:47

Re: Connection Issue

Post by oalasergiu »

I am using Unity Web Player.
oalasergiu
Posts: 19
Joined: 02 Feb 2014, 21:47

Re: Connection Issue

Post by oalasergiu »

I'm displayed with this error:
"Http error creating http connection: System Security."

Think it can help identify the problem.
oalasergiu
Posts: 19
Joined: 02 Feb 2014, 21:47

Re: Connection Issue

Post by oalasergiu »

So, it looks like it's a crossdomain.xml issue.

In my code, I have these lines:

Code: Select all

		if (Application.isWebPlayer || Application.isEditor) {
			if (!Security.PrefetchSocketPolicy(serverName, serverPort, 500)) {
				Debug.LogError("Security Exception. Policy file loading failed!");
			}
		}
Where should be placed the crossdomain.xml file?

I have it in "/SmartFoxServer_2X/SFS2X/config/" and "/SmartFoxServer_2X/SFS2X/www/root/"
oalasergiu
Posts: 19
Joined: 02 Feb 2014, 21:47

Re: Connection Issue

Post by oalasergiu »

I figured it out. - Changed the default port 9933 to a different one (1933). Now anyone can connect to my server!

Thanks!
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Connection Issue

Post by Bax »

The I suppose your network configuration blocked port 9933.
Paolo Bax
The SmartFoxServer Team
oalasergiu
Posts: 19
Joined: 02 Feb 2014, 21:47

Re: Connection Issue

Post by oalasergiu »

Yeah, I guess.
But now another problem, I cannot login into the Administration Panel. :(
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Connection Issue

Post by Bax »

It is possible that in the server.xml configuration the administrator is allowed to connect using the 9933 port only.
Please check the <adminTcpPort> setting: you should enter -1 to allow the admin connection using any port.
Paolo Bax
The SmartFoxServer Team
Post Reply