SmartFoxServer 2X and the RightScale platform

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

Moderators: Lapo, Bax

User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFoxServer 2X and the RightScale platform

Postby Lapo » 18 Aug 2014, 17:06

I don't know, I would need more details.
What does the crossdomain file looks like? Is the server reachable via socket?
Is there evidence that a connection is made? If you watch the log files while the client is connecting you will see that a Session is opened and the closed immediately after showing that the WebPlayer has connected and fetched the policy.

And... maybe redundant question, are you testing with the WebPlayer?
Lapo
--
gotoAndPlay()
...addicted to flash games
arklay
Posts: 14
Joined: 12 Dec 2012, 17:04

Re: SmartFoxServer 2X and the RightScale platform

Postby arklay » 20 Aug 2014, 07:27

Lapo wrote:What does the crossdomain file looks like?

in http://54.254.210.144:8080/crossdomain.xml :

Code: Select all

<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>

in http://54.254.210.144:8080/SFS2X/config/crossdomain.xml there is nothing (Http error 404)

Lapo wrote:Is the server reachable via socket?

port 8080 is reachable

Lapo wrote:Is there evidence that a connection is made?
If you watch the log files while the client is connecting you will see that a Session is opened and the closed immediately after showing that the WebPlayer has connected and fetched the policy.


I'm not sure how to check it, but for sure the policy is not being fetched. This code:

Code: Select all

            Log("START");
            if (!Security.PrefetchSocketPolicy(currentServerName, serverPolicyPort, 10000))
                {
               Log("END 1");
               LogError("Security Exception. Policy file loading failed!: http://{0}:{1}/crossdomain.xml", currentServerName, serverPolicyPort);
                }
            Log("END 2");

Produces this output (Log = Debug.Log)

Code: Select all

(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 49)

SFSManager: START
 
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 49)

Platform assembly: /Library/Internet Plug-Ins/Unity Web Player.plugin/Contents/Frameworks/ReleaseUnityPlayer3.x.x-i386.bundle/Contents/Resources/CrossDomainPolicyParser.dll (this message is harmless)
SocketPolicyClient1: Incoming GetPolicyStreamForIP
SocketPolicyClient1: About to BeginConnect to 54.254.210.144:8080
SocketPolicyClient1: About to WaitOne
SocketPolicyClient1: Socket connected
SFSManager: END 1
 
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 49)

Security Exception. Policy file loading failed!: http://54.254.210.144:8080/crossdomain.xml
 
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 49)

SFSManager: END 2
 
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 49)


Lapo wrote:And... maybe redundant question, are you testing with the WebPlayer?

Yes
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFoxServer 2X and the RightScale platform

Postby Lapo » 20 Aug 2014, 09:19

There is a misunderstanding.
The socket policy file located under SFS2X/config/crossdomain.xml is not meant to be reachable via HTTP. It is served via socket on port 9933 (default).

Pointing your browser to http://<ip-address>:8080/SFS2X/config/crossdomain.xml will certainly return an error because such path doesn't exist in the webserver's root.
I hope this is clear.

arklay wrote:
Lapo wrote:Is the server reachable via socket?

port 8080 is reachable

I was asking if the TCP socket port is open. Default value is 9933 if you haven't changed it.
You can run the simple telnet test described here:
http://docs2x.smartfoxserver.com/Gettin ... leshooting

thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
arklay
Posts: 14
Joined: 12 Dec 2012, 17:04

Re: SmartFoxServer 2X and the RightScale platform

Postby arklay » 20 Aug 2014, 10:19

There is connectivity to port 9933:

Code: Select all

$ telnet 54.255.177.30 9933
Trying 54.255.177.30...
Connected to ec2-54-255-177-30.ap-southeast-1.compute.amazonaws.com.
Escape character is '^]'.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFoxServer 2X and the RightScale platform

Postby Lapo » 20 Aug 2014, 15:56

Something is strange. The client is not getting the policy from port 9933:

Code: Select all

i386.bundle/Contents/Resources/CrossDomainPolicyParser.dll (this message is harmless)
SocketPolicyClient1: Incoming GetPolicyStreamForIP
SocketPolicyClient1: About to BeginConnect to 54.254.210.144:8080


Why?
Port 8080 can be used by the client if two conditions are met:

1) The useBlueBox is set to true in the client configuration
2) If the connection to port 9933 fails

I would expect the client to load the policy from port 9933 and I'd suggest to revise the connection settings.
Lapo

--

gotoAndPlay()

...addicted to flash games
arklay
Posts: 14
Joined: 12 Dec 2012, 17:04

Re: SmartFoxServer 2X and the RightScale platform

Postby arklay » 21 Aug 2014, 02:22

aaagghhhh!!! you are completely right I didn't change the port for the policy! let me thank you before killing myself! :oops: :oops: :oops:
arklay
Posts: 14
Joined: 12 Dec 2012, 17:04

Re: SmartFoxServer 2X and the RightScale platform

Postby arklay » 22 Aug 2014, 10:07

I apologize in advance for this N00B request, but I'm having a hard time figuring out how to upload extension files to the server...

Is there a dummy tutorial somewhere?
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFoxServer 2X and the RightScale platform

Postby Lapo » 22 Aug 2014, 10:59

Before version 2.9 you should have used an FTP to upload the jar files to the right folder.
With the latest version (2.9.0) we have added a remote upload feature in the AdminTool itself. You can read more about it here:
http://docs2x.smartfoxserver.com/Gettin ... ionManager
Lapo

--

gotoAndPlay()

...addicted to flash games
arklay
Posts: 14
Joined: 12 Dec 2012, 17:04

Re: SmartFoxServer 2X and the RightScale platform

Postby arklay » 30 Aug 2014, 09:43

That's awesome! Thanks!

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 59 guests