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

getfree
Posts: 3
Joined: 05 Mar 2012, 00:09

Re: SmartFoxServer 2X and the RightScale platform

Postby getfree » 05 Mar 2012, 19:54

does anybody know what is the login to connect with rightscale smartfoxserver instance in aws?
I tried user-ec2 and ubuntu and I couldnt access?! :?
zacard
Posts: 2
Joined: 19 Mar 2012, 02:10

Re: SmartFoxServer 2X and the RightScale platform

Postby zacard » 20 Mar 2012, 01:37

Is there any solution or template for smartfox connecting to mysql and nosql database on the cloud?And where to deploy the server side extension?

Regards
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: SmartFoxServer 2X and the RightScale platform

Postby Bax » 20 Mar 2012, 09:08

getfree, you should contact the RightScale support.

zacard, a cloud server is just like any other server. If you check our online documentation you will find instructions on how to connect to a database, whatever it is. You just need a JDBC driver for your DB of choice.
As it regards the extension deployment, again simply follow the documentation and drop your jar file in a subfolder under the /extensions folder.
Paolo Bax
The SmartFoxServer Team
zacard
Posts: 2
Joined: 19 Mar 2012, 02:10

Re: SmartFoxServer 2X and the RightScale platform

Postby zacard » 21 Mar 2012, 01:38

Bax wrote:getfree, you should contact the RightScale support.

zacard, a cloud server is just like any other server. If you check our online documentation you will find instructions on how to connect to a database, whatever it is. You just need a JDBC driver for your DB of choice.
As it regards the extension deployment, again simply follow the documentation and drop your jar file in a subfolder under the /extensions folder.

So,there's no difference between deploying on a cloud or locally,isn't it?

Regards
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: SmartFoxServer 2X and the RightScale platform

Postby Bax » 21 Mar 2012, 18:01

zacard wrote:So,there's no difference between deploying on a cloud or locally,isn't it?

No difference.
Paolo Bax
The SmartFoxServer Team
aubreuil
Posts: 4
Joined: 11 Jun 2013, 14:18

Re: SmartFoxServer 2X and the RightScale platform

Postby aubreuil » 13 Jun 2013, 21:27

I have successfully deployed SFS2X to the cloud for developing a new version of an old game.
Unfortunately the legacy code runs with the SmartFox Pro version, and you have no server templates for deploying that.
What should I do ? Do I have to rewrite the client and sse for sfs2x or is there a simpler solution ?
Would I be able to just deploy sfs Pro manually with a few unix commands, or do I need a template ?
(am usng rightscale with AWS EC2)
Thanks
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: SmartFoxServer 2X and the RightScale platform

Postby Bax » 14 Jun 2013, 06:21

aubreuil wrote:I have successfully deployed SFS2X to the cloud for developing a new version of an old game.
Unfortunately the legacy code runs with the SmartFox Pro version, and you have no server templates for deploying that.
What should I do ? Do I have to rewrite the client and sse for sfs2x or is there a simpler solution ?
Would I be able to just deploy sfs Pro manually with a few unix commands, or do I need a template ?
(am usng rightscale with AWS EC2)
Thanks

Yes, in RightScale we only have a SFS2X template available.
You could anyway deploy SmartFoxServer Pro manually. It is just like installing it on any other server.
I think you can even create your own custom template, so that you can reuse it later. Read the RightScale documentation or ask their support.
Paolo Bax
The SmartFoxServer Team
arklay
Posts: 14
Joined: 12 Dec 2012, 17:04

Re: SmartFoxServer 2X and the RightScale platform

Postby arklay » 03 Jul 2014, 17:09

Hi,

I'm starting to use SFS 2X in the rightscale platform (I've used before in my own server), everything is going quite smooth (great documentation, even though I have to say that the documentation to setup the security group is outdated), EXCEPT that I don't know how to get Unity to load the socket policy from the rightscale server:

If I try to get it from a browser it works (eg: http://54.179.148.121:8080/crossdomain.xml) but this code:

Code: Select all

            if (Application.isWebPlayer || Application.isEditor)
            {
                if (!Security.PrefetchSocketPolicy(serverName, serverPolicyPort, 10000))
                {
                    LogError("Security Exception. Policy file loading failed!: http://{0}:{1}/crossdomain.xml", serverName);
                    whenDone(false);
                    connected = false;
                }
            }

Always goes to the error part.

Can you point me in the right direction? Thanks
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFoxServer 2X and the RightScale platform

Postby Lapo » 03 Jul 2014, 20:25

It seems you're doing it correctly although you are referencing an url which is not correct.
The policy is obtained via socket, so no http.

Are you sure the server is indeed reachable at that IP and port? If that's the case there should be no problem for the WebPlayer to obtain the policy.
You can try the telnet test in our troubleshooting guide to make sure the socket is open.
http://docs2x.smartfoxserver.com/Gettin ... leshooting
Lapo
--
gotoAndPlay()
...addicted to flash games
arklay
Posts: 14
Joined: 12 Dec 2012, 17:04

Re: SmartFoxServer 2X and the RightScale platform

Postby arklay » 06 Jul 2014, 07:50

Thanks for the prompt reply!
I checked the connection and it's working, but I keep receiving that error in the Editor, I will come back to it when I deploy it to the web.

In the meanwhile I have two other questions:
1.- How can I make the configuration persistent? every time I restart the server I have to configure the instance again
2.- How can I use a symbolic link to the server? instead of having to change the ip address after every restart.

Thanks a lot
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFoxServer 2X and the RightScale platform

Postby Lapo » 06 Jul 2014, 18:19

1.- How can I make the configuration persistent? every time I restart the server I have to configure the instance again

The configuration is persistent.
Every time you hit Submit in the AdminTool your settings are persisted on disk.

2.- How can I use a symbolic link to the server? instead of having to change the ip address after every restart.

This I don't understand.
Symbolic links are for files, not IP addresses.

If you are running on a dynamic IP you can set the server's IP address to 0.0.0.0, which means bind any IP available.
You'll have to do this manually by editing the config/server.xml file. Technically this is not supported because it won't work with commercial licenses. I suppose you don't have one so you can employ this "trick" with the CE version.
Lapo

--

gotoAndPlay()

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

Re: SmartFoxServer 2X and the RightScale platform

Postby arklay » 25 Jul 2014, 03:00

Sorry for the late follow up, I took a "very well deserved" holidays :)

Lapo wrote:
1.- How can I make the configuration persistent? every time I restart the server I have to configure the instance again

The configuration is persistent.
Every time you hit Submit in the AdminTool your settings are persisted on disk.


What I mean:
1.- I start a new server for my deployment
2.- Login the AdminTool and change my password (for example)
3.- Reboot the SmartFoxServer instance (to check that I submitted it)
4.- Login the AdminTool with the new password
5.- Stop the server in RightScale's
6.- Launch another server for my deployment
7.- When I try to login the AdminTool I have to use the default password
Maybe I'm missing something here, but I would expect for the SmartFox configuration to be saved I'm the deployment, not in the actual server, am I wrong?

Also I keep getting an error when checking the policy file, if I access it using a browser (http://54.254.210.144:8080/crossdomain.xml) it works but the following code always fails:

Code: Select all

                if (!Security.PrefetchSocketPolicy(currentServerName, serverPolicyPort, 10000))
                {
               LogError("Security Exception. Policy file loading failed!: http://{0}:{1}/crossdomain.xml", currentServerName, serverPolicyPort);
                    //whenDone(false);
                    //connected = false;
                }
arklay
Posts: 14
Joined: 12 Dec 2012, 17:04

Re: SmartFoxServer 2X and the RightScale platform

Postby arklay » 18 Aug 2014, 09:30

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

Re: SmartFoxServer 2X and the RightScale platform

Postby Lapo » 18 Aug 2014, 09:51

Hi, sorry for the delayed response. I didn't notice your post (actually I don't think I got an email notification)

The problem is that when you dismiss a server and create a new one, you are ditching all your previous settings from the deleted Virtual Machine and you are launching a new one with a brand new installation. So you're back to default settings.

There's not much we can do about this, it depends on how the underlying virtual machines work. There are other cloud vendors that allow you to put the VM to sleep and spend just a few cents/day to keep it "parked". This can be convenient if you are running test servers which are not needed to be online 24/7.

We're working with one of these vendor to integrate SFS2X with their system.

Also I keep getting an error when checking the policy file, if I access it using a browser (http://54.254.210.144:8080/crossdomain.xml) it works but the following code always fails:

The crossdomain file served via socket is not the same as the one sent via HTTP.
The one you are looking for is located under the SFS2X/config/ folder.

cheers
Lapo

--

gotoAndPlay()

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

Re: SmartFoxServer 2X and the RightScale platform

Postby arklay » 18 Aug 2014, 10:01

Lapo wrote:
Also I keep getting an error when checking the policy file, if I access it using a browser (http://54.254.210.144:8080/crossdomain.xml) it works but the following code always fails:

The crossdomain file served via socket is not the same as the one sent via HTTP.
The one you are looking for is located under the SFS2X/config/ folder.

cheers


Ok, maybe I'm looking in the wrong place, but why

Code: Select all

Security.PrefetchSocketPolicy(currentServerName, serverPolicyPort, 10000)

Keeps failing?

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 46 guests