intellij has a bug with running two tomcat instances concurrently

I have two tomcat instances installed (different port: 8181 & 8282). If running a single tomcat instance, there is no problem but with two, one always crashed the other. Although i had these two tomcat in different directories and also added these two tomcat servers in intellij, after i run $ ps -ef | grep catalina, i realized that intellij use the same catalina.base for all tomcat instances. And i think that is the cause of the problem, see below:
  501 22155 18214   0   0:02.68 ??         0:45.83 /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -Djava.util.logging.config.file=/Users/x/Library/Caches/IntelliJIdea10/tomcat/Unnamed_tp69894d17/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/Users/x/Software/tomcat-8181/endorsed -classpath /Users/x/Software/tomcat-8181/bin/bootstrap.jar -Dcatalina.base=/Users/x/Library/Caches/IntelliJIdea10/tomcat/Unnamed_tp69894d17 -Dcatalina.home=/Users/x/Software/tomcat-8181 -Djava.io.tmpdir=/Users/x/Software/tomcat-8181/temp org.apache.catalina.startup.Bootstrap start
  501 22235 18214   0   0:01.20 ??         0:19.83 /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -Djava.util.logging.config.file=/Users/x/Library/Caches/IntelliJIdea10/tomcat/Unnamed_tp69894d17/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/Users/x/Software/tomcat-8282/endorsed -classpath /Users/x/Software/tomcat-8282/bin/bootstrap.jar -Dcatalina.base=/Users/x/Library/Caches/IntelliJIdea10/tomcat/Unnamed_tp69894d17 -Dcatalina.home=/Users/x/Software/tomcat-8282 -Djava.io.tmpdir=/Users/x/Software/tomcat-8282/temp org.apache.catalina.startup.Bootstrap start


Clean the cache but the problem still the same.

env: mac snow leopard, jdk 6, tomcat 6.0.32, intellij idea 10.0.2
0
8 comments

How do you run the second Tomcat instance? Do you have a separate run configuration for it or you change 'App Server' setting in the original run
configuration?

I have two tomcat instances installed (different port: 8181&  8282). If running a single tomcat instance, there is no problem but with two, one always crashed the other. Although i had these two tomcat in different directories and also added these two tomcat servers in intellij, after i run $ ps -ef | grep catalina, i realized that intellij use the same catalina.base for all tomcat instances. And i think that is the cause of the problem, see below:
   501 22155 18214   0   0:02.68 ??         0:45.83 /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -Djava.util.logging.config.file=/Users/x/Library/Caches/IntelliJIdea10/tomcat/Unnamed_tp69894d17/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/Users/x/Software/tomcat-8181/endorsed -classpath /Users/x/Software/tomcat-8181/bin/bootstrap.jar -Dcatalina.base=/Users/x/Library/Caches/IntelliJIdea10/tomcat/Unnamed_tp69894d17 -Dcatalina.home=/Users/x/Software/tomcat-8181 -Djava.io.tmpdir=/Users/x/Software/tomcat-8181/temp org.apache.catalina.startup.Bootstrap start
   501 22235 18214   0   0:01.20 ??         0:19.83 /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -Djava.util.logging.config.file=/Users/x/Library/Caches/IntelliJIdea10/tomcat/Unnamed_tp69894d17/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/Users/x/Software/tomcat-8282/endorsed -classpath /Users/x/Software/tomcat-8282/bin/bootstrap.jar -Dcatalina.base=/Users/x/Library/Caches/IntelliJIdea10/tomcat/Unnamed_tp69894d17 -Dcatalina.home=/Users/x/Software/tomcat-8282 -Djava.io.tmpdir=/Users/x/Software/tomcat-8282/temp org.apache.catalina.startup.Bootstrap start

>

Clean the cache but the problem still the same.

>

env: mac snow leopard, jdk 6, tomcat 6.0.32, intellij idea 10.0.2

>

---
Original message URL: http://devnet.jetbrains.net/message/5286418#5286418



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

yes, i have set up 2 app servers and pointed to different tomcat physical directory.  Then i deployed different web apps to each. Bascially they share nothing.   

0

Does the problem reproduce if you delete one of Tomcat run configurations and then create it again?

yes, i have set up 2 app servers and pointed to different tomcat physical directory.  Then i deployed different web apps to each. Bascially they share nothing.

>

---
Original message URL: http://devnet.jetbrains.net/message/5286450#5286450



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Yes, i did try that, same problem.

0

Could you please .idea/workspace.xml file?

Yes, i did try that, same problem.

>

--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

I got the same problem.

When I start the two tomcats, I get the same CATALINA_BASE:

Using CATALINA_BASE:   "C:\Users\kny.EIENDOMSINFO\.IntelliJIdea10\system\tomcat\_etinglysing"

My idea\workspace.xml is attached.



Attachment(s):
workspace.xml
0

OK, I've found the problem. If you close IDEA and remove all tags like
<option name="BASE_DIRECTORY_NAME" value="..."/>
from .idea/workspace.xml file the problem should go away.

Also I've commited fix for the problem so it won't repeat in IDEA 10.5.

0

Just thought I'd mention that this issue was resolved for me after removing all BASE_DIRECTORY_NAME definitions from /runConfigurations as well.
Cheers.

0

Please sign in to leave a comment.