Lennart
Lennart

Reputation: 10333

Multiple Tomcat Instances on an Amazon EC

we have an Amazon Elastic Cloud Instance (Ubuntu 10.10) with Apache2 and Tomcat6 up which are currently running only PHPMyAdmin. To further try some possibilities of Cloud Computing we want to get up at least one more Tomcat instance to do some completely independent things (e.g. some kind of JSP Application). I thought you could simple start another tomcat server and reach it via a different port, so some-ip.com:8080 (First instance) and some-ip.com:8081 (second instance). I installed a second instance of Tomcat to ~/tomcat_instance_1 and configured the ports of the second instance accordingly in server.xml but I'm stuck how to bring it online. Googling brought me some examples which showed the installation of mod_jk for apache and configuring the second instance as a worker. I installed mod_jk and tried configuring worker.properties, but really don't understand how that should be of any help. Worst thing is, that almost all tutorials have completly different approaches and in most cases I even haven't the mentioned file and folder structure. Accessing the first instance of tomcat works, but the second one is unreachable. My guess is that I need to tell Apache about the second instance, but I can't figure out how to do this.

Has anyone some advices or guidelines how to do this?

Upvotes: 0

Views: 724

Answers (1)

agross
agross

Reputation: 746

To get Apache to transfer requests to your Tomcat instances you do need install and set up mod_jk. However, to just test if the second Tomcat instance is running, you should be able to go to

http://some-ip.com:8081.

If you can't reach it:

  1. Make sure the Port is open to you in the Amazon instance firewall.
  2. Check the log files for that instance to see if it has any problem's starting up.

Since you only get 1 IP per instance in Amazon, it can be tricky to start multiple instances and have them work properly with mod_jk. If you can reach both servers in the browser, then you can move on to setting up mod_jk.

Upvotes: 1

Related Questions