ec2 restarted and ip changed

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

Moderators: Lapo, Bax

grhwood
Posts: 116
Joined: 15 Mar 2011, 04:43

ec2 restarted and ip changed

Postby grhwood » 23 Jan 2014, 19:36

Hi,

I have a licenced sfs instance running on ec2. The problem is each time I restarted ec2 instance, its internal ip changed so I must edit the server.xml config.

Pls tell me how can I solve this issue.

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

Re: ec2 restarted and ip changed

Postby Lapo » 24 Jan 2014, 10:16

(Sorry, I have probably misunderstood your question. I have removed my previous answer)
If you are expecting the local network address to change between restarts (not all cloud systems do that) you can use a little "trick". You can manually edit the server.xml file and set the TCP (and UDP if you use it) listener to 0.0.0.0, which will bind any address available.

We are going to set this value as default in the next SFS 2X release.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
ndesy
Posts: 33
Joined: 18 Feb 2008, 21:41
Location: Montreal

Re: ec2 restarted and ip changed

Postby ndesy » 25 Jan 2014, 04:45

No, if we use 0.0.0.0 the licence validation will fail. We need to use the private ip.

I use puppet to update automatically server.xml but even then, I always have to reset the licence on the web dashboard every time we need to stop/start an ec2 instance.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: ec2 restarted and ip changed

Postby Lapo » 26 Jan 2014, 08:58

What is exactly the error message you are getting?
Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: ec2 restarted and ip changed

Postby Bax » 27 Jan 2014, 08:39

I confirm that at the moment 0.0.0.0 can't be used due to license validation issues.
The other option you have is to run a script during the server startup (before SFS2X is launched) which writes the private IP in the server.xml file.
If you need it, we have a Python script which does that exactly. Contact us by email.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 55 guests