You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by kareem_s_m <ka...@gmail.com> on 2009/05/05 21:20:33 UTC

Using Multiple JVM instances

Hi There,

I want to run 2 instances for my application on 2 separate JVMs on the same
machine. I have installed Java 1.5 and using Tomcat 5.5.26. Now in 

JVM1
-----
(i) My Cataline_Home and Cataline_Base are =
E:\apps\thirdparty\apache5.5.26\JVM1
(ii) My JAVA_HOME = D:\JDk.....

JVM1
-----
(i) My Cataline_Home and Cataline_Base are =
E:\apps\thirdparty\apache5.5.26\JVM2
(ii) My JAVA_HOME = D:\JDk.....

I have changed all the ports in both the server.xml. I can use the
startup.bat on each of the bin directories to start tomcat and I can access
the 2 different instances of the application at different port numbers at
the same time.

Now I install one service through the command 'service install JVM1' from
one bin and another service through the command 'service install JVM2' from
the other bin. This creates 2 new services in the machine called 'Apache
Tomcat JVM1' and 'Apache Tomcat JVM2'. I can start these services one at the
time and can access the application. But when I try to start both the
services and make them run parallely, by going to windows services, I get an
error 'Error 1067: Process terminated unexpectedly'.

Why is it that I can run both the services parallely from DOS prompt and
cannot do the same from windows services? How can I achieve this?

Any help is much appreciated.

Regards,
Kareem
-- 
View this message in context: http://www.nabble.com/Using-Multiple-JVM-instances-tp23394165p23394165.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Using Multiple JVM instances

Posted by kareem_s_m <ka...@gmail.com>.
Hi Chuck,
The jakarta_service_20090505.log was just saying 'Attempting to start the
service....'. Anyway I figured out the problem. The JMX remoting port was
the same in both the JVMs which was causing the issue where no 2 JVMs could
run in parallel. Lesson learnt : When running multiple JVMs on the same
machine, all port numbers should be mutullay exclusive.

Caldarale, Charles R wrote:
> 
>> From: kareem_s_m [mailto:kareemuddin@gmail.com]
>> Subject: RE: Using Multiple JVM instances
>> 
>> But nothing is written to them
> 
> That's not what your screenshot shows: the jakarta_service_20090505.log
> file for JVM2 has a non-zero size.  What's in it?
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Using-Multiple-JVM-instances-tp23394165p23411119.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Using Multiple JVM instances

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: kareem_s_m [mailto:kareemuddin@gmail.com]
> Subject: RE: Using Multiple JVM instances
> 
> But nothing is written to them

That's not what your screenshot shows: the jakarta_service_20090505.log file for JVM2 has a non-zero size.  What's in it?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Using Multiple JVM instances

Posted by kareem_s_m <ka...@gmail.com>.
And my Java is 1.5.07, Tomcat is 5.5.26 and machine is windows 2003 on 64
bit.

kareem_s_m wrote:
> 
> Thanks Chuck. When I start the first JVM service, the log files in the
> appropriate directory are created and data is written to stdout file (no
> errors though). When I start the second JVM service, the log files do get
> created in the appropriate directory (each JVM has its own directory for
> for log files). But nothing is written to them and the error that the
> 'Process terminated unexpectedly.
> http://www.nabble.com/file/p23397301/Multiple_JVM_Error.jpg  '
> 
> Caldarale, Charles R wrote:
>> 
>>> From: kareem_s_m [mailto:kareemuddin@gmail.com]
>>> Subject: Using Multiple JVM instances
>> 
>>> But when I try to start both the services and make them
>>> run parallely, by going to windows services, I get an 
>>> error 'Error 1067: Process terminated unexpectedly'.
>>> 
>>> Why is it that I can run both the services parallely from 
>>> DOS prompt and cannot do the same from windows services?
>> 
>> I'm not able to reproduce your problem on my XP box.  Both of my Tomcat
>> 5.5.x services come up and run happily together.
>> 
>> You might want to clean out the logs directory of both your Tomcats, then
>> try starting both services, and see if there's something interesting
>> reported in the one that doesn't start properly.
>> 
>>  - Chuck
>> 
>> 
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-mail
>> and its attachments from all computers.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Using-Multiple-JVM-instances-tp23394165p23397749.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Using Multiple JVM instances

Posted by kareem_s_m <ka...@gmail.com>.
Thanks Chuck. When I start the first JVM service, the log files in the
appropriate directory are created and data is written to stdout file (no
errors though). When I start the second JVM service, the log files do get
created in the appropriate directory (each JVM has its own directory for for
log files). But nothing is written to them and the error that the 'Process
terminated unexpectedly.
http://www.nabble.com/file/p23397301/Multiple_JVM_Error.jpg  '

Caldarale, Charles R wrote:
> 
>> From: kareem_s_m [mailto:kareemuddin@gmail.com]
>> Subject: Using Multiple JVM instances
> 
>> But when I try to start both the services and make them
>> run parallely, by going to windows services, I get an 
>> error 'Error 1067: Process terminated unexpectedly'.
>> 
>> Why is it that I can run both the services parallely from 
>> DOS prompt and cannot do the same from windows services?
> 
> I'm not able to reproduce your problem on my XP box.  Both of my Tomcat
> 5.5.x services come up and run happily together.
> 
> You might want to clean out the logs directory of both your Tomcats, then
> try starting both services, and see if there's something interesting
> reported in the one that doesn't start properly.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Using-Multiple-JVM-instances-tp23394165p23397301.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Using Multiple JVM instances

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: kareem_s_m [mailto:kareemuddin@gmail.com]
> Subject: Using Multiple JVM instances

> But when I try to start both the services and make them
> run parallely, by going to windows services, I get an 
> error 'Error 1067: Process terminated unexpectedly'.
> 
> Why is it that I can run both the services parallely from 
> DOS prompt and cannot do the same from windows services?

I'm not able to reproduce your problem on my XP box.  Both of my Tomcat 5.5.x services come up and run happily together.

You might want to clean out the logs directory of both your Tomcats, then try starting both services, and see if there's something interesting reported in the one that doesn't start properly.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org