Nov 30th, 2010, 01:04 PM
Can't get multiple instances to work
I am trying to deploy my application with multiple instances option enabled, but without any success. As soon as I start I get a red exclamation mark for health of the context and red exclamation marks for the context root for the Apache web server and application servers (tc Server) (see attached screenshot).
In the cloudfoundry server log it first tries to connect to port 8080, which fails. As soon as it tries to connect to port 80 it gets 503 - Service Temporarily Unavailable (see attached log file).
In the application log I get loads of ContextLoader and JDBC exceptions (see attached log file).
I've tried to restart with no effect. Does anyone have any suggestions on how to get multiple instances working?
Jan 3rd, 2011, 09:28 AM
I've experienced the same problem. Whats the alternative? Deploy the app separately multiple times and put them behind a load balancer?
Jan 4th, 2011, 08:30 PM
That won't work, because then you will have two different databases for the two different apps :-(
Jan 4th, 2011, 08:41 PM
I don't see any reason why you can't point both instances at the same database. No?
Jan 4th, 2011, 08:48 PM
I share you're thoughts, that would have been great! But as it is, the startup script in cloudfoundry first stopps the active database before deploying the app. If this step was removed then you could do what you suggested.
Jan 4th, 2011, 08:50 PM
Really...thats not good.
Can someone on the Spring team help us on this?
Jan 6th, 2011, 02:25 AM
I don't know if the read the threads, or if there is a way to flag this tread for their attention. What do you think?
Jan 6th, 2011, 08:33 AM
Yeah Im not sure. I emailed cloud foundry support with something similar about load balancing with Amazon load balancer and have not received a response.
I did try deploying with multiple instances 2 nights ago and it seemed to work. I was also able to add and remove app servers through the GUI.
I didn't test it extensively though.
Jan 6th, 2011, 10:59 AM
Sorry about the delayed response.
The errors in the tomcat log indicate that your application cannot connect to the database.
When you launch the deployment you should specify JVM options containing something similar to this:
Cloud Foundry will then substitute the correct hostname.
Or you should access the database using dbmaster has the hostname.
Tags for this Thread