PDA

View Full Version : [Solved] Having problems with ES5.2 on EC2 using elastic IP



producerism
05-06-2011, 12:13 PM
Not sure if this is a bug report, or just something I'm doing wrong.

I'm able to install es5 without any problems on EC2. When setting up the Configuration.xml file, using the public DNS that Amazon assigns to the EC2 instance works fine.

If I assign an elastic IP to that instance, I can connect to ES5 using either elastic IP or public dns via the ES Admin tool and code. However, if I set the HOST in the Configuration.xml file to the elastic IP (instead of the public dns), I can't connect.

e.g.
This doesn't work:

<Host>50.12.54.12</Host>
But this does:

<Host>ec2-111-222-333-444.compute-1.amazonaws.com</Host>

tcarr
05-06-2011, 12:35 PM
I'm surprised that the public DNS works. I've never seen an elastic IP address work with an ES5, and always used the private DNS or private IP. The problem is that you have to use an IP or hostname that the ES5 knows belongs to itself, so it has to be something that it recognizes internally. I assume that Amazon's elastic IP addresses are IPs work by some type of magic on another layer. If I run ifconfig, all I see is the private IP.

producerism
05-06-2011, 05:20 PM
Thanks for the response. So I'm assuming that this means whenever I deploy a new instance, I will have to edit the Configuration.xml file each time, since the private DNS/private IP will be different for each instance.

Do you know of any other ways to achieve a similar effect as an elastic IP? Specifically - how to deploy a new instance of an ES5 server, without needing to change the config file?

tcarr
05-06-2011, 05:47 PM
For the trial license, leaving it as 0.0.0.0 works nicely. That won't work with a real license of course. I'm personally not worried about the Configuration.xml file, because it's just an XML file so you can write a script that would edit it automatically. You could probably leverage ES5.2's DbUtility to allow you to write a script that edits a restore.xml file similarly, to fix the gateway listener IPs.

I'll do some research and see if I come up with any other solutions.

tcarr
05-06-2011, 06:32 PM
Does 0.0.0.0 work for Configuration.xml, or does it have to be the IP from the license?

The development team that is working on implementing on-demand licensing for ES5 says that will be your ideal solution. No estimate on when it will be released, but I'm guessing this summer.

producerism
05-07-2011, 12:11 PM
outstanding, yes - 0.0.0.0 works (for some reason 127.0.0.1 didn't?).
Thanks again Teresa

tcarr
05-07-2011, 01:37 PM
127.0.0.1 should work, but only if you are running the ES Admin locally. That's what 127.0.0.1 is, the IP of the box that the ES Admin is running on.

richjoslin
04-26-2012, 11:48 PM
I've never seen an elastic IP address work with an ES5, and always used the private DNS or private IP. The problem is that you have to use an IP or hostname that the ES5 knows belongs to itself, so it has to be something that it recognizes internally. I assume that Amazon's elastic IP addresses are IPs work by some type of magic on another layer. If I run ifconfig, all I see is the private IP.

I'm confused. I thought Elastic IPs were the only way of having a static IP on an EC2 server, and that the private IP changes upon stopping/starting the instance. I know this is an old post, so I'm wondering if Elastic IPs with ES5 are totally cool now.

tcarr
04-26-2012, 11:53 PM
On EC2 you have to use the internal IP on the ES5 itself, or else use 0.0.0.0. Clients use the elastic IP to reach the ES5.

Note that if you install a license other than the developer one, you won't be able to use 0.0.0.0 for the gateway listeners. You can still use it for the ES Admin.

serena
10-09-2012, 01:35 PM
On EC2 you have to use the internal IP on the ES5 itself, or else use 0.0.0.0. Clients use the elastic IP to reach the ES5.

Note that if you install a license other than the developer one, you won't be able to use 0.0.0.0 for the gateway listeners. You can still use it for the ES Admin.

How can we install the license for an Amazon EC2 server where the internal IP address and public address changes everytime the server is relaunched?
Is it possible to use the DNS domain name for the license instead? Will 0.0.0.0 still work?

tcarr
10-09-2012, 01:49 PM
If you purchase your license using the Purchase link (above, next to Download) and your IP changes, you can generate a replacement license yourself, up to 5 times. You can't generate a license for 0.0.0.0 however.

With EC2, as long as you do not stop the instance, the IP shouldn't change. That is, restarting the operating system is just fine. The internal IP address for the EC2 instance that runs this website and our live examples hasn't changed in the two years that we have used it.

As for the DNS domain name, it is highly unlikely that this will work for you with an EC2 instance. You can try it though: use the free 50 ccu license, and configure your gateway listeners to use the domain name. If the ES5 starts successfully, then a license for whatever you used for the gateway listeners will work.

edit: If you have so many ccu that you need to shard your ES5 on multiple servers, contact us privately and we will explain other options.

serena
10-10-2012, 06:56 AM
This does not work too well with the EC2 it seems.
As we are configuring the server on EC2, it will be shutdown and startup multiple times to get the setup right.
When this happens, the license will fail and there is only 5 chances to retry.
Will the Elastic IP work for the license? Can I generate the license with the Elastic IP?
We can assign the same Elastic IP to the EC2 instance every time it is relaunched.
We do not require any sharding at the moment, a single server is enough.

tcarr
10-10-2012, 12:28 PM
When you are still in the "we aren't sure this is configured right" stage, use the free 50 user license. That license is good for any IP. After your instance is set up correctly, and you know that the ES5 is working properly with 50 users, install the paid license. You can't use the Elastic IP - the ES5 checks for what it thinks is its own IP and it can't see the Elastic IP because it is imposed externally.

serena
10-11-2012, 02:46 AM
As we are using Rightscale to manage our EC2 instances, we need to set it up such that the ElectroServer installation is automated.
I understand that there is some configuration changes required once the license is installed, so we need to setup the automated scripts to modify these configuration.
We will just install and configure it manually for now and be careful with shutting the server down.
Will there be any plans to better support installing ElectroServer on the EC2 with regards to the licensing?